liulb@mesnac.com 1 year ago
commit c2ee0ac277

@ -30,7 +30,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="25777d12-9e24-4cff-9537-87192ef77697" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/Admin.Core.Api/Admin.Core.Model.xml" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Api/Admin.Core.Model.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.Admin.Core/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Admin.Core/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.dgspec.json" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.dgspec.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.g.props" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Api/obj/Admin.Core.Api.csproj.nuget.g.props" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfo.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Api/obj/Debug/net6.0/Admin.Core.Api.AssemblyInfo.cs" afterDir="false" />
@ -61,12 +61,8 @@
<change beforePath="$PROJECT_DIR$/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfoInputs.cache" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Service/obj/Debug/net6.0/Admin.Core.Service.AssemblyInfoInputs.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfo.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfo.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfoInputs.cache" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.Tasks/obj/Debug/net6.0/Admin.Core.Tasks.AssemblyInfoInputs.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Admin.Core.sln" beforeDir="false" afterPath="$PROJECT_DIR$/Admin.Core.sln" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Aucma.Core.Palletiz/Business/InstoreBusiness.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Aucma.Core.Palletiz/Business/InstoreBusiness.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfo.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfo.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfoInputs.cache" beforeDir="false" afterPath="$PROJECT_DIR$/HwControlLib/obj/Debug/net6.0-windows/HwControlLib.AssemblyInfoInputs.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HwControlLib/obj/Debug/net6.0-windows/HwControlLib_MarkupCompile.i.cache" beforeDir="false" afterPath="$PROJECT_DIR$/HwControlLib/obj/Debug/net6.0-windows/HwControlLib_MarkupCompile.i.cache" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HwControlLib/obj/HwControlLib.csproj.nuget.dgspec.json" beforeDir="false" afterPath="$PROJECT_DIR$/HwControlLib/obj/HwControlLib.csproj.nuget.dgspec.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HwControlLib/obj/HwControlLib.csproj.nuget.g.props" beforeDir="false" afterPath="$PROJECT_DIR$/HwControlLib/obj/HwControlLib.csproj.nuget.g.props" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HwControlLib/obj/project.assets.json" beforeDir="false" afterPath="$PROJECT_DIR$/HwControlLib/obj/project.assets.json" afterDir="false" />
@ -83,35 +79,35 @@
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"customColor": "",
"associatedIndex": 3
}]]></component>
<component name="ProjectColorInfo">{
&quot;customColor&quot;: &quot;&quot;,
&quot;associatedIndex&quot;: 3
}</component>
<component name="ProjectId" id="2eCwctxkj4nLTki6aV6rdmatR3Y" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "main",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
},
"keyToStringList": {
"rider.external.source.directories": [
"C:\\Users\\Lenovo\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache",
"C:\\Users\\Lenovo\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache",
"C:\\Users\\Lenovo\\AppData\\Local\\Symbols\\src"
&quot;keyToStringList&quot;: {
&quot;rider.external.source.directories&quot;: [
&quot;C:\\Users\\Lenovo\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache&quot;,
&quot;C:\\Users\\Lenovo\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache&quot;,
&quot;C:\\Users\\Lenovo\\AppData\\Local\\Symbols\\src&quot;
]
}
}]]></component>
}</component>
<component name="RunManager" selected=".NET Project.Admin.Core.RealTimeService">
<configuration name="Admin.Core.Api: FolderProfile" type="DotNetMsBuildPublish" factoryName="Publish to IIS">
<riderPublish configuration="Release" platform="Any CPU" publish_profile="FolderProfile.pubxml" pubxml_path="$PROJECT_DIR$/Admin.Core.Api/Properties/PublishProfiles/FolderProfile.pubxml" uuid_high="5553381759874844827" uuid_low="-8204134441798954054" />
@ -493,6 +489,7 @@
<option name="presentableId" value="Default" />
<updated>1711421950913</updated>
<workItem from="1711421956285" duration="332000" />
<workItem from="1711506603549" duration="92000" />
</task>
<servers />
</component>

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute("f2c056a5-cf55-471c-aabd-31d46af19fce")]
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Api")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
c9aff93c7e52dc6b6e136c38b2f2f7d9a4e3f9f2a24e7fb521d07911bb60ac78
6be9db650a8d8bff4140d0bbf31c83bd11865db201599fd593f5a315e63ce2bf

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Common
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Common\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Common\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
d9eae03d7862854eac0680a891441785c24dc66225fdf8b811c47d758f6afdde
0ee46d7000a959c5af737321e5a6fa9902809161139b4d504e5b9ce11007b118

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.EventBus
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.EventBus\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.EventBus\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
fc52321f93f5c2fd48db2cd970b3f2697139faf8eb141fc44cb9cff814014204
0067d3d82de1193dcddb43c7d3e102921aadf588776d3e1ec96644e223ad55dc

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Extensions
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Extensions\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Extensions\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
a1a0cb86ab631e45d24ed414ae8629fff031683fbcdebaed581f4c7766f343cc
b9ee2cda1f5bf1572094fc104d8a4ebb8e8bca2323bfccbd0589759456144781

@ -1,5 +1,5 @@
is_global = true
build_property.RootNamespace = Admin.Core.FrameWork
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.FrameWork\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.FrameWork\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
49c27a9849bab328e95b607f78fc737f8ebaaa5e265267626470d85d4896e903
d398f3b0eab633951c1c8519654d02bbe6acbd8ccfe1cd726a70d2fe1f12f0a8

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.IRepository
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.IRepository\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.IRepository\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
0c8d133548deee08dd68039c338adf0f2f757499eb1b4ae9777b3eef7bbd9318
99a95143dfe1df5d5d28153c6b714eb0c8be066326c7d297e89d609c9328934b

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.IService
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.IService\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.IService\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
13472499f62f8cd9384b441d489176db5398f59edbc07570def8055e8596d2ad
4585e0f8a2b4013148250ceaa63875923bfb14b411030bcd783fc8a6e36fb829

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Model
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Model\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Model\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
b7b89146fe9c1b08147edaf7a7b066129b78fb462818b5628623890b6dcd156d
8140cee0110192d338783b7d890859de94d8e7ce570515eb1724f535615ad9db

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.RealTimeService
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.RealTimeService\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.RealTimeService\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
a288c5d9f2a95e17572dc587af20fdb86417a9e7668af5e9f5e3fe5e2017f1d5
97962d578fd64685d0ef3a4a853a70a8c076186aeba8bc5ae941a5bd4a5f80bc

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Repository
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Repository\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Repository\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Serilog.Es")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
0bab9f848011b1b18a9d7a1996526f4e271f37639f080338834a98e6fc15bea4
afc06f10a959a325d63a96d622d3efb448e14ac9b2cbea6611ea5b02ee0c233c

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Serilog.Es
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Serilog.Es\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Serilog.Es\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -106,7 +106,15 @@ namespace Admin.Core.Service
try
{
productOffline = _rep.Query(x => x.ProductSncode == snCode).First();
if (snCode.Length < 20)
{ //手动入库传的SN是产品型号,选取该型号最新一条记录
productOffline = _rep.FirstAsync(x => x.ProductCode == snCode).Result;
}
else
{
productOffline = _rep.Query(x => x.ProductSncode == snCode).First();
}
}
catch (Exception e)
{

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
01267ab1b0968c23edb7b61748b29a552430a10d7e4a4ed2ea44d82714c84828
2abb3a48977f91def2b27b81fa2d16987041c6823d1a2c8d734d8ee095f2989a

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Service
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Service\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Service\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+346821a670b23ccc6bf0121bb0363fb2fb2b4f48")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
8c0328fab89fff3416ba4e40a5d02294ced0baa9efe9bbab017e95a91d0cea93
81197e7a019dbcaf54123c23552597fbc7c696b79a7fcaa2c269210f12d6d871

@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.Tasks
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.Tasks\
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\Admin.Core.Tasks\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -22,6 +22,9 @@ namespace Aucma.Core.DataCollector
public readonly IRecordDeviceAlarmInfoServices _deviceAlarmInfoServices;
public readonly IRecordDeviceElectricityServices _deviceElectricityServices;
public int AlarmReadTimer = (1000 * 20);
public int EleReadTimer = (1000 * 20);
public DataCollectorFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices)
{
_deviceParamServices = deviceParamServices;
@ -39,7 +42,38 @@ namespace Aucma.Core.DataCollector
/// 采集设备用电
/// </summary>
/// <param name="deviceElectricity"></param>
public abstract void CollectDeviceElectricity(out Record_DeviceElectricity deviceElectricity);
public abstract void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys);
/// <summary>
/// 根据PLC地址读取设备用电
/// </summary>
/// <param name="address"></param>
/// <param name="plc"></param>
/// <param name="deviceElectricity"></param>
public void ReadDeviceElectricity(string[] address,IPlc plc,ref Record_DeviceElectricity deviceElectricity)
{
var ground = plc.ReadRandomInt16(address);
if (ground != null)
{
if (ground.Length >= 10)
{
//deviceElectricity.Glys = ground[0];
deviceElectricity.Va = ground[0];
deviceElectricity.Vb = ground[1];
deviceElectricity.Vc = ground[2];
deviceElectricity.Ia = ground[6];
deviceElectricity.Ib = ground[7];
deviceElectricity.Ic = ground[8];
deviceElectricity.Zxyg = ground[9];
deviceElectricity.CollectTime = DateTime.Now;
deviceElectricity.RecordTime = DateTime.Now;
}
}
else
{
deviceElectricity = null;
}
}
/// <summary>
/// 读取PLC数据

@ -58,9 +58,43 @@ namespace Aucma.Core.DataCollector
}
else if (stationCode == "1010")//成品分垛
{
//Task.Run(() =>
//{
// DataCollectorFactory collector = new PalletizFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
// Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
//});
Task.Run(() =>
{
DataCollectorFactory collector = new ShellStoreFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
});
Task.Run(() =>
{
DataCollectorFactory collector = new LinerStoreFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
});
Task.Run(() =>
{
DataCollectorFactory collector = new ShellPreassembleFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
});
Task.Run(() =>
{
DataCollectorFactory collector = new LinerPreassembleFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
});
Task.Run(() =>
{
DataCollectorFactory collector = new PalletizFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
DataCollectorFactory collector = new FoamBackFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices);
Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
});

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* LAPTOP-E0N2L34V
* Aucma.Core.DataCollector.Factory
* a4c93b2e-0cca-4fc8-be63-7f560c451cd9
*
* WenJY
* wenjy@mesnac.com
* 2024-03-28 11:16:52
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace Aucma.Core.DataCollector.Factory
{
/// <summary>
/// 泡前数据采集
/// </summary>
public class BeforeFoamFactory
{
}
}

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace Aucma.Core.DataCollector.Factory
{
/// <summary>
/// 泡前库、发泡线、发泡机、泡后库数据采集
/// 箱体发泡数据采集
/// </summary>
public class BoxFoamFactory : DataCollectorFactory
{
@ -34,7 +34,7 @@ namespace Aucma.Core.DataCollector.Factory
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集泡前库、发泡线、发泡机、泡后库设备报警信息");
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集设备报警信息");
var plc = _plc.plc;
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00009");
@ -68,11 +68,11 @@ namespace Aucma.Core.DataCollector.Factory
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(1000 * 5).Wait();
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(1000 * 5).Wait();
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
}
}
@ -83,7 +83,7 @@ namespace Aucma.Core.DataCollector.Factory
}
}
public override void CollectDeviceElectricity(out Record_DeviceElectricity deviceElectricity)
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
throw new NotImplementedException();
}

@ -1,27 +0,0 @@
using Admin.Core.IService.IService_New;
using Admin.Core.Model.Model_New;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.DataCollector.Factory
{
internal class Class1 : DataCollectorFactory
{
public Class1(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
}
public override void CollectDeviceAlarmInfo(out List<Record_DeviceAlarmInfo> deviceAlarmInfos)
{
throw new NotImplementedException();
}
public override void CollectDeviceElectricity(out Record_DeviceElectricity deviceElectricity)
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,186 @@
using Admin.Core.IService.IService_New;
using Admin.Core.Model.Model_New;
using Aucma.Core.HwPLc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* LAPTOP-E0N2L34V
* Aucma.Core.DataCollector.Factory
* d14bf35f-5d0b-4d74-a9a8-f7781f5c12cd
*
* WenJY
* wenjy@mesnac.com
* 2024-03-28 11:15:55
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace Aucma.Core.DataCollector.Factory
{
/// <summary>
/// 泡后数据采集
/// </summary>
public class FoamBackFactory : DataCollectorFactory
{
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("FoamBack"));
public FoamBackFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
}
public override void CollectDeviceAlarmInfo(out List<Record_DeviceAlarmInfo> deviceAlarmInfos)
{
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集泡后库设备报警信息");
var plc = _plc.plc;
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00009");
if (deviceParams != null)
{
deviceAlarmInfos = new List<Record_DeviceAlarmInfo>();
string batchId = System.Guid.NewGuid().ToString("N");
foreach (var item in deviceParams)
{
base.ReadParamValueByPlc(plc, item.ParamAddress, item.ParamType, out int paramValue);
if (paramValue != 0)
{
deviceAlarmInfos.Add(new Record_DeviceAlarmInfo()
{
BatchId = batchId,
DeviceCode = item.DeviceCode,
DeviceType = "1",
ParamCode = item.ParamCode,
ParamValue = paramValue.ToString(),
AlarmInfo = item.ParamName,
AlarmTime = DateTime.Now,
CreadtedTime = DateTime.Now,
});
}
}
if (deviceAlarmInfos.Count > 0)
{
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("FoamBack"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集泡后库设备报警信息异常:{ex.Message}");
}
}
}
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集泡后库设备用电数据");
var plc = _plc.plc;
deviceElectricitys = new List<Record_DeviceElectricity>();
//泡后集存库(10柜-主柜)
string[] address_10 = new string[] { "D7602", "D7604", "D7606", "D7608", "D7610", "D7612", "D7630", "D7634", "D7638", "D7642" };
Record_DeviceElectricity _deviceElectricity_10 = new Record_DeviceElectricity()
{
MonitorId = "E00009_0001"
};
base.ReadDeviceElectricity(address_10, plc, ref _deviceElectricity_10);
if(_deviceElectricity_10 != null)
{
deviceElectricitys.Add(_deviceElectricity_10);
}
//泡后集存库(09柜-分柜)IP10.10.92.40
string[] address_09 = new string[] { "D7652", "D7664", "D7666", "D7668", "D7660", "D7662", "D7680", "D7684", "D7688", "D7692" };
Record_DeviceElectricity _deviceElectricity_09 = new Record_DeviceElectricity()
{
MonitorId = "E00009_0002"
};
base.ReadDeviceElectricity(address_09, plc, ref _deviceElectricity_09);
if (_deviceElectricity_09 != null)
{
deviceElectricitys.Add(_deviceElectricity_09);
}
//泡后集存库(12柜-分柜)
string[] address_12 = new string[] { "D7752", "D7764", "D7766", "D7768", "D7760", "D7762", "D7780", "D7784", "D7788", "D7792" };
Record_DeviceElectricity _deviceElectricity_12 = new Record_DeviceElectricity()
{
MonitorId = "E00009_0003"
};
base.ReadDeviceElectricity(address_12, plc, ref _deviceElectricity_12);
if (_deviceElectricity_12 != null)
{
deviceElectricitys.Add(_deviceElectricity_12);
}
if(deviceElectricitys.Count > 0)
{
var result = base._deviceElectricityServices.AddAsync(deviceElectricitys);
}
else
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集泡后库设备用电数据失败,数据为空");
}
Task.Delay(base.EleReadTimer).Wait();
}
else
{
Task.Delay(base.EleReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("FoamBack"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集泡后库设备用电数据采集异常:{ex.Message}");
}
}
}
}
}

@ -0,0 +1,167 @@
using Admin.Core.IService.IService_New;
using Admin.Core.Model.Model_New;
using Aucma.Core.HwPLc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* LAPTOP-E0N2L34V
* Aucma.Core.DataCollector.Factory
* 81c294d4-c4ab-4504-b193-9a5d013383d3
*
* WenJY
* wenjy@mesnac.com
* 2024-03-28 11:57:37
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace Aucma.Core.DataCollector.Factory
{
public class LinerPreassembleFactory : DataCollectorFactory
{
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("LinerPreassemble"));
public LinerPreassembleFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
}
public override void CollectDeviceAlarmInfo(out List<Record_DeviceAlarmInfo> deviceAlarmInfos)
{
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆预装设备报警信息");
var plc = _plc.plc;
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00024");
if (deviceParams != null)
{
deviceAlarmInfos = new List<Record_DeviceAlarmInfo>();
string batchId = System.Guid.NewGuid().ToString("N");
foreach (var item in deviceParams)
{
base.ReadParamValueByPlc(plc, item.ParamAddress, item.ParamType, out int paramValue);
if (paramValue != 0)
{
deviceAlarmInfos.Add(new Record_DeviceAlarmInfo()
{
BatchId = batchId,
DeviceCode = item.DeviceCode,
DeviceType = "1",
ParamCode = item.ParamCode,
ParamValue = paramValue.ToString(),
AlarmInfo = item.ParamName,
AlarmTime = DateTime.Now,
CreadtedTime = DateTime.Now,
});
}
}
if (deviceAlarmInfos.Count > 0)
{
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("LinerPreassemble"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集内胆预装设备报警信息异常:{ex.Message}");
}
}
}
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆预装设备用电数据");
var plc = _plc.plc;
deviceElectricitys = new List<Record_DeviceElectricity>();
// 地面内胆预装主柜
string[] ground = new string[] { "D7602", "D7604", "D7606", "D7608", "D7610", "D7612", "D7630", "D7634", "D7638", "D7642" };
Record_DeviceElectricity _deviceElectricity_ground = new Record_DeviceElectricity()
{
MonitorId = "E00024_0001"
};
base.ReadDeviceElectricity(ground, plc, ref _deviceElectricity_ground);
if(_deviceElectricity_ground != null)
{
deviceElectricitys.Add(_deviceElectricity_ground);
}
//平台内胆预装远程
string[] platform = new string[] { "D7652", "D7664", "D7666", "D7668", "D7660", "D7662", "D7680", "D7684", "D7688", "D7692" };
Record_DeviceElectricity _deviceElectricity_platform = new Record_DeviceElectricity()
{
MonitorId = "E00024_0002"
};
base.ReadDeviceElectricity(platform, plc, ref _deviceElectricity_platform);
if (_deviceElectricity_platform != null)
{
deviceElectricitys.Add(_deviceElectricity_platform);
}
if(deviceElectricitys.Count > 0)
{
var result = base._deviceElectricityServices.AddAsync(deviceElectricitys);
}
else
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆预装设备用电数据失败,数据为空");
}
Task.Delay(base.EleReadTimer).Wait();
}
else
{
Task.Delay(base.EleReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("LinerPreassemble"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集内胆预装用电数据采集异常:{ex.Message}");
}
}
}
}
}

@ -15,14 +15,14 @@ namespace Aucma.Core.DataCollector.Factory
/// </summary>
public class LinerStoreFactory : DataCollectorFactory
{
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("LinerStore"));
public LinerStoreFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
}
/// <summary>
/// 采集内胆预装、内胆库设备报警信息
/// 采集内胆库设备报警信息
/// </summary>
/// <param name="deviceAlarmInfos"></param>
public override void CollectDeviceAlarmInfo(out List<Record_DeviceAlarmInfo> deviceAlarmInfos)
@ -34,10 +34,10 @@ namespace Aucma.Core.DataCollector.Factory
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆预装、内胆库设备报警信息");
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆库设备报警信息");
var plc = _plc.plc;
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00024" || x.DeviceCode == "E00032");
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00032");
if (deviceParams != null)
{
@ -68,24 +68,71 @@ namespace Aucma.Core.DataCollector.Factory
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(1000 * 5).Wait();
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(1000 * 5).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("LinerStore"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集内胆预装、内胆库设备报警信息异常:{ex.Message}");
base._logger.Error($"采集内胆库设备报警信息异常:{ex.Message}");
}
}
}
public override void CollectDeviceElectricity(out Record_DeviceElectricity deviceElectricity)
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
throw new NotImplementedException();
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆库设备用电数据");
var plc = _plc.plc;
deviceElectricitys = new List<Record_DeviceElectricity>();
string[] address = new string[] { "D7602", "D7604", "D7606", "D7608", "D7610", "D7612", "D7630", "D7634", "D7638", "D7642" };
Record_DeviceElectricity _deviceElectricity_address = new Record_DeviceElectricity()
{
MonitorId = "E00032_0001"
};
base.ReadDeviceElectricity(address, plc, ref _deviceElectricity_address);
if( _deviceElectricity_address != null)
{
deviceElectricitys.Add(_deviceElectricity_address);
}
if(deviceElectricitys.Count > 0 )
{
var result = base._deviceElectricityServices.AddAsync(deviceElectricitys);
}
else
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集内胆库设备用电数据失败,数据为空");
}
Task.Delay(base.EleReadTimer).Wait();
}
else
{
Task.Delay(base.EleReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("LinerStore"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集内胆库设备用电数据采集异常:{ex.Message}");
}
}
}
}
}

@ -12,7 +12,7 @@ namespace Aucma.Core.DataCollector.Factory
/// </summary>
public class PalletizFactory : DataCollectorFactory
{
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Palletiz"));
public PalletizFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
@ -66,12 +66,12 @@ namespace Aucma.Core.DataCollector.Factory
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(1000 * 5).Wait();
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(1000 * 5).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Palletiz"));
}
}
catch(Exception ex)
@ -86,7 +86,7 @@ namespace Aucma.Core.DataCollector.Factory
/// </summary>
/// <param name="deviceElectricity"></param>
/// <exception cref="NotImplementedException"></exception>
public override void CollectDeviceElectricity(out Record_DeviceElectricity deviceElectricity)
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
while (true)
{
@ -97,69 +97,62 @@ namespace Aucma.Core.DataCollector.Factory
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集设备用电数据");
var plc = _plc.plc;
var info = plc.Read("D7602", 40);
deviceElectricitys = new List<Record_DeviceElectricity>();
if (info != null)
string[] ground = new string[] { "D7602", "D7604", "D7606", "D7608", "D7610", "D7612", "D7630", "D7634", "D7638", "D7642" };
Record_DeviceElectricity _deviceElectricity_ground = new Record_DeviceElectricity()
{
deviceElectricity = new Record_DeviceElectricity()
{
MonitorId = "E00002",
CollectTime = DateTime.Now,
RecordTime = DateTime.Now,
};
var ins = ParseAndReverseByteArray(info, 0, info.Length);
#region 数据解析 Delete By Wenjy 2024-03-26 14:04:00 封装解析方法
//int temp = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(0).Take(2).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp2 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(4).Take(6).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp3 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(8).Take(10).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp4 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(12).Take(14).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp5 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(16).Take(18).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp6 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(20).Take(22).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp7 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(24).Take(26).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp8 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(28).Take(30).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp9 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(32).Take(34).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp10 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(36).Take(38).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
//int temp11 = ushort.Parse(StringChange.bytesToHexStr(array(info.Skip(40).Take(42).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
#endregion
if(ins != null)
{
if(ins.Length >= 20)
{
deviceElectricity.Glys = ins[0];
deviceElectricity.Va = ins[2];
deviceElectricity.Vb = ins[4];
deviceElectricity.Vc = ins[6];
deviceElectricity.Ia = ins[14];
deviceElectricity.Ib = ins[16];
deviceElectricity.Ic = ins[18];
deviceElectricity.Zxyg = ins[20];
}
}
MonitorId = "E0003"
};
if(deviceElectricity.Zxyg > 0)
{
var result = base._deviceElectricityServices.AddAsync(deviceElectricity);
}
}
Task.Delay(1000 * 5).Wait();
base.ReadDeviceElectricity(ground, plc, ref _deviceElectricity_ground);
deviceElectricitys.Add(_deviceElectricity_ground);
string[] platform = new string[] { "D7652", "D7664", "D7666", "D7668", "D7660", "D7662", "D7680", "D7684", "D7688", "D7692" };
Record_DeviceElectricity _deviceElectricity_platform = new Record_DeviceElectricity()
{
MonitorId = "E0004"
};
base.ReadDeviceElectricity(platform, plc, ref _deviceElectricity_platform);
deviceElectricitys.Add(_deviceElectricity_platform);
var result = base._deviceElectricityServices.AddAsync(deviceElectricitys);
Task.Delay(base.EleReadTimer).Wait();
}
else
{
Task.Delay(1000 * 5).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
Task.Delay(base.EleReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Palletiz"));
}
}
catch(Exception ex)
catch (Exception ex)
{
base._logger.Error($"成品分垛设备用电数据采集异常:{ex.Message}");
base._logger.Error($"采集成品分垛设备用电数据采集异常:{ex.Message}");
}
}
}
public byte[] array(byte[] data)
{
if (data == null) return null;
for (int i = 0; i < data.Length; i += 2)
{
byte temp = data[i];
data[i] = data[i + 1];
data[i + 1] = temp;
}
return data;
}
/// <summary>
/// 用电数据解析
/// </summary>

@ -0,0 +1,166 @@
using Admin.Core.IService.IService_New;
using Admin.Core.Model.Model_New;
using Aucma.Core.HwPLc;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* LAPTOP-E0N2L34V
* Aucma.Core.DataCollector.Factory
* f88ccab0-cc8a-4d6f-8be8-1a0dbc687b9e
*
* WenJY
* wenjy@mesnac.com
* 2024-03-28 11:53:14
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace Aucma.Core.DataCollector.Factory
{
/// <summary>
/// 箱壳预装数据采集
/// </summary>
public class ShellPreassembleFactory : DataCollectorFactory
{
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("ShellPreassemble"));
public ShellPreassembleFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
}
public override void CollectDeviceAlarmInfo(out List<Record_DeviceAlarmInfo> deviceAlarmInfos)
{
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳预装设备报警信息");
var plc = _plc.plc;
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00019");
if (deviceParams != null)
{
deviceAlarmInfos = new List<Record_DeviceAlarmInfo>();
string batchId = System.Guid.NewGuid().ToString("N");
foreach (var item in deviceParams)
{
base.ReadParamValueByPlc(plc, item.ParamAddress, item.ParamType, out int paramValue);
if (paramValue != 0)
{
deviceAlarmInfos.Add(new Record_DeviceAlarmInfo()
{
BatchId = batchId,
DeviceCode = item.DeviceCode,
DeviceType = "1",
ParamCode = item.ParamCode,
ParamValue = paramValue.ToString(),
AlarmInfo = item.ParamName,
AlarmTime = DateTime.Now,
CreadtedTime = DateTime.Now,
});
}
}
if (deviceAlarmInfos.Count > 0)
{
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("ShellPreassemble"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集箱壳预装设备报警信息异常:{ex.Message}");
}
}
}
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳预装设备用电数据");
var plc = _plc.plc;
deviceElectricitys = new List<Record_DeviceElectricity>();
// 地面箱壳预装远程
string[] ground = new string[] { "D7602", "D7604", "D7606", "D7608", "D7610", "D7612", "D7630", "D7634", "D7638", "D7642" };
Record_DeviceElectricity _deviceElectricity_ground = new Record_DeviceElectricity()
{
MonitorId = "E00019_0001"
};
base.ReadDeviceElectricity(ground, plc, ref _deviceElectricity_ground);
if(_deviceElectricity_ground != null)
{
deviceElectricitys.Add(_deviceElectricity_ground);
}
//平台箱壳预装主柜
string[] platform = new string[] { "D7652", "D7664", "D7666", "D7668", "D7660", "D7662", "D7680", "D7684", "D7688", "D7692" };
Record_DeviceElectricity _deviceElectricity_platform = new Record_DeviceElectricity()
{
MonitorId = "E00019_0002"
};
base.ReadDeviceElectricity(platform, plc, ref _deviceElectricity_platform);
if(_deviceElectricity_platform != null)
{
deviceElectricitys.Add(_deviceElectricity_platform);
}
if(deviceElectricitys.Count > 0)
{
var result = base._deviceElectricityServices.AddAsync(deviceElectricitys);
}
else
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳预装设备用电数据失败,数据为空");
}
Task.Delay(base.EleReadTimer).Wait();
}
else
{
Task.Delay(base.EleReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("ShellPreassemble"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集箱壳库设备用电数据采集异常:{ex.Message}");
}
}
}
}
}

@ -11,18 +11,18 @@ using System.Threading.Tasks;
namespace Aucma.Core.DataCollector.Factory
{
/// <summary>
/// 箱壳预装、箱壳库数据采集
/// 箱壳库数据采集
/// </summary>
public class ShellStoreFactory : DataCollectorFactory
{
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
private PlcModel _plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("ShellStore"));
public ShellStoreFactory(IBaseDeviceParamServices deviceParamServices, IRecordDeviceAlarmInfoServices deviceAlarmInfoServices, IRecordDeviceElectricityServices deviceElectricityServices) : base(deviceParamServices, deviceAlarmInfoServices, deviceElectricityServices)
{
}
/// <summary>
/// 采集箱壳预装、箱壳库设备报警信息
/// 采集箱壳库设备报警信息
/// </summary>
/// <param name="deviceAlarmInfos"></param>
public override void CollectDeviceAlarmInfo(out List<Record_DeviceAlarmInfo> deviceAlarmInfos)
@ -34,10 +34,10 @@ namespace Aucma.Core.DataCollector.Factory
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳预装、箱壳库设备报警信息");
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳库设备报警信息");
var plc = _plc.plc;
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00019" || x.DeviceCode == "E00031");
var deviceParams = base._deviceParamServices.Query(x => x.DeviceCode == "E00031");
if (deviceParams != null)
{
@ -68,24 +68,91 @@ namespace Aucma.Core.DataCollector.Factory
base._deviceAlarmInfoServices.AddAsync(deviceAlarmInfos);
}
}
Task.Delay(1000 * 5).Wait();
Task.Delay(base.AlarmReadTimer).Wait();
}
else
{
Task.Delay(1000 * 5).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("Test"));
Task.Delay(base.AlarmReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("ShellStore"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集箱壳预装、箱壳库设备报警信息异常:{ex.Message}");
base._logger.Error($"采集箱壳库设备报警信息异常:{ex.Message}");
}
}
}
public override void CollectDeviceElectricity(out Record_DeviceElectricity deviceElectricity)
/// <summary>
/// 采集箱壳库设备用电
/// </summary>
/// <param name="deviceElectricitys"></param>
public override void CollectDeviceElectricity(out List<Record_DeviceElectricity> deviceElectricitys)
{
throw new NotImplementedException();
while (true)
{
try
{
if (_plc != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳库设备用电数据");
var plc = _plc.plc;
deviceElectricitys = new List<Record_DeviceElectricity>();
//箱壳主柜
string[] mainCabinet = new string[] { "D7602", "D7604", "D7606", "D7608", "D7610", "D7612", "D7630", "D7634", "D7638", "D7642" };
Record_DeviceElectricity _deviceElectricity_mainCabinet = new Record_DeviceElectricity()
{
MonitorId = "E00031_0001"
};
base.ReadDeviceElectricity(mainCabinet, plc, ref _deviceElectricity_mainCabinet);
if(_deviceElectricity_mainCabinet != null)
{
deviceElectricitys.Add(_deviceElectricity_mainCabinet);
}
//箱壳远程柜
string[] rangeCabinet = new string[] { "D7652", "D7664", "D7666", "D7668", "D7660", "D7662", "D7680", "D7684", "D7688", "D7692" };
Record_DeviceElectricity _deviceElectricity_rangeCabinet = new Record_DeviceElectricity()
{
MonitorId = "E00031_0002"
};
base.ReadDeviceElectricity(rangeCabinet, plc, ref _deviceElectricity_rangeCabinet);
if(_deviceElectricity_rangeCabinet != null)
{
deviceElectricitys.Add(_deviceElectricity_rangeCabinet);
}
if(deviceElectricitys.Count > 0)
{
var result = base._deviceElectricityServices.AddAsync(deviceElectricitys);
}
else
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}采集箱壳库设备用电数据失败,数据为空");
}
Task.Delay(base.EleReadTimer).Wait();
}
else
{
Task.Delay(base.EleReadTimer).Wait();
_plc = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("ShellStore"));
}
}
catch (Exception ex)
{
base._logger.Error($"采集箱壳库设备用电数据采集异常:{ex.Message}");
}
}
}
}
}

@ -26,6 +26,9 @@ namespace Aucma.Core.HwPLc
/// </summary>
/// <returns></returns>
bool DisConnect();
public short[] ReadRandomInt16(string[] address);
/// <summary>
/// 读取byte数据
/// </summary>

@ -513,6 +513,34 @@ namespace Aucma.Core.HwPLc
#endregion
/// <summary>
/// 根据数组读取
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public short[] ReadRandomInt16(string[] address)
{
try
{
var info = melsecMcNet.ReadRandomInt16(address);
if (info.IsSuccess)
{
IsConnected = true;
return info.Content;
}
else
{
Console.WriteLine($"读取失败信息:{info.Message}");
}
}catch (Exception ex)
{
Console.WriteLine($"读取失败信息:{ex.Message}");
}
return null;
}
/// <summary>
/// 读取byte
/// </summary>
@ -521,6 +549,7 @@ namespace Aucma.Core.HwPLc
/// <returns></returns>
public byte[] Read(string address, ushort len)
{
OperateResult<byte[]> readbyte = melsecMcNet.Read(address, len);
if (readbyte.IsSuccess)
{

@ -561,6 +561,14 @@ namespace Aucma.Core.HwPLc
throw new NotImplementedException();
}
/// <summary>
/// 根据数组读取
/// </summary>
/// <param name="address"></param>
/// <returns></returns>
public short[] ReadRandomInt16(string[] address)
{
throw new NotImplementedException();
}
}
}

@ -76,6 +76,7 @@
<ItemGroup>
<ProjectReference Include="..\Admin.Core.Extensions\Admin.Core.Extensions.csproj" />
<ProjectReference Include="..\Aucma.Core.DataCollector\Aucma.Core.DataCollector.csproj" />
</ItemGroup>
<ItemGroup>

@ -1,4 +1,5 @@
using Admin.Core.Common.Helper;
using Admin.Core.Common;
using Admin.Core.Common.Helper;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
@ -34,6 +35,11 @@ namespace Aucma.Core.Palletiz.Business
private readonly AppConfig _appConfig;
private AppConfig appConfig = new AppConfig();
public string storeCode = Appsettings.app("StoreInfo", "PalletizStoreCodeA");
private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
#region 委托事件
/// <summary>
@ -62,6 +68,7 @@ namespace Aucma.Core.Palletiz.Business
_appConfig = new AppConfig();
_spaceinfoService = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
_offlineService = App.ServiceProvider.GetService<IProductOffLineServices>();
HandPalletizViewModel.HandSendEvent += InStore;
// string AA = ExtractNumber("FD01_012");
}
@ -109,9 +116,10 @@ namespace Aucma.Core.Palletiz.Business
/// 入库申请
/// </summary>
/// <param name="spaceArea">货道区域</param>
/// <param name="asciiStr"></param>
/// <param name="asciiStr">20位是正常扫码传输的条码,手动入库传的是人工选择的成品型号</param>
private void InStore(string spaceArea, string asciiStr)
{
RecordInStore recordInstore = new RecordInStore();
String msg = string.Empty;
try
{
@ -125,15 +133,7 @@ namespace Aucma.Core.Palletiz.Business
throw new ArgumentException($"入库申请处理异常:货道区域为空");
}
//if (asciiStr.Contains(";") && asciiStr.Length == BarcodeRef.Length)
//{
// string[] splitStr = asciiStr.Split(";");
// if (splitStr.Length > 1)
// {
// asciiStr = splitStr[1];
// }
//}
_offlineService.GetProductInfosBySnCode(asciiStr, out ProductOffline prodInfo);
@ -143,20 +143,51 @@ namespace Aucma.Core.Palletiz.Business
}
RefreshProductInfoEvent?.Invoke(asciiStr,prodInfo.ProductModel,prodInfo.ProductOrderNo);
GetSpaceInfoByMaterialType(spaceArea, prodInfo, out BaseSpaceInfo laseSpaceinfo,
out BaseSpaceInfo spaceinfo);
bool result = false;
SendInStoreTask(asciiStr,spaceinfo, ref result,Convert.ToInt32(prodInfo.ProductMasterModel),ref msg);
SendInStoreTask(asciiStr,spaceinfo, ref result,Convert.ToInt32(prodInfo.ProductMasterModel),ref msg,out int range);
if (!result)
#region 添加入库记录
recordInstore.StoreCode = storeCode;
recordInstore.StoreArea = spaceArea;
recordInstore.SpaceCode = spaceinfo.SpaceCode;
recordInstore.MaterialType = spaceinfo.MaterialType;
recordInstore.MaterialCode = spaceinfo.MaterialType;
recordInstore.InStoreTime = DateTime.Now;
recordInstore.BarCodeCode = asciiStr;
recordInstore.MaterialName = prodInfo.ProductName;
recordInstore.InStoreAmount = range ;
recordInstore.IsFlag = 0;
recordInstore.CreatedTime = DateTime.Now;
if (asciiStr.Length < 20)
{
recordInstore.EntryPattern = 1;
}
else
{
recordInstore.EntryPattern = 0;
}
_ = _recordInstoreServices.AddAsync(recordInstore).Result;
#endregion
if (!result)
{
msg = msg + "放行失败";
RefreshMsgEvent?.Invoke(msg);
throw new ArgumentException($"入库申请处理异常:入库任务下发至PLC失败");
}
else
{
msg = msg + "放行成功";
RefreshMsgEvent?.Invoke(msg);
List<BaseSpaceInfo> spaceinfos = new List<BaseSpaceInfo>();
@ -169,14 +200,18 @@ namespace Aucma.Core.Palletiz.Business
spaceinfos.Add(spaceinfo);
_spaceinfoService.UpdateSpaceInfo(spaceinfos);
}
}
catch (Exception e)
{
msg =$"入库逻辑处理异常:{e.Message}";
RefreshMsgEvent?.Invoke(msg);
}
}
/// <summary>
/// 通过物料型号获取货道信息
/// </summary>
@ -292,8 +327,10 @@ namespace Aucma.Core.Palletiz.Business
/// <param name="spaceinfo"></param>
/// <param name="result"></param>
/// <exception cref="ArgumentException"></exception>
private void SendInStoreTask(string asciiStr, BaseSpaceInfo spaceinfo, ref bool result,int prodWeight,ref string msg)
private void SendInStoreTask(string asciiStr, BaseSpaceInfo spaceinfo, ref bool result,int prodWeight,ref string msg,out int rangeResult)
{
int spinFlag = -1;
rangeResult = 0;
if (plcCon == null)
{
throw new ArgumentException($"下发入库任务至PLC逻辑异常:Plc连接为空");
@ -304,23 +341,9 @@ namespace Aucma.Core.Palletiz.Business
bool isFlag = true;
int spaceCode = StringChange.ParseToInt(spaceinfo.SpaceCode);
int spinFlag =JudgeRotation(spaceCode, prodWeight);
//int spinFlag = 3; // 转180度发1不转发3
//if (prodWeight < 140)
//{
// if (spaceCode % 2 != 0) //偶数 转180°
// {
// spinFlag = 1; //4
// }
//}
//else if (prodWeight >= 140)
//{
// if (spaceCode % 2 == 0) //偶数 转180°
// {
// spinFlag = 1; //4
// }
//}
if(spinFlag == -1)
spinFlag =JudgeRotation(spaceCode, prodWeight, out int ranges);
rangeResult = ranges;
if (spinFlag == -1)
{
msg = $"成品码:{asciiStr},仓库区域:{spaceinfo.SpaceArea},匹配货道:{spaceinfo.SpaceCode};旋转角度匹配失败,请先设置该型号旋转规则!";
RefreshMsgEvent?.Invoke(msg);
@ -328,9 +351,14 @@ namespace Aucma.Core.Palletiz.Business
}
msg = $"成品码:{asciiStr},仓库区域:{spaceinfo.SpaceArea},匹配货道:{spaceinfo.SpaceCode};旋转:{(spinFlag == 3 ? "0°" : "180°")};下发plc放行信号";
RefreshMsgEvent?.Invoke(msg);
DateTime startTime = DateTime.Now;
while (isFlag)
{
if((DateTime.Now - startTime).TotalSeconds > 15)
{
result = false;
return;
}
bool answerFlag = _plc.ReadBool("B1000");
if (answerFlag)
@ -338,7 +366,8 @@ namespace Aucma.Core.Palletiz.Business
isFlag = false;
}
Task.Delay(1000 * 2).Wait();
Task.Delay(500).Wait();
}
if (spaceinfo.SpaceArea == "A")
@ -368,7 +397,7 @@ namespace Aucma.Core.Palletiz.Business
/// </summary>
/// <param name="prodWeight"></param>
/// <returns></returns>
public int JudgeRotation(int spaceCode,int prodWeight)
public int JudgeRotation(int spaceCode,int prodWeight, out int ranges)
{
try
{
@ -379,11 +408,13 @@ namespace Aucma.Core.Palletiz.Business
{
if (spaceCode % 2 == 0) // 偶数货道
{
return range.EvenSpaceRange == 0 ? 3 : 1;
ranges = range.EvenSpaceRange;
return RangeToInt(range.EvenSpaceRange);
}
else
{
return range.OddSpaceRange == 0 ? 3 : 1;
ranges = range.OddSpaceRange;
return RangeToInt(range.OddSpaceRange);
}
}
}
@ -392,8 +423,22 @@ namespace Aucma.Core.Palletiz.Business
{
Console.WriteLine("JudgeRotation"+ex.Message);
}
ranges = 0;
return -1;
}
public int RangeToInt(int range)
{
int result = -1;
switch (range) {
case 0: result = 3; break;
case 90: result = 1; break;
case 180: result = 4; break;
case 270: result = 2; break;
}
return result;
}
/// <summary>
/// 提取货道号
/// </summary>

@ -8,6 +8,7 @@ using Admin.Core.Repository;
using Admin.Core.Service;
using Admin.Core.Socket;
using Admin.Core.Tasks;
using Aucma.Core.DataCollector;
using Aucma.Core.RunPlc;
using Aucma.Core.Scanner;
using Autofac;
@ -110,6 +111,8 @@ namespace Aucma.Core.Palletiz
// Socket连接扫码器
app.UseTouchSocketMildd(socket);
app.UseDataCollectorExtensions();
}
#region 注册服务

@ -1,16 +1,19 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using Admin.Core.Service;
using Aucma.Core.Palletiz.Business;
using Aucma.Core.Palletiz.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Elasticsearch.Net.Specification.MachineLearningApi;
using log4net;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Forms;
using System.Windows;
namespace Aucma.Core.Palletiz.ViewModels
{
@ -18,115 +21,143 @@ namespace Aucma.Core.Palletiz.ViewModels
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(HandPalletizViewModel));
public static StackInfoModel tempStackInfo = new StackInfoModel();
private readonly IBaseSpaceInfoServices _baseSpaceInfoServices;
private readonly IBaseSpaceInfoServices _baseSpaceInfoServices;
private readonly IRecordInStoreServices _recordInstoreServices;
private readonly ICodeBindingRecordServices? _codeBindingRecordServices;
/// <summary>
/// 手动入库委托
/// </summary>
public delegate void HandSend(string spaceArea, string asciiStr);
public static event HandSend? HandSendEvent;
public HandPalletizViewModel()
{
_baseSpaceInfoServices = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
_recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
Range = 1;
SpaceNo ="001";
PromptInfo("请选择信息下传......", "White");
_codeBindingRecordServices = App.ServiceProvider.GetService<ICodeBindingRecordServices>();
init();
}
#region 分垛信息下传
/// <summary>
/// 分垛信息下传
/// </summary>
[RelayCommand]
public void Save()
public void init()
{
try
List<ProductAllModel> list = _codeBindingRecordServices.GetAllProductModel();
if (list == null || list.Count == 0) return;
list = list.OrderBy(x => x.ProductMasterModel).ToList();
MaterialDataGrid.Clear();
Application.Current.Dispatcher.Invoke(() =>
{
DialogResult cr = MessageBox.Show("是否确认下传分垛信息?", "系统提醒", MessageBoxButtons.OKCancel);
if (cr != DialogResult.OK)
foreach (ProductAllModel info in list)
{
return;
MaterialDataGrid.Add(info);
}
PromptInfo("分垛信息下传中......", "White");
});
}
int range = Range;
int spaceNo =Convert.ToInt32(SpaceNo);
if (spaceNo==0)
{
MessageBox.Show("请选择目的货道!","系统提醒");
return;
}
string hh = "FD01_" + SpaceNo;
Admin.Core.Model.BaseSpaceInfo spaceInfo = _baseSpaceInfoServices.FirstAsync(X => X.StoreCode.Contains("FD") && X.SpaceCode == "FD01_"+SpaceNo).Result;
if (spaceInfo == null)
{
MessageBox.Show("货道未创建!", "系统提醒");
return;
}
}
catch (Exception ex)
#region 鼠标双击事件
/// <summary>
/// 鼠标双击事件
/// </summary>
/// <param name="obj"></param>
public void MouseClick(object obj)
{
var info = SelectedDataItem;
if (info != null)
{
PromptInfo($"分垛信息下传失败:{ex.Message}", "Red");
ProductCode = info.ProductCode;
ProductModel = info.ProductModel;
}
}
#endregion
#region 提示信息
#endregion
private string? msgTxt;
public string? MsgTxt
#region 初始化下拉列表
/// <summary>
/// 初始化下拉列表
/// </summary>
private ProductAllModel selectedDataItem;
public ProductAllModel SelectedDataItem
{
get => msgTxt;
set => SetProperty(ref msgTxt, value);
get { return selectedDataItem; }
set => SetProperty(ref selectedDataItem, value);
}
#endregion
#region 字体颜色
private string? msgColor;
#region 分垛信息下传
/// <summary>
/// 分垛信息下传
/// </summary>
[RelayCommand]
public void Save(Window window)
{
if (string.IsNullOrEmpty(ProductCode))
{
MessageBox.Show("请先选择产品型号");
return;
}
HandSendEvent?.Invoke("A", productCode);
MessageBox.Show("手动入库成功");
window.Close();
// 入库
}
public string? MsgColor
/// <summary>
/// 分垛信息下传
/// </summary>
[RelayCommand]
public void Cancel(Window window)
{
get => msgColor;
set => SetProperty(ref msgColor, value);
window.Close();
}
#endregion
#region 提示信息
#region 初始化datagrid产品信息
/// <summary>
/// 提示信息
/// 初始化物料信息
/// </summary>
/// <param name="mesg">提示信息</param>
/// <param name="color">提示信息颜色</param>
public void PromptInfo(string mesg, string color)
private ObservableCollection<ProductAllModel> materialDataGrid = new ObservableCollection<ProductAllModel>();
public ObservableCollection<ProductAllModel> MaterialDataGrid
{
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
{
MsgTxt = mesg;
MsgColor = color;
}));
get { return materialDataGrid; }
set => SetProperty(ref materialDataGrid, value);
}
#endregion
#region 目的货道
private string spaceNo;
#region 选中条码
private string productCode;
public string SpaceNo
public string ProductCode
{
get => spaceNo;
set => SetProperty(ref spaceNo, value);
get => productCode;
set => SetProperty(ref productCode, value);
}
#endregion
#region 方向
private int range;
public int Range
#region 选中型号
private string productModel;
public string ProductModel
{
get => range;
set => SetProperty(ref range, value);
get => productModel;
set => SetProperty(ref productModel, value);
}
#endregion
}
}

@ -53,6 +53,10 @@ namespace Aucma.Core.Palletiz.ViewModels
_codeBindingRecordServices = App.ServiceProvider.GetService<ICodeBindingRecordServices>();
_offlineService = App.ServiceProvider.GetService<IProductOffLineServices>();
//_baseMaterialInfoServices = App.ServiceProvider.GetService<IBaseMaterialInfoServices>();
if (space == null)
{
SpaceInfo = new BaseSpaceInfo();
}
SpaceInfo = space;
SearchCriteriaViewModel.RefreshConfigDelegateEvent += SaveSearchCriteria;
@ -134,7 +138,7 @@ namespace Aucma.Core.Palletiz.ViewModels
{
MaterialDataGrid.Add(info);
}
});
});
// 加载页面单选框和下拉框
if (space != null)
{
@ -207,6 +211,7 @@ namespace Aucma.Core.Palletiz.ViewModels
if (info != null)
{
PlanInfo = info;
SpaceInfo.MaterialType = info.ProductCode;
SpaceInfo.typeNameA = info.ProductModel;
}

@ -1,6 +1,11 @@
using Aucma.Core.Palletiz.Models;
using Admin.Core.Common;
using Admin.Core.IService;
using Admin.Core.Model;
using Aucma.Core.Palletiz.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Elasticsearch.Net;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@ -14,20 +19,41 @@ namespace Aucma.Core.Palletiz.ViewModels
public partial class StatisticsPageViewModel : ObservableObject
{
public StatisticsPageViewModel() { LoadData(); }
private readonly IRecordInStoreServices? _recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
List<MaterialComplateInfo> materialComplateInfos = new List<MaterialComplateInfo>();
public string storeCodeA = Appsettings.app("StoreInfo", "PalletizStoreCodeA");
public string storeCodeB = Appsettings.app("StoreInfo", "PalletizStoreCodeB");
#region 加载DataGrid数据
private void LoadData()
private async void LoadData()
{
try
{
List<RecordInStore> list = await _recordInstoreServices.QueryAsync(x => x.StoreCode == storeCodeA || x.StoreCode == storeCodeB);
if (list != null && list.Count > 0)
{
foreach (RecordInStore record in list)
{
MaterialDataGrid.Add(record);
}
}
}
catch (Exception ex)
{
Console.WriteLine("" + ex.Message.ToString());
}
//MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
}
#endregion
#region 初始化datagrid
private ObservableCollection<MaterialComplateInfo> materialDataGrid = new ObservableCollection<MaterialComplateInfo>();
public ObservableCollection<MaterialComplateInfo> MaterialDataGrid
private ObservableCollection<RecordInStore> materialDataGrid = new ObservableCollection<RecordInStore>();
public ObservableCollection<RecordInStore> MaterialDataGrid
{
get { return materialDataGrid; }
set

@ -5,96 +5,143 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" FontFamily="Microsoft YaHei"
Title="手动分垛" Height="800" Width="800" Name="window" Background="White"
ResizeMode="NoResize" Topmost="True">
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
Title="手动分垛" Height="800" Width="1300" Name="window" Background="White"
ResizeMode="NoResize">
<Grid>
<Grid.ColumnDefinitions>
<Window.Resources>
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
<Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0" />
<Setter Property="Width" Value="30" />
</Style>
</Style.Resources>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="SmallChange" Value="1" />
</Style>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<!--<Setter Property="Height" Value="40"/>-->
<Setter Property="FontSize" Value="16"/>
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="48"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="#1254AB" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<Border Grid.Column="0" BorderBrush="#1254AB" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="6*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="手动分垛" FontSize="25" Foreground="#FFFFFF" Margin="10,0,0,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0" Visibility="Collapsed">
<TextBlock Text="成品码:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<TextBox x:Name="txtBarCode" FontSize="20" Foreground="white" Height="50" Width="400" Style="{x:Null}" Margin="20 0" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="所属仓库:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_A" Content="A 库" FontSize="20" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Cursor="Hand" Click="btn_A_Click" />
<Button x:Name="btn_B" Content="B 库" FontSize="20" IsEnabled="False" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_B_Click"/>
</StackPanel>
<WrapPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<WrapPanel Height="50" Orientation="Horizontal" VerticalAlignment="Center" Margin="0 10 0 0">
<TextBlock Text="目的货道:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
</WrapPanel>
<TextBlock x:Name="btn_spaceTemp" Text="{Binding SpaceNo,Mode=TwoWay}" Visibility="Collapsed" />
<WrapPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="5 0 0 0">
<Button x:Name="btn_space1" Content="1" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="0 0 10 0" Click="btn_space1_Click"/>
<Button x:Name="btn_space2" Content="2" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space2_Click"/>
<Button x:Name="btn_space3" Content="3" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space3_Click"/>
<Button x:Name="btn_space4" Content="4" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space4_Click"/>
<Button x:Name="btn_space5" Content="5" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space5_Click"/>
<Button x:Name="btn_space6" Content="6" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space6_Click"/>
<Button x:Name="btn_space7" Content="7" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space7_Click"/>
<Button x:Name="btn_space8" Content="8" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space8_Click"/>
<Border Grid.Row="1" BorderThickness="4" >
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Left" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedDataItem}" SelectionChanged="DataGrid_SelectionChanged" >
<DataGrid.Columns>
<!--<DataGridTextColumn Binding="{Binding OrderCode}" Width="*" Header="订单编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTextColumn Binding="{Binding ProductCode}" Width="3*" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductName}" Width="5*" Header="产品名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductModel}" Width="3*" Header="产品型号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding ProductMasterModel}" Width="*" Header="产品大类" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</WrapPanel>
<WrapPanel Orientation="Horizontal" VerticalAlignment="Center" Height="50" Margin="140 5 0 0">
</Border>
<Grid Grid.Row="2">
<Label Content="产品编码:" Foreground="White" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="108,0,0,0" />
<TextBox HorizontalAlignment="Left" Text="{Binding ProductCode}" Foreground="White" FontSize="22" Margin="230,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="266"/>
<Label Content="产品型号:" Foreground="White" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="530,0,0,0" />
<TextBox HorizontalAlignment="Left" Text="{Binding ProductModel}" Foreground="White" FontSize="22" Margin="660,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" Width="303"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 10 0">
<Button Content="确 认" FontSize="20" Command="{Binding SaveCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="100" />
<Button Content="取 消" FontSize="20" Command="{Binding CancelCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Foreground="white" Margin="10,0,0,0" Height="50" BorderBrush="#FF9900" Width="100" />
</StackPanel>
</Grid >
<Button x:Name="btn_space9" Content="9" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space9_Click"/>
<Button x:Name="btn_space10" Content="10" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space10_Click"/>
<Button x:Name="btn_space11" Content="11" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space11_Click"/>
<Button x:Name="btn_space12" Content="12" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space12_Click"/>
<Button x:Name="btn_space13" Content="13" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space13_Click"/>
<Button x:Name="btn_space14" Content="14" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space14_Click"/>
<!--<Button x:Name="btn_space15" Content="15" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space15_Click"/>
<Button x:Name="btn_space16" Content="16" FontSize="15" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" Margin="10 0" Click="btn_space16_Click"/>-->
</WrapPanel>
</WrapPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock x:Name="btn_RangeTemp" Text="{Binding Range,Mode=TwoWay}" />
<TextBlock Text="转向方向:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="Forward" Content="正向90" FontSize="20" Background="Lime" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_left_Click" />
<Button x:Name="Reverse" Content="逆向90" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0,0.5" Margin="20 0 20 0" Click="btn_right_Click"/>
<Button x:Name="Reverse180" Content="逆向180" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="115" RenderTransformOrigin="0,0.5" Margin="20 0 20 0" Click="btn_right180_Click"/>
<Button x:Name="Unchanged" Content="不 转" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0,0.5" Click="btn_unchanged_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0" Visibility="Collapsed">
<TextBlock Text="转向角度:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<Button x:Name="btn_range90" Content="90°" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Click="btn_range90_Click" />
<Button x:Name="btn_range0" Content="0°" FontSize="20" Background="DarkCyan" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="103" RenderTransformOrigin="0.5,0.5" Margin="20 0" Click="btn_range0_Click"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="提示信息:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,50,0" VerticalAlignment="Center" />
<TextBlock Text="{Binding MsgTxt}" Foreground="{Binding MsgColor,Mode=TwoWay}" FontWeight="Bold" FontSize="20" Width="400" Height="35"/>
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 10 0">
<Button Content="保 存" FontSize="20" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="100" />
<Button Content="取 消" FontSize="20" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Foreground="white" Margin="10,0,0,0" Height="50" BorderBrush="#FF9900" Width="100" Click="Button_Click_1" />
</StackPanel>
</Grid>
</Border>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Window>

@ -21,432 +21,22 @@ namespace Aucma.Core.Palletiz.Views
/// </summary>
public partial class HandPalletizView : Window
{
private string store = "A";
private int space = 1;
/// <summary>
/// 转向 1正向 2:反向 3:不变
/// </summary>
private int spaceDirection = 1;
/// <summary>
/// 转向角度 1 90
/// </summary>
private int range = 1;
HandPalletizViewModel viewModel = new HandPalletizViewModel();
public HandPalletizView()
{
InitializeComponent();
this.DataContext = new HandPalletizViewModel();
this.DataContext = viewModel;
}
#region 所属仓库选择
private void btn_A_Click(object sender, RoutedEventArgs e)
private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
this.btn_A.Background = Brushes.Lime;
this.btn_B.Background = Brushes.DarkCyan;
store = "A";
}
private void btn_B_Click(object sender, RoutedEventArgs e)
{
this.btn_A.Background = Brushes.DarkCyan;
this.btn_B.Background = Brushes.Lime;
store = "B";
}
#endregion
#region 目的货道选择
private void btn_space1_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.Lime;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "001";
}
private void btn_space2_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.Lime;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "002";
}
private void btn_space3_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.Lime;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "003";
}
private void btn_space4_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.Lime;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "004";
}
private void btn_space5_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.Lime;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "005";
}
private void btn_space6_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.Lime;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "006";
viewModel.MouseClick(sender);
}
private void btn_space7_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.Lime;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "007";
}
private void btn_space8_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.Lime;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "008";
}
private void btn_space9_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.Lime;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "009";
}
private void btn_space10_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.Lime;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "010";
}
private void btn_space11_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.Lime;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "011";
}
private void btn_space12_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.Lime;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "012";
}
private void btn_space13_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.Lime;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "013";
}
private void btn_space14_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.Lime;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "014";
}
private void btn_space15_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.Lime;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "015";
}
private void btn_space16_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.Lime;
this.btn_spaceTemp.Text = "016";
}
#endregion
#region 转向
private void btn_left_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.Lime;
Reverse.Background = Brushes.DarkCyan;
Unchanged.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "1";
}
private void btn_right_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.Lime;
Unchanged.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "2";
}
private void btn_right180_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.Lime;
Unchanged.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "4";
}
private void btn_unchanged_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.DarkCyan;
Unchanged.Background = Brushes.Lime;
this.btn_RangeTemp.Text = "3";
}
#endregion
#region 转向角度设置Brushes.DarkCyan
private void btn_range90_Click(object sender, RoutedEventArgs e)
{
btn_range90.Background = Brushes.Lime;
btn_range0.Background = Brushes.DarkCyan;
//btn_range270.Background = Brushes.DarkCyan;
range = 90;
}
private void btn_range0_Click(object sender, RoutedEventArgs e)
{
btn_range90.Background = Brushes.DarkCyan;
btn_range0.Background = Brushes.Lime;
// btn_range270.Background = Brushes.DarkCyan;
range = 0;
}
#endregion
private void Button_Click_1(object sender, RoutedEventArgs e)
{
this.window.Close();
}
}
}

@ -212,7 +212,7 @@
</Border>
</Grid>-->
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,0">
<Button Content="异常入库" FontSize="18" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="异常入库" FontSize="18" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0" Click="Minimized_Click"/>
<Button Content="转向设置" FontSize="18" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="#5283D7" BorderBrush="#5283D7" Margin="0,0,10,0" Click="Exit_Click"/>
<Button Content="{Binding InStoreAmount}" FontSize="18" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="150" Height="40" Background="Transparent" Margin="0,0,10,0"/>
</StackPanel>

@ -33,5 +33,11 @@ namespace Aucma.Core.Palletiz.Views
SetRangeWindow window = new SetRangeWindow();
window.ShowDialog();
}
private void Minimized_Click(object sender, RoutedEventArgs e)
{
HandPalletizView window = new HandPalletizView();
window.ShowDialog();
}
}
}

@ -234,8 +234,9 @@
</ComboBox>
</StackPanel>-->
<StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="清除型号" FontSize="23" Command="{Binding DeleteCommand}" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Margin="0,0,10,0" VerticalAlignment="Center" Height="50" Width="130" />
<Button Content="保 存" FontSize="23" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="20,0,10,0" Height="50" Width="130" />
<Button Content="手动入库" FontSize="23" Command="{Binding HandCommand}" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Margin="0,0,10,0" VerticalAlignment="Center" Height="50" Width="130" Visibility="Collapsed"/>
<Button Content="清除型号" FontSize="23" Command="{Binding DeleteCommand}" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0" VerticalAlignment="Center" Height="50" Width="130" />
<Button Content="保 存" FontSize="23" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Height="50" Width="130" />
</StackPanel>
</Grid>
</Border>

@ -83,12 +83,16 @@
<Label Foreground="White" FontSize="20" Content="奇数货道旋转角度" HorizontalAlignment="Left" Margin="725,0,0,0" VerticalAlignment="Center"/>
<ComboBox x:Name="OddComboBox" SelectedItem="{Binding SelectedOddNumber, Mode=TwoWay, Converter={StaticResource StringToIntConverter}}" HorizontalAlignment="Left" Margin="915,34,0,0" VerticalAlignment="Top" Width="120" FontSize="25" Foreground="White">
<ComboBoxItem Content="0" Foreground="Blue"/>
<ComboBoxItem Content="90" Foreground="Blue"/>
<ComboBoxItem Content="180" Foreground="Blue" />
<ComboBoxItem Content="270" Foreground="Blue"/>
</ComboBox>
<Label Foreground="White" FontSize="20" Content="偶数货道旋转角度" HorizontalAlignment="Left" Margin="1089,0,0,0" VerticalAlignment="Center"/>
<ComboBox x:Name="EvenComboBox" SelectedItem="{Binding SelectedEvenNumber, Mode=TwoWay, Converter={StaticResource StringToIntConverter}}" HorizontalAlignment="Left" Margin="1298,0,0,0" Width="120" FontSize="25" Foreground="White">
<ComboBoxItem Content="0" Foreground="Blue"/>
<ComboBoxItem Content="90" Foreground="Blue"/>
<ComboBoxItem Content="180" Foreground="Blue" />
<ComboBoxItem Content="270" Foreground="Blue"/>
</ComboBox>

@ -7,8 +7,8 @@
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
xmlns:cvt="clr-namespace:Aucma.Core.Palletiz.ConvertTo"
mc:Ignorable="d" FontFamily="Microsoft YaHei"
d:DesignHeight="450"
d:DesignWidth="800">
d:DesignHeight="1000"
d:DesignWidth="1800">
<UserControl.Resources>
<cvt:MultiBindingConverter x:Key="QueryConvert"></cvt:MultiBindingConverter>
@ -106,19 +106,19 @@
</Button>-->
</WrapPanel>
<UniformGrid Grid.Row="1">
<DataGrid Grid.Row="0" ItemsSource="{Binding MaterialDataGrid}"
<DataGrid ItemsSource="{Binding MaterialDataGrid}"
ColumnHeaderHeight="45" FontSize="18"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="0.5*"/>
<DataGridTextColumn Binding="{Binding ProductPlanCode}" Header="计划编号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料名称" Width="3*" />
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="*" />
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成数量" Width="*" />
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" Visibility="Collapsed"/>
<DataGridTextColumn Binding="{Binding BarCodeCode}" Header="成品条码" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialType}" Header="成品型号" Width="3*" />
<DataGridTextColumn Binding="{Binding StoreArea}" Header="区域" Width="1*" />
<DataGridTextColumn Binding="{Binding InStoreAmount}" Header="旋转角度" Width="*" />
<DataGridTextColumn Binding="{Binding InStoreTime,StringFormat=\{0:yyyy-MM-dd HH:mm\}}" Header="入库时间" Width="2*" />
</DataGrid.Columns>
</DataGrid>

@ -198,6 +198,54 @@
"Enabled": true,
"IP": "10.10.92.80", //10.10.92.80
"Port": 2015
},
{
"Id": 2,
"EquipName": "ShellStore",
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.22",
"Port": 2016
},
{
"Id": 3,
"EquipName": "LinerStore",
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.29",
"Port": 2016
},
{
"Id": 4,
"EquipName": "ShellPreassemble",
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.10",
"Port": 2014
},
{
"Id": 5,
"EquipName": "LinerPreassemble",
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.1",
"Port": 2014
},
{
"Id": 6,
"EquipName": "FoamBack",
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.49",
"Port": 2014
},
{
"Id": 7,
"EquipName": "Palletiz",
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.80", //10.10.92.80
"Port": 2015
}
],
"StoreInfo": {

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.3.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fba8cd4d68ad6743f2dbb1218c1a88c540b73c72")]
[assembly: System.Reflection.AssemblyProductAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyTitleAttribute("HwControlLib")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

@ -0,0 +1 @@
884193e333d4b722a3816ea6e579b624e393398a42dd9b3834e4ef7fa5893d77

@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net6.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = HwControlLib
build_property.ProjectDir = E:\桌面\AUCMA_SCADA\HwControlLib\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

@ -0,0 +1,20 @@
HwControlLib
1.0.0.0
library
C#
.cs
E:\桌面\AUCMA_SCADA\HwControlLib\obj\Debug\net6.0-windows\
HwControlLib
none
false
TRACE;DEBUG;NET;NET6_0;NETCOREAPP
1204305769
71208292394
194-2005446070
Themes\Generic.xaml;
False
Loading…
Cancel
Save