2025年6月12日/AuxAllWCS/Build/Project/AuxAllWCS.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/TcpServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
2025年6月12日/AuxAllWCS/Build/Project/界面/View1.xaml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
2025年6月12日/AuxAllWCS/Build/Project/界面/View1.xaml.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/AuxAllWCS.csproj
@@ -7,6 +7,8 @@ <AssemblyName>AuxAllWCS</AssemblyName> <TargetFrameworkVersion>4.6.1</TargetFrameworkVersion> <ProjectGuid>{D55A8F58-C2AA-442E-93D3-7537992A4993}</ProjectGuid> <NuGetPackageImportStamp> </NuGetPackageImportStamp> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> <PlatformTarget>AnyCPU</PlatformTarget> @@ -230,6 +232,49 @@ </ItemGroup> <ItemGroup> <None Include="App.config" /> <None Include="packages.config" /> <None Include="Static\config.json"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> <None Include="Static\js\app.829e775c.js.map"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> <None Include="Static\js\chunk-vendors.3e768dfe.js.map"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <Content Include="Static\css\a.css"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\css\app.d545ec97.css"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\favicon.ico"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\index.html"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\js\a.js"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\js\app.829e775c.js"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\js\chunk-vendors.3e768dfe.js"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Static\W.html"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="packages\Microsoft.Web.WebView2.1.0.3351.48\build\Microsoft.Web.WebView2.targets" Condition="Exists('packages\Microsoft.Web.WebView2.1.0.3351.48\build\Microsoft.Web.WebView2.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>è¿å°è®¡ç®æºä¸ç¼ºå°æ¤é¡¹ç®å¼ç¨ç NuGet ç¨åºå ã使ç¨âNuGet ç¨åºå è¿åâå¯ä¸è½½è¿äºç¨åºå ãæå ³æ´å¤ä¿¡æ¯ï¼è¯·åè§ http://go.microsoft.com/fwlink/?LinkID=322105ã缺å°çæä»¶æ¯ {0}ã</ErrorText> </PropertyGroup> <Error Condition="!Exists('packages\Microsoft.Web.WebView2.1.0.3351.48\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Web.WebView2.1.0.3351.48\build\Microsoft.Web.WebView2.targets'))" /> </Target> </Project> 2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/AutoThread.cs
@@ -251,7 +251,7 @@ { if (tag.wxr1.R44 && !tag.wxr1.R44_LAST && tag.wxr1.R10) { if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new { @@ -284,7 +284,7 @@ RedisHelper.Add($"ç»´å¸å°æè1.R10_LAST", "false", out string msg); } else if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { //䏿¥æ ¡éªã ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); @@ -324,7 +324,7 @@ { if (tag.wxr1.R46 && !tag.wxr1.R46_LAST && tag.wxr1.R11) { if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new { @@ -356,7 +356,7 @@ RedisHelper.Add($"ç»´å¸å°æè1.R11_LAST", "false", out string msg); } else if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { //䏿¥æ ¡éªã ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); @@ -396,7 +396,7 @@ { if (tag.wxr2.R44 && !tag.wxr2.R44_LAST && tag.wxr2.R10) { if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new { @@ -428,7 +428,7 @@ RedisHelper.Add($"ç»´å¸å°æè2.R10_LAST", "false", out string msg); } else if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[0], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { //䏿¥æ ¡éªã ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); @@ -469,7 +469,7 @@ { if (tag.wxr2.R46 && !tag.wxr2.R46_LAST && tag.wxr2.R11) { if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/200", JsonConvert.SerializeObject(new { @@ -493,16 +493,19 @@ } else { //LogHelper.Info($"Threadwxr2R æçæ¾ç½®ä¿¡å·1ãã -{tag.wxr2.R11_LAST}"); if (tag.wxr2.R11_LAST) //æçæ¾ç½®ä¿¡å·ãã { //LogHelper.Info($"Threadwxr2R æçæ¾ç½®ä¿¡å·1ãã -{tag.wxr2.R11}"); if (tag.wxr2.R11) { //tag.wxr2.R11_LAST = false; RedisHelper.Add($"ç»´å¸å°æè2.R11_LAST", "false", out string msg); } else if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode)) if (TcpServer.TrayIps.TryGetValue(VERX.deviceNo[1], out string traycode) && !string.IsNullOrEmpty(traycode.Trim())) { LogHelper.Info($"Threadwxr2R 䏿¥æ ¡éª>{traycode}"); //䏿¥æ ¡éªã ///var str = Settings.apiHelper.Post(Settings.MESbaseUrl + "mom-basic/dataTransmission/json/service/202", requestJson); var str = Settings.apiHelper.Post(Settings.WMSbaseUrl + "mom-basic/dataTransmission/json/service/202", JsonConvert.SerializeObject(new @@ -522,11 +525,19 @@ //æ¥è¦ã } } else { TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); } else { LogHelper.Info($"Threadwxr2Rãã -åéæ«ç "); TcpServer.TcpServerSend(VERX.deviceNo[1], GZ.Device.PLC.PlcHelper.Hex2Bin("544F4E")); } } } } else { Console.WriteLine($"Threadwxr2R ç»´å¸å°2 å³ è®¾å¤æªæ¾å°ã =================> "); } } public void ThreadTaskRun(Tag tag, Func<TaskEntity, bool> action) { 2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/TcpServer.cs
@@ -117,19 +117,23 @@ //{ Console.WriteLine($"ãTCPä¿¡æ¯åè®® {DateTime.Now.Millisecond}ãï¼IPï¼{remote_ip},MSGï¼{message}"); var mg = Encoding.ASCII.GetString(PlcHelper.Hex2Bin(message)); if (mg.Length > 10) { mg = mg.Substring(0, 10); } Console.WriteLine(mg); if (mg.StartsWith("DK") && mg.Trim().Length == "DK01000024".Length) if (mg.StartsWith("DK"))//&& mg.Trim().Length == "DK01000024".Length { LogHelper.Info($"æ«ç å¨ >{remote_ip} -{mg}"); if (TrayIps.TryGetValue(remote_ip, out string traycode)) { TrayIps[remote_ip] = traycode; TrayIps[remote_ip] = mg; } else TrayIps.Add(remote_ip, traycode); else TrayIps.Add(remote_ip, mg); Console.WriteLine("TOFF"); var mst = PlcHelper.Hex2Bin("544F4646"); TcpServer.TcpServerSend(remote_ip, mst); //Console.WriteLine("TOFF"); //var mst = PlcHelper.Hex2Bin("544F4646"); //TcpServer.TcpServerSend(remote_ip, mst); } //} } 2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/½çÃæ/View1.xaml
@@ -3,6 +3,39 @@ Title="ååwcs" > <Grid> <Grid> <TabControl> <TabControl.Resources> <Style TargetType="TabItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TabItem"> <Border Name="Border" BorderThickness="1,1,1,0" BorderBrush="Gainsboro" CornerRadius="4,4,0,0" Margin="2,0"> <ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="10,2"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter TargetName="Border" Property="Background" Value="LightSkyBlue" /> </Trigger> <Trigger Property="IsSelected" Value="False"> <Setter TargetName="Border" Property="Background" Value="GhostWhite" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </TabControl.Resources> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="emmm" Foreground="Orange" /> </StackPanel> </TabItem.Header> <TextBlock HorizontalAlignment="Center" FontFamily="Courier New" Text="
 ////////////////////////////////////////////////////////////////////
 // _ooOoo_ //
 @@ -27,5 +60,45 @@ // ä½ç¥ä¿ä½ æ°¸æ BUG æ°¸ä¸ä¿®æ¹ //
 ////////////////////////////////////////////////////////////////////" TextWrapping="Wrap" /> </TabItem> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="WebView" Foreground="Purple" /> </StackPanel> </TabItem.Header> </TabItem> <!--<TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="AGVä»»å¡" Foreground="Black" /> </StackPanel> </TabItem.Header> <Label Content="Content goes here..." /> </TabItem> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="壳ä½ä¸æ" Foreground="Blue" /> </StackPanel> </TabItem.Header> <Label Content="Content goes here..." /> </TabItem> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="æ»è£ 䏿" Foreground="Red" /> </StackPanel> </TabItem.Header> </TabItem> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <TextBlock Text="æ«ç 头" Foreground="Green" /> </StackPanel> </TabItem.Header> </TabItem>--> </TabControl> </Grid> </Grid> </Window> 2025Äê6ÔÂ12ÈÕ/AuxAllWCS/Build/Project/½çÃæ/View1.xaml.cs
@@ -28,6 +28,7 @@ using GZ.DB.Repository.OIDATABASE; using GZ.DB.IRepository.OIDATABASE; using GZ.DB.Entity.OIDATABASE; namespace GZ.Projects.AuxAllWCS { /// <summary>