1
czw
2025-07-02 4cca6af72fa2288f433a7c4d604f9639d3fbfc63
1
5个文件已修改
164 ■■■■■ 已修改文件
2025年6月12日/AuxAllWCS/Build/Project/AuxAllWCS.csproj 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/AutoThread.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
2025年6月12日/AuxAllWCS/Build/Project/代码/VS自定义类/TcpServer.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
2025年6月12日/AuxAllWCS/Build/Project/界面/View1.xaml 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
2025年6月12日/AuxAllWCS/Build/Project/界面/View1.xaml.cs 1 ●●●● 补丁 | 查看 | 原始文档 | 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="&#x0a;
////////////////////////////////////////////////////////////////////&#x0a;
//                          _ooOoo_                               //&#x0a;
@@ -27,5 +60,45 @@
//           ä½›ç¥–保佑       æ°¸æ— BUG     æ°¸ä¸ä¿®æ”¹                     //&#x0a;
////////////////////////////////////////////////////////////////////" 
                     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>