Browse Source

1. isolate MES adaptor
2. Shinewave report change to CMD6
3. add version report name changing table
4. add Errorcode
update to v1.3.0

Robert 3 years ago
parent
commit
7fec85b9f5

+ 13 - 1
AwInitilizer.sln

@@ -5,7 +5,11 @@ VisualStudioVersion = 16.0.30413.136
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Initilizer", "AwInitilizer\Initilizer.csproj", "{7A23D514-38E1-423E-9238-464B0E2AFCC0}"
 EndProject
-Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "AwInitlizerInstaller", "AwInitlizerInstaller\AwInitlizerInstaller.vdproj", "{9A5A71D0-545F-43BB-9411-467C30365306}"
+Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "InitlizerInstaller", "AwInitlizerInstaller\AwInitlizerInstaller.vdproj", "{9A5A71D0-545F-43BB-9411-467C30365306}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesAdaptor", "MesAdaptor\MesAdaptor.csproj", "{6B69CF23-270B-429B-A21D-AD98C2DFF678}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhihongSystemID", "PhihongSystemID\PhihongSystemID.csproj", "{82536D82-F84B-47A5-A7F3-C668124188C5}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,6 +23,14 @@ Global
 		{7A23D514-38E1-423E-9238-464B0E2AFCC0}.Release|Any CPU.Build.0 = Release|Any CPU
 		{9A5A71D0-545F-43BB-9411-467C30365306}.Debug|Any CPU.ActiveCfg = Debug
 		{9A5A71D0-545F-43BB-9411-467C30365306}.Release|Any CPU.ActiveCfg = Release
+		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Release|Any CPU.Build.0 = Release|Any CPU
+		{82536D82-F84B-47A5-A7F3-C668124188C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{82536D82-F84B-47A5-A7F3-C668124188C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{82536D82-F84B-47A5-A7F3-C668124188C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{82536D82-F84B-47A5-A7F3-C668124188C5}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 2 - 2
AwInitilizer/App.config

@@ -14,10 +14,10 @@
                 <value>./Firmware</value>
             </setting>
             <setting name="Language" serializeAs="String">
-                <value>./Firmware</value>
+                <value>zh-chs</value>
             </setting>
             <setting name="MES" serializeAs="String">
-                <value>./Firmware</value>
+                <value>shinewave</value>
             </setting>
         </AwInitilizer.Properties.Settings>
     </userSettings>

+ 1 - 1
AwInitilizer/App.xaml.cs

@@ -1,4 +1,4 @@
-using AwInitilizer.DLL;
+using MesAdaptor;
 using System;
 using System.Collections.Generic;
 using System.Configuration;

+ 1 - 0
AwInitilizer/Converter/MesErrorCodeMaper.cs

@@ -1,4 +1,5 @@
 using AwInitilizer.Model;
+using MesAdaptor;
 using System;
 using System.Collections.Generic;
 using System.Linq;

+ 13 - 11
AwInitilizer/Initilizer.csproj

@@ -71,12 +71,7 @@
     <Compile Include="Converter\MesErrorCodeMaper.cs" />
     <Compile Include="Converter\PressStatusConverter.cs" />
     <Compile Include="Cultures\CulturesHelper.cs" />
-    <Compile Include="DLL\SajectConnectSajet.cs" />
-    <Compile Include="DLL\SajetConnectAdapter.cs" />
-    <Compile Include="DLL\SajetConnectShinewave.cs" />
     <Compile Include="KeyinListener.cs" />
-    <Compile Include="Model\ConnectorType.cs" />
-    <Compile Include="Model\MesErrorCode.cs" />
     <Compile Include="ProcedureLog\LogWriter.cs" />
     <Compile Include="Procedure\FirmwareBundleUploadProcedure.cs" />
     <Compile Include="Procedure\FirmwareCheckVersionProcedure.cs" />
@@ -125,7 +120,6 @@
       <SubType>Component</SubType>
     </Compile>
     <Compile Include="Converter\BooleanAndConverter.cs" />
-    <Compile Include="DLL\SajetConnect.cs" />
     <Compile Include="HintDialog.xaml.cs">
       <DependentUpon>HintDialog.xaml</DependentUpon>
     </Compile>
@@ -153,7 +147,6 @@
     <Compile Include="Procedure\FirmwareUpdateProcedure.cs" />
     <Compile Include="Procedure\FourGenModuleCheckProcedure.cs" />
     <Compile Include="Procedure\ProcedureBase.cs" />
-    <Compile Include="Model\SystemID.cs" />
     <Compile Include="Model\UpdateData.cs" />
     <Compile Include="Procedure\RestarttoIdelProcedure.cs" />
     <Compile Include="Properties\AssemblyInfo.cs">
@@ -184,14 +177,23 @@
     <None Include="App.config" />
   </ItemGroup>
   <ItemGroup>
-    <Content Include="DLL\SajetConnect.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
     <Resource Include="Image\Blue.png" />
     <Resource Include="Image\Emergency.png" />
     <Resource Include="Image\Green.png" />
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <Folder Include="DLL\" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\MesAdaptor\MesAdaptor.csproj">
+      <Project>{6b69cf23-270b-429b-a21d-ad98c2dff678}</Project>
+      <Name>MesAdaptor</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\PhihongSystemID\PhihongSystemID.csproj">
+      <Project>{82536d82-f84b-47a5-a7f3-c668124188c5}</Project>
+      <Name>PhihongSystemID</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PreBuildEvent>GitVersion.exe $(SolutionDir) /updateassemblyinfo</PreBuildEvent>

+ 1 - 0
AwInitilizer/KeyinListener.cs

@@ -1,4 +1,5 @@
 using AwInitilizer.Model;
+using PhihongSystemID;
 using System;
 using System.Collections.Generic;
 using System.Linq;

+ 9 - 7
AwInitilizer/MainWindow.xaml.cs

@@ -1,7 +1,9 @@
 using AwInitilizer.Model;
 using AwInitilizer.Procedure;
+using MesAdaptor;
 using Microsoft.Win32;
 using Newtonsoft.Json;
+using PhihongSystemID;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -42,7 +44,7 @@ namespace AwInitilizer
 
         private bool IsInitilizing = false;
 
-        private SystemID inputSystemID;
+        private PhihongSystemID.SystemID inputSystemID;
         private string csuFilePath;
         private string mcuFilePath;
 
@@ -126,7 +128,7 @@ namespace AwInitilizer
             ViewModel.IsInputCheckpassed = false;
             inputSystemID = systemID;
             var serialNumber = systemID.ToString();
-            if (!DLL.SajetConnect.SajetTransSnCheck(ref serialNumber))
+            if (!SajetConnect.SajetTransSnCheck(ref serialNumber))
             {
                 HintDialog.ShowMessage((string)Application.Current.FindResource("SnWoMisMatch"));
                 return;
@@ -175,7 +177,7 @@ namespace AwInitilizer
             ViewModel.IsInputCheckpassed = false;
             inputSystemID = ViewModel.SystemID;
             var serialNumber = inputSystemID.ToString();
-            if (!DLL.SajetConnect.SajetTransSnCheck(ref serialNumber))
+            if (!SajetConnect.SajetTransSnCheck(ref serialNumber))
             {
                 HintDialog.ShowMessage((string)Application.Current.FindResource("SnWoMisMatch"));
                 return;
@@ -381,7 +383,7 @@ namespace AwInitilizer
                 uxProgressRate.Content = "100%";
                 UpdateStatus = UpdateStatus.Sucess;
                 //report Success
-                DLL.SajetConnect.SajetTranFinishSuccess();
+                SajetConnect.SajetTranFinishSuccess();
             }
             else
             {
@@ -389,7 +391,7 @@ namespace AwInitilizer
                 //uxStatusBar.Content = $"Process {procedureList[procedureIndex].Name} Failed";
                 uxStatusBar.Content = string.Format((string)Application.Current.FindResource("StatusBarFailed"), procedureList[procedureIndex].Name);
                 //report Fail
-                DLL.SajetConnect.SajetTranFinishFail(mesErrorCode);
+                SajetConnect.SajetTranFinishFail(mesErrorCode);
             }
 
             stopTime = DateTime.Now;
@@ -404,7 +406,7 @@ namespace AwInitilizer
         private void ReportMESLog(Dictionary<string, string> logPairs)
         {
             //report value
-            var reportResult = DLL.SajetConnect.SajetTransReport(logPairs);
+            var reportResult = SajetConnect.SajetTransReport(logPairs);
         }
 
         private void CreateLogFile()
@@ -518,7 +520,7 @@ namespace AwInitilizer
 
         public void Print(string msg, bool isError = false)
         {
-            DLL.SajetConnect.SajetTransLog(msg);
+            SajetConnect.SajetTransLog(msg);
             Dispatcher.Invoke(() =>
             {
                 Span line = new Span();

+ 2 - 1
AwInitilizer/Model/UpdateData.cs

@@ -1,4 +1,5 @@
-using System;
+using PhihongSystemID;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Linq;

+ 4 - 4
AwInitilizer/Properties/AssemblyInfo.cs

@@ -50,7 +50,7 @@ using System.Windows;
 //
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]
-[assembly: AssemblyInformationalVersion("14e654f")]
+// [assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyFileVersion("1.2.1.0")]
+[assembly: AssemblyInformationalVersion("5dc5f8f")]

+ 2 - 2
AwInitilizer/Properties/Settings.Designer.cs

@@ -37,7 +37,7 @@ namespace AwInitilizer.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("./Firmware")]
+        [global::System.Configuration.DefaultSettingValueAttribute("zh-chs")]
         public string Language {
             get {
                 return ((string)(this["Language"]));
@@ -49,7 +49,7 @@ namespace AwInitilizer.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("./Firmware")]
+        [global::System.Configuration.DefaultSettingValueAttribute("shinewave")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 2 - 2
AwInitilizer/Properties/Settings.settings

@@ -6,10 +6,10 @@
       <Value Profile="(Default)">./Firmware</Value>
     </Setting>
     <Setting Name="Language" Type="System.String" Scope="User">
-      <Value Profile="(Default)">./Firmware</Value>
+      <Value Profile="(Default)">zh-chs</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="User">
-      <Value Profile="(Default)">./Firmware</Value>
+      <Value Profile="(Default)">shinewave</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 6 - 5
AwInitilizer/SigninDialog.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using MesAdaptor;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -40,17 +41,17 @@ namespace AwInitilizer
 
             if (CheckIsMesDisableAccount())
             {
-                DLL.SajetConnect.IsEmsEnabled = false;
+                SajetConnect.IsEmsEnabled = false;
                 DialogResult = true;
                 this.Close();
                 return;
             }
             else
             {
-                DLL.SajetConnect.IsEmsEnabled = true;
+                SajetConnect.IsEmsEnabled = true;
             }
 
-            if (DLL.SajetConnect.SajetTransSignIn(ref id))
+            if (SajetConnect.SajetTransSignIn(ref id))
             {
                 if (string.IsNullOrEmpty(id) || id.StartsWith("NG"))
                 {
@@ -79,7 +80,7 @@ namespace AwInitilizer
             if (!string.IsNullOrEmpty(uxWorkOrderBox.Text))
             {
                 string workOrder = uxWorkOrderBox.Text;
-                if (DLL.SajetConnect.SajetTransWoCheck(ref workOrder))
+                if (SajetConnect.SajetTransWoCheck(ref workOrder))
                 {
                     if (string.IsNullOrEmpty(workOrder) || workOrder.StartsWith("NG"))
                     {

+ 103 - 20
AwInitlizerInstaller/AwInitlizerInstaller.vdproj

@@ -21,14 +21,20 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_0FA1000DB6E747B099DBBACCBBD5DCEA"
+        "MsmKey" = "8:_1F9F534236CB4D3D880F26914397E4BF"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_1F9F534236CB4D3D880F26914397E4BF"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_545F2C105998B9BCB884FEDC39EB81F7"
+        "OwnerKey" = "8:_E1A04E83A00FAEB0DBA8C6848960F80A"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_545F2C105998B9BCB884FEDC39EB81F7"
+        "OwnerKey" = "8:_75A660E899044A1CAA106DA8B79AB179"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
@@ -63,14 +69,14 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_FFF37EF16AF4429F82201548482AE4A6"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_DDC8F9EB639E03E185A82AC43C609787"
+        "OwnerKey" = "8:_75A660E899044A1CAA106DA8B79AB179"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_UNDEFINED"
-        "OwnerKey" = "8:_757BA0BD19C3D246BA621DB64DE2384D"
+        "MsmKey" = "8:_E1A04E83A00FAEB0DBA8C6848960F80A"
+        "OwnerKey" = "8:_75A660E899044A1CAA106DA8B79AB179"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
@@ -82,9 +88,33 @@
         "Entry"
         {
         "MsmKey" = "8:_UNDEFINED"
+        "OwnerKey" = "8:_DDC8F9EB639E03E185A82AC43C609787"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_UNDEFINED"
         "OwnerKey" = "8:_78ADCBE0D92EA001CDA0D5ECE8D69FA4"
         "MsmSig" = "8:_UNDEFINED"
         }
+        "Entry"
+        {
+        "MsmKey" = "8:_UNDEFINED"
+        "OwnerKey" = "8:_E1A04E83A00FAEB0DBA8C6848960F80A"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_UNDEFINED"
+        "OwnerKey" = "8:_545F2C105998B9BCB884FEDC39EB81F7"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_UNDEFINED"
+        "OwnerKey" = "8:_757BA0BD19C3D246BA621DB64DE2384D"
+        "MsmSig" = "8:_UNDEFINED"
+        }
     }
     "Configurations"
     {
@@ -210,12 +240,12 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_0FA1000DB6E747B099DBBACCBBD5DCEA"
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1F9F534236CB4D3D880F26914397E4BF"
             {
-            "SourcePath" = "8:..\\AwInitilizer\\DLL\\SajetConnect.dll"
-            "TargetName" = "8:SajetConnect.dll"
+            "SourcePath" = "8:..\\AwInitilizer\\Cultures\\StringResource.en-US.xaml"
+            "TargetName" = "8:StringResource.en-US.xaml"
             "Tag" = "8:"
-            "Folder" = "8:_DE11C1EA8CD74CA9820344EFA2A02676"
+            "Folder" = "8:_86259A374A5843AD9608FFCDF2EFE3AD"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -230,12 +260,23 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1F9F534236CB4D3D880F26914397E4BF"
+            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_545F2C105998B9BCB884FEDC39EB81F7"
             {
-            "SourcePath" = "8:..\\AwInitilizer\\Cultures\\StringResource.en-US.xaml"
-            "TargetName" = "8:StringResource.en-US.xaml"
+            "AssemblyRegister" = "3:1"
+            "AssemblyIsInGAC" = "11:FALSE"
+            "AssemblyAsmDisplayName" = "8:PhihongSystemID, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL"
+                "ScatterAssemblies"
+                {
+                    "_545F2C105998B9BCB884FEDC39EB81F7"
+                    {
+                    "Name" = "8:PhihongSystemID.dll"
+                    "Attributes" = "3:512"
+                    }
+                }
+            "SourcePath" = "8:PhihongSystemID.dll"
+            "TargetName" = "8:"
             "Tag" = "8:"
-            "Folder" = "8:_86259A374A5843AD9608FFCDF2EFE3AD"
+            "Folder" = "8:_DE11C1EA8CD74CA9820344EFA2A02676"
             "Condition" = "8:"
             "Transitive" = "11:FALSE"
             "Vital" = "11:TRUE"
@@ -247,7 +288,7 @@
             "PackageAs" = "3:1"
             "Register" = "3:1"
             "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
+            "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
             "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_757BA0BD19C3D246BA621DB64DE2384D"
@@ -352,10 +393,21 @@
             "IsDependency" = "11:FALSE"
             "IsolateTo" = "8:"
             }
-            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FFF37EF16AF4429F82201548482AE4A6"
+            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DDC8F9EB639E03E185A82AC43C609787"
             {
-            "SourcePath" = "8:..\\..\\..\\MES\\SajetConnect\\DLL.INI"
-            "TargetName" = "8:DLL.INI"
+            "AssemblyRegister" = "3:1"
+            "AssemblyIsInGAC" = "11:FALSE"
+            "AssemblyAsmDisplayName" = "8:RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"
+                "ScatterAssemblies"
+                {
+                    "_DDC8F9EB639E03E185A82AC43C609787"
+                    {
+                    "Name" = "8:RestSharp.dll"
+                    "Attributes" = "3:512"
+                    }
+                }
+            "SourcePath" = "8:RestSharp.dll"
+            "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_DE11C1EA8CD74CA9820344EFA2A02676"
             "Condition" = "8:"
@@ -369,7 +421,38 @@
             "PackageAs" = "3:1"
             "Register" = "3:1"
             "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
+            "IsDependency" = "11:TRUE"
+            "IsolateTo" = "8:"
+            }
+            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_E1A04E83A00FAEB0DBA8C6848960F80A"
+            {
+            "AssemblyRegister" = "3:1"
+            "AssemblyIsInGAC" = "11:FALSE"
+            "AssemblyAsmDisplayName" = "8:MesAdaptor, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL"
+                "ScatterAssemblies"
+                {
+                    "_E1A04E83A00FAEB0DBA8C6848960F80A"
+                    {
+                    "Name" = "8:MesAdaptor.dll"
+                    "Attributes" = "3:512"
+                    }
+                }
+            "SourcePath" = "8:MesAdaptor.dll"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_DE11C1EA8CD74CA9820344EFA2A02676"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
         }

+ 1 - 1
GitVersion.yml

@@ -1,6 +1,6 @@
 assembly-versioning-scheme: MajorMinorPatch
 assembly-informational-format: '{ShortSha}'
-next-version: 1.2.1
+next-version: 1.3.0
 branches: {}
 ignore:
   sha: []

+ 3 - 3
Initilizer/AssemblyInfo.cs

@@ -9,7 +9,7 @@
                                               // app, or any theme specific resource dictionaries)
 )]
 
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]
-[assembly: AssemblyInformationalVersion("14e654f")]
+[assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyFileVersion("1.2.1.0")]
+[assembly: AssemblyInformationalVersion("5dc5f8f")]
 

+ 63 - 0
MesAdaptor/MesAdaptor.csproj

@@ -0,0 +1,63 @@
+<?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>{6B69CF23-270B-429B-A21D-AD98C2DFF678}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MesAdaptor</RootNamespace>
+    <AssemblyName>MesAdaptor</AssemblyName>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="MesErrorCode.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SajectConnectSajet.cs" />
+    <Compile Include="SajetConnect.cs" />
+    <Compile Include="SajetConnectAdapter.cs" />
+    <Compile Include="SajetConnectShinewave.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="SajetConnect.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\PhihongSystemID\PhihongSystemID.csproj">
+      <Project>{82536d82-f84b-47a5-a7f3-c668124188c5}</Project>
+      <Name>PhihongSystemID</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 1 - 1
AwInitilizer/Model/MesErrorCode.cs → MesAdaptor/MesErrorCode.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.Model
+namespace MesAdaptor
 {
     public enum MesErrorCode
     {

+ 37 - 0
MesAdaptor/Properties/AssemblyInfo.cs

@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MesAdaptor")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MesAdaptor")]
+[assembly: AssemblyCopyright("Copyright ©  2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("6b69cf23-270b-429b-a21d-ad98c2dff678")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyFileVersion("1.2.1.0")]
+[assembly: AssemblyInformationalVersion("5dc5f8f")]

+ 4 - 4
AwInitilizer/DLL/SajectConnectSajet.cs → MesAdaptor/SajectConnectSajet.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.DLL
+namespace MesAdaptor
 {
     public class SajectConnectSajet
     {
@@ -176,20 +176,20 @@ namespace AwInitilizer.DLL
             var codePair = new Dictionary<string, string>();
 
             string model = "";
-            if (Model.SystemID.TryParse(SN,out var systemID))
+            if (PhihongSystemID.SystemID.TryParse(SN,out var systemID))
             {
                 model = systemID.ModelName.ToString();
             }
 
             foreach (var key in valuePairs.Keys)
             {
-                var code = DLL.SajectConnectSajet.SajetTransRegisterHeader(model, key);
+                var code = SajectConnectSajet.SajetTransRegisterHeader(model, key);
                 if (string.IsNullOrEmpty(code))
                     continue;
                 codePair.Add(key, code);
             }
             //report value
-            var reportResult = DLL.SajectConnectSajet.SajetTransReport(valuePairs, codePair);
+            var reportResult = SajectConnectSajet.SajetTransReport(valuePairs, codePair);
             return reportResult;
         }
 

+ 2 - 3
AwInitilizer/DLL/SajetConnect.cs → MesAdaptor/SajetConnect.cs

@@ -1,12 +1,11 @@
-using AwInitilizer.Model;
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.DLL
+namespace MesAdaptor
 {
     public enum MesType
     {

+ 0 - 0
AwInitilizer/DLL/SajetConnect.dll → MesAdaptor/SajetConnect.dll


+ 1 - 1
AwInitilizer/DLL/SajetConnectAdapter.cs → MesAdaptor/SajetConnectAdapter.cs

@@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.DLL
+namespace MesAdaptor
 {
     public static class SajetConnectAdapter
     {

+ 14 - 27
AwInitilizer/DLL/SajetConnectShinewave.cs → MesAdaptor/SajetConnectShinewave.cs

@@ -4,20 +4,20 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.DLL
+namespace MesAdaptor
 {
     public static class SajetConnectShinewave
     {
         public enum CMD
         {
             Signin = 1,
-            SnCheck = 15,
-            WoCheck = 14,
-            Report = 16,
             Log = 4,
-            HeaderRegister = 8,
             ValueReport = 5,
             StringValueReport = 6,
+            HeaderRegister = 8,
+            WoCheck = 14,
+            SnCheck = 15,
+            Report = 16,
         }
 
         public static bool SajetTransStart() => SajetConnectAdapter.SajetTransStart();
@@ -101,8 +101,8 @@ namespace AwInitilizer.DLL
         {
             if (string.IsNullOrEmpty(userId))
                 return false;
-            if (string.IsNullOrEmpty(WorkOrder))
-                return false;
+            //if (string.IsNullOrEmpty(WorkOrder))
+            //    return false;
             if (string.IsNullOrEmpty(SN))
                 return false;
             string msg = userId + "," + WorkOrder + "," + SN + ",";
@@ -112,6 +112,10 @@ namespace AwInitilizer.DLL
 
             msg += "OK,";
 
+#if DEBUG
+            return true;
+#endif
+
             return SajetTransData(CMD.Report, ref msg);
         }
 
@@ -119,8 +123,8 @@ namespace AwInitilizer.DLL
         {
             if (string.IsNullOrEmpty(userId))
                 return false;
-            if (string.IsNullOrEmpty(WorkOrder))
-                return false;
+            //if (string.IsNullOrEmpty(WorkOrder))
+            //    return false;
             if (string.IsNullOrEmpty(SN))
                 return false;
             string msg = userId + "," + WorkOrder + "," + SN + ",";
@@ -131,7 +135,7 @@ namespace AwInitilizer.DLL
             msg += "NG," + errorCode + ",";
 
 #if DEBUG
-            return false;
+            return true;
 #endif
 
             return SajetTransData(CMD.Report, ref msg);
@@ -198,23 +202,6 @@ namespace AwInitilizer.DLL
             return SajetTransData(CMD.ValueReport, ref msg);
         }
 
-        public static bool SajetTransReport(Dictionary<string, string> resultPair, Dictionary<string, string> codePair)
-        {
-            if (string.IsNullOrEmpty(userId))
-                return false;
-            if (string.IsNullOrEmpty(SN))
-                return false;
-            string msg = userId + "," + SN + ",";
-            foreach (var result in resultPair)
-            {
-                if (codePair.Keys.Contains(result.Key))
-                {
-                    msg += string.Format("{0}:{1},", codePair[result.Key], string.Format("{0}.00", result.Value));
-                }
-            }
-            return SajetTransData(CMD.StringValueReport, ref msg);
-        }
-
         public static bool SajetTransLog(string data)
         {
             if (string.IsNullOrEmpty(userId))

+ 1 - 1
AwInitilizer/Model/ConnectorType.cs → PhihongSystemID/ConnectorType.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.Model
+namespace PhihongSystemID
 {
     public enum ConnectorType
     {

+ 49 - 0
PhihongSystemID/PhihongSystemID.csproj

@@ -0,0 +1,49 @@
+<?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>{82536D82-F84B-47A5-A7F3-C668124188C5}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>PhihongSystemID</RootNamespace>
+    <AssemblyName>PhihongSystemID</AssemblyName>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ConnectorType.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SystemID.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 37 - 0
PhihongSystemID/Properties/AssemblyInfo.cs

@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PhihongSystemID")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("PhihongSystemID")]
+[assembly: AssemblyCopyright("Copyright ©  2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("82536d82-f84b-47a5-a7f3-c668124188c5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyVersion("1.2.1.0")]
+[assembly: AssemblyFileVersion("1.2.1.0")]
+[assembly: AssemblyInformationalVersion("5dc5f8f")]

+ 1 - 1
AwInitilizer/Model/SystemID.cs → PhihongSystemID/SystemID.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace AwInitilizer.Model
+namespace PhihongSystemID
 {
     public class SystemID
     {