wenjy 10 months ago
commit abc138f620

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Common")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
87b97d6c98969839e436c60fdc3421de8c552f08c2560e1a3506756349f059ca
3c08b2a6f95957043123cba0d01dcd1675663fc7

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Common\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.EventBus")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
94521fa37ccae9da584ae5e86109853076c87d0aaf3b728988e51b5bc39def10
2af60005099f8dd0481f84ac0dfadb89cc4b6f1d

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.EventBus\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Extensions")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
1a85c36c93195e02d5a49ae941a1820e517b1c55eb7754d95d708227a011967f
790ffd47e6e46a3c8a83558ad3550154a5c81377

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Extensions\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
06b9d01697118aa7a5c067a4ed4b0a97698bf8dc79c742ff3e7c7766490782da
7d60a94dd38c10522cbfe4a021ccb6e9c5da0354

@ -1,5 +1,3 @@
is_global = true
build_property.RootNamespace = Admin.Core.FrameWork
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.FrameWork\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.FrameWork\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
b0c2c29c02c77bb6467ff1ba47c4172777e8b9aec37b8342238d162cb04a0157
80bb097f76aa594dc58289065a284d1acbd8bdff

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.IRepository\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.IService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
c94077e4a0c8b84c063576bac27f1f3a9262ce83e37f421e82ee10b293c2b66e
51b8351ca3dc5fa8344fbf501d63c1eff37c8f9c

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.IService\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Model")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
6afd04c8bfb0e354b0543d656eed46dacc31648edd00c8f90420884218ca8f4a
ef9752cf3f9e33d53832c154eeba975830dced91

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Model\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
9771f5d2dc632a8ee6d657205f28805a84fffd7a1dfc02caabb7880fd5fd37bb
0868e6bde5b49a65a126b91d794e990427a11761

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.RealTimeService\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Repository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
80a5a4b20c7c11950e6041527348852d63a320b24b0a365d4d09b2bfb4dc3c9b
046606c52f7e20e88e6dd5ffc01e33664c4b9ff8

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Repository\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[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 @@
683bd585b7172b3c819f4847947eaf3b0cf8c228d1707cd24393bf585c096173
dbec6c73777a8ebf7006f00f1928199755951ac1

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Serilog.Es\

@ -116,6 +116,8 @@ namespace Admin.Core.Service
/// <param name="printName"></param>
/// <returns></returns>
public List<ProductAllModel> GetAllProductModel()
{
try
{
var _db = this.BaseDal.Db;
@ -123,6 +125,12 @@ namespace Admin.Core.Service
return list;
}
catch (Exception ex)
{
Console.WriteLine("GetAllProductModel异常:" + ex.Message.ToString());
}
return null;
}
}

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Service")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
a13c5b5d999a9ffa4524dd8112071bede87cef1ae9dde3b78e3bcdd650215a21
ff8a17c10bdbb7dcf5bd28c26639be5ea4bbf542

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Service\

@ -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+cdd424583775fb2b688fe0d97585da2be8a6b929")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.Tasks")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
2c398f4612cf5ebc7de26de93992260233e8a8d28cdca2fdf898eb08e59778c6
da4240456d30e56fa6c5e71babf5565adb3e1436

@ -8,6 +8,4 @@ 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.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.ProjectDir = E:\c#\AUCMA\new\Admin.Core.Tasks\

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.CodeBinding.Common
{
public class SpeechStr
{
private static readonly Lazy<SpeechStr> lazy = new Lazy<SpeechStr>(() => new SpeechStr());
public static SpeechStr Instance {
get
{
return lazy.Value;
}
}
public void speech(string str) {
SpeechSynthesizer speech = new SpeechSynthesizer();
speech.Rate = 3;//设置语速
speech.Volume = 100;//设置音量
speech.SelectVoice("Microsoft Huihui Desktop");//设置播音员(中文)
speech.SpeakAsync(str);
}
}
}

@ -71,11 +71,11 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Admin.Core.Extensions\Admin.Core.Extensions.csproj" />
<ProjectReference Include="..\Aucma.Core.DataCollector\Aucma.Core.DataCollector.csproj" />
</ItemGroup>
<ItemGroup>

@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
namespace Aucma.Core.Palletiz.ViewModels
{
@ -96,6 +97,7 @@ namespace Aucma.Core.Palletiz.ViewModels
[RelayCommand]
public void Save(Window window)
{
Console.WriteLine(Area);
if (string.IsNullOrEmpty(ProductCode))
{
MessageBox.Show("请先选择产品型号");
@ -147,6 +149,18 @@ namespace Aucma.Core.Palletiz.ViewModels
#endregion
/// <summary>
/// 区域
/// </summary>
private ComboBoxItem area;
public ComboBoxItem Area
{
get { return area; }
set => SetProperty(ref area, value);
}
#region 选中型号
private string productModel;

@ -6,8 +6,8 @@ using Aucma.Core.Palletiz.Models;
using Microsoft.Extensions.DependencyInjection;
using System.Collections.ObjectModel;
using System.Linq;
using GalaSoft.MvvmLight;
using Aucma.Core.Palletiz.Views;
using CommunityToolkit.Mvvm.ComponentModel;
/*
*
@ -15,7 +15,7 @@ using Aucma.Core.Palletiz.Views;
*/
namespace Aucma.Core.Palletiz.ViewModels
{
internal class IndexControlViewModel : ViewModelBase
internal class IndexControlViewModel : ObservableObject
{
private InStoreBusiness inStoreBusiness;
@ -42,6 +42,7 @@ namespace Aucma.Core.Palletiz.ViewModels
this.Init();
InStoreAmount = inStoreAmount + "19";
InStoreTaskContent = new StatisticsPageView();
}
#region 参数定义
@ -50,65 +51,60 @@ namespace Aucma.Core.Palletiz.ViewModels
public string ProductSNCode
{
get { return this.productSNCode; }
set
{
productSNCode = value;
RaisePropertyChanged(nameof(ProductSNCode));
}
set => SetProperty(ref productSNCode, value);
}
public string productModel = string.Empty;
public string ProductModel
{
get { return this.productModel; }
set
{
productModel = value;
RaisePropertyChanged(nameof(ProductModel));
}
set => SetProperty(ref productModel, value);
}
public string orderCode = string.Empty;
public string OrderCode
{
get { return this.orderCode; }
set
{
orderCode = value;
RaisePropertyChanged(nameof(OrderCode));
}
set => SetProperty(ref orderCode, value);
}
public string productScanTime = string.Empty;
public string ProductScanTime
{
get { return this.productScanTime; }
set
{
productScanTime = value;
RaisePropertyChanged(nameof(ProductScanTime));
}
set => SetProperty(ref productScanTime, value);
}
public string msg = string.Empty;
public string Msg
{
get { return this.msg; }
set
{
msg = value;
RaisePropertyChanged(nameof(Msg));
}
set => SetProperty(ref msg, value);
}
public string inStoreAmount = "入库数量:";
public string InStoreAmount
{
get { return this.inStoreAmount; }
set
{
inStoreAmount = value;
RaisePropertyChanged(nameof(InStoreAmount));
set => SetProperty(ref inStoreAmount, value);
}
public System.Windows.Controls.UserControl _content;
public System.Windows.Controls.UserControl InStoreTaskContent
{
get { return this._content; }
set => SetProperty(ref _content, value);
}
/// <summary>
@ -119,7 +115,8 @@ namespace Aucma.Core.Palletiz.ViewModels
public ObservableCollection<BaseSpaceInfo> AreaA_SpaceInfo
{
get { return _areaA_SpaceInfo; }
set { _areaA_SpaceInfo = value; RaisePropertyChanged(nameof(AreaA_SpaceInfo)); }
set => SetProperty(ref _areaA_SpaceInfo, value);
}
/// <summary>
@ -130,7 +127,8 @@ namespace Aucma.Core.Palletiz.ViewModels
public ObservableCollection<BaseSpaceInfo> AreaB_SpaceInfo
{
get { return _areaB_SpaceInfo; }
set { _areaB_SpaceInfo = value; RaisePropertyChanged(nameof(AreaB_SpaceInfo)); }
set => SetProperty(ref _areaB_SpaceInfo, value);
}
#endregion
@ -184,23 +182,23 @@ namespace Aucma.Core.Palletiz.ViewModels
}
var info2 = inStoreBusiness.GetBaseSpaceinfos("A");
info2 = info2.OrderBy(x => x.ObjId).ToList();
if (info2 != null)
{
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
if (spaceItemsB.Count > 0)
{
spaceItemsB.Clear();
}
foreach (var item in info2)
{
spaceItemsB.Add(item);
}
AreaB_SpaceInfo = spaceItemsB;
}));
}
//var info2 = inStoreBusiness.GetBaseSpaceinfos("A");
//info2 = info2.OrderBy(x => x.ObjId).ToList();
//if (info2 != null)
//{
// App.Current.Dispatcher.BeginInvoke((Action)(() =>
// {
// if (spaceItemsB.Count > 0)
// {
// spaceItemsB.Clear();
// }
// foreach (var item in info2)
// {
// spaceItemsB.Add(item);
// }
// AreaB_SpaceInfo = spaceItemsB;
// }));
//}
}
}

@ -22,6 +22,15 @@ namespace Aucma.Core.Palletiz.ViewModels
{
public partial class MainWindowViewModel : ObservableObject
{
/// <summary>
/// 扫描记录刷新
/// </summary>
public delegate void RefreshInfo();
public static event RefreshInfo? RefreshInfoEvent;
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel));
private IndexPageView firstPage = new IndexPageView();//首页
private StatisticsPageView recordPage = new StatisticsPageView();
@ -215,6 +224,7 @@ namespace Aucma.Core.Palletiz.ViewModels
UserContent = firstPage;
break;
case "RecordPage":
RefreshInfoEvent?.Invoke();
UserContent = recordPage;
break;
case "PalletizPage":

@ -18,25 +18,38 @@ namespace Aucma.Core.Palletiz.ViewModels
{
public partial class StatisticsPageViewModel : ObservableObject
{
public StatisticsPageViewModel() { LoadData(); }
// private static readonly Lazy<StatisticsPageViewModel> lazy = new Lazy<StatisticsPageViewModel>(() => new StatisticsPageViewModel());
// public static StatisticsPageViewModel Instance => lazy.Value;
public StatisticsPageViewModel() {
MainWindowViewModel.RefreshInfoEvent += LoadData;
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 async void LoadData()
{
//Task.Run(() =>
//{
try
{
List<RecordInStore> list = await _recordInstoreServices.QueryAsync(x => x.StoreCode == storeCodeA || x.StoreCode == storeCodeB);
List<RecordInStore> list = await _recordInstoreServices.QueryAsync(x => (x.StoreCode == storeCodeA || x.StoreCode == storeCodeB) && x.InStoreTime >= DateTime.Today);
if (list != null && list.Count > 0)
{
list.OrderByDescending(x => x.InStoreTime);
foreach (RecordInStore record in list)
{
App.Current.Dispatcher.Invoke(() =>
{
MaterialDataGrid.Add(record);
});
}
}
}
@ -45,6 +58,8 @@ namespace Aucma.Core.Palletiz.ViewModels
Console.WriteLine("" + ex.Message.ToString());
}
// });
//MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉SC", PlanAmount = 50, CompleteAmount = 10 });
}
@ -71,27 +86,25 @@ namespace Aucma.Core.Palletiz.ViewModels
[RelayCommand]
private void ExecQuery(object obj)
{
string result =(string)obj;
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
{
if (!string.IsNullOrEmpty(result))
string result = (string)obj;
List<RecordInStore> list = _recordInstoreServices.QueryAsync(x => (x.StoreCode == storeCodeA || x.StoreCode == storeCodeB) && x.BarCodeCode.Contains(result)).Result;
if (list != null && list.Count > 0)
{
MaterialDataGrid.Clear();
//foreach (MaterialComplateInfo info in materialDataGrid)
//{
// MaterialDataGrid.Add(info);
//}
}
else
foreach (RecordInStore record in list)
{
MaterialDataGrid.Clear();
LoadData();
App.Current.Dispatcher.Invoke(() =>
{
MaterialDataGrid.Add(record);
});
}
//Datalist.Insert(0, Datalist[Datalist.Count - 1]);
//Datalist.RemoveAt(Datalist.Count - 1);
}));
}
}
#endregion
}

@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" FontFamily="Microsoft YaHei"
Title="手动分垛" Height="800" Width="1300" Name="window" Background="White"
Title="手动分垛" Height="800" Width="1600" Name="window" Background="White"
ResizeMode="NoResize">
<Window.Resources>
@ -126,11 +126,18 @@
</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="Top" HorizontalAlignment="Left" Margin="230,47,0,0" RenderTransformOrigin="-1.095,0.883" />
<ComboBox x:Name="AreaComboBox" SelectedItem="{Binding Area}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" FontSize="25" Foreground="White" Margin="367,42,0,0">
<ComboBoxItem Content="A" Foreground="Blue"/>
<ComboBoxItem Content="B" Foreground="Blue"/>
</ComboBox>
<Label Content="产品编码:" Foreground="White" FontSize="22" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="509,42,0,0" />
<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"/>
<TextBox HorizontalAlignment="Left" Text="{Binding ProductCode}" Foreground="White" FontSize="22" Margin="616,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="266"/>
<Label Content="产品型号:" Foreground="White" FontSize="22" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="919,42,0,0" />
<TextBox HorizontalAlignment="Left" Text="{Binding ProductModel}" Foreground="White" FontSize="22" Margin="1026,38,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="304"/>
<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" />

@ -153,15 +153,23 @@
<ContentControl x:Name="ctrl" Width="{Binding ActualWidth, ElementName=areaA_outerBorder}" Margin="5,5">
<ContentControl.Style>
<Style TargetType="ContentControl">
<Setter Property="Height" Value="40" />
<Setter Property="Height" Value="35" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border Background="#4D96E0" >
<!--<Label Content="{Binding SpaceName}" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
<Button Command="{Binding DataContext.UpdateInStoreFlagCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding ObjId}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="{Binding typeNameA}" Foreground="White" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
<Button Command="{Binding DataContext.UpdateInStoreFlagCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding ObjId}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding SpaceCode}" Foreground="White" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="{Binding typeNameA}" Foreground="White" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="50 0 0 0" />
</Grid>
</Button>
</Border>
</ControlTemplate>
@ -169,7 +177,7 @@
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding SpaceType}" Value="2">
<Setter Property="Height" Value="70" />
<Setter Property="Height" Value="60" />
</DataTrigger>
</Style.Triggers>
</Style>
@ -221,15 +229,15 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="4*"/>
<!--<ColumnDefinition Width="4*"/>-->
</Grid.ColumnDefinitions>
<DataGrid Grid.Column="0" Name="DG" ItemsSource="{Binding InstoreTask}" Background="Transparent"
<!--<DataGrid Grid.Column="0" Name="DG" ItemsSource="{Binding InstoreTask}" Background="Transparent"
FontSize="20" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False"
Foreground="#FFFFFF" >
<!--resourceStyle 399行修改选中字体颜色-->
--><!--resourceStyle 399行修改选中字体颜色--><!--
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding taskCode}" Header="序号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding materialCode}" Header="物料编码" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
@ -238,9 +246,12 @@
<DataGridTextColumn Binding="{Binding createTime,StringFormat=\{0:MM月dd日 HH:mm\}}" Header="扫描时间" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</DataGrid>-->
<Border Grid.Column="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,25,2,2">
<ContentControl Content="{Binding InStoreTaskContent}"/>
</Border>
<!--日志信息-->
<Border Grid.Column="1" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="1,0,0,0">
<!--<Border Grid.Column="1" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="1,0,0,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
@ -254,12 +265,12 @@
<TextBlock Text="系统监控" FontSize="20" FontWeight="Bold" Foreground="#0288d1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--日志信息-->
--><!--日志信息--><!--
<Border Grid.Row="1" BorderBrush="Green" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<ListBox x:Name="listBox" ItemsSource="{Binding LogInfoListBox}" FontSize="15" Foreground="#FFFFFF" Background="Transparent" BorderBrush="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"/>
</Border>
</Grid>
</Border>
</Border>-->
</Grid>
</Border>
</Grid>

@ -61,7 +61,7 @@
<StackPanel Grid.Row="1" Height="50" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left">
<Button Content="实时监控" x:Name="FirstPage" FontSize="20" Height="40" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FirstPage}" Margin="5 0" />
<Button Content="扫描记录" x:Name="RecordPage" FontSize="20" Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RecordPage}" />
<Button Content="分垛库设置" x:Name="PalletizPage" FontSize="20" Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=PalletizPage}" />
<!--<Button Content="分垛库设置" x:Name="PalletizPage" FontSize="20" Height="40" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=PalletizPage}" />-->
<Button Content="键 盘" x:Name="TabTip" FontSize="20" Height="40" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" FontSize="20" Height="40" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" FontSize="20" Height="40" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Width="100" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>

@ -115,7 +115,7 @@
<DataGrid.Columns>
<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 MaterialName}" 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*" />

@ -198,54 +198,6 @@
"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,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;
using System.Threading.Tasks;
namespace Aucma.Core.CodeBinding.Common
{
public class SpeechStr
{
private static readonly Lazy<SpeechStr> lazy = new Lazy<SpeechStr>(() => new SpeechStr());
public static SpeechStr Instance {
get
{
return lazy.Value;
}
}
public void speech(string str) {
SpeechSynthesizer speech = new SpeechSynthesizer();
speech.Rate = 3;//设置语速
speech.Volume = 100;//设置音量
speech.SelectVoice("Microsoft Huihui Desktop");//设置播音员(中文)
speech.SpeakAsync(str);
}
}
}
Loading…
Cancel
Save