add new old box foam

dev
liulb@mesnac.com 1 year ago
parent d5b7650763
commit 7d409fe1a2

@ -1421,6 +1421,51 @@
主键标识
</summary>
</member>
<member name="T:Admin.Core.Model.OldBoxFoamData">
<summary>
拆分的SAP BOM 信息
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.ObjId">
<summary>
主键
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.Fixtureboxtype">
<summary>
夹具箱型
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.Fixturestatus">
<summary>
夹具状态
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.Production">
<summary>
产量
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.CuringTimeSettingValue">
<summary>
固化时间设定值
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.ActualValue">
<summary>
固化时间实际值
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.CreatedTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.UpdatedTime">
<summary>
更新时间
</summary>
</member>
<member name="T:Admin.Core.Model.Perfusion_Alarm">
<summary>
灌注告警
@ -3696,6 +3741,21 @@
创建时间
</summary>
</member>
<member name="T:Admin.Core.Model.ViewModels.WorkTime">
<summary>
条码绑定扫描类型统计
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.WorkTime.startTime">
<summary>
开始时间
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.WorkTime.endTime">
<summary>
结束时间
</summary>
</member>
<member name="T:Admin.Core.Model.PlanMaintenanceView">
<summary>
工位信息

@ -0,0 +1,12 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
namespace Admin.Core.IRepository
{
/// <summary>
/// IOldBoxFoamDataRepository
/// </summary>
public interface IOldBoxFoamDataRepository : IBaseRepository<OldBoxFoamData>
{
}
}

@ -0,0 +1,16 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IService
{
/// <summary>
/// IOldBoxFoamDataServices
/// </summary>
public interface IOldBoxFoamDataServices : IBaseServices<OldBoxFoamData>
{
}
}

@ -0,0 +1,59 @@
using SqlSugar;
using System;
namespace Admin.Core.Model
{
/// <summary>
/// 拆分的SAP BOM 信息
/// </summary>
[SugarTable("OLDBOX_FOAMDATA", "AUCMA_SCADA")]
public class OldBoxFoamData
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true)]
public float ObjId { get; set; }
/// <summary>
/// 夹具箱型
/// </summary>
[SugarColumn(ColumnName = "FIXTUREBOXTYPE")]
public string Fixtureboxtype { get; set; }
/// <summary>
/// 夹具状态
/// </summary>
[SugarColumn(ColumnName = "FIXTURESTATUS")]
public string Fixturestatus { get; set; }
/// <summary>
/// 产量
/// </summary>
[SugarColumn(ColumnName = "PRODUCTION")]
public float Production { get; set; }
/// <summary>
/// 固化时间设定值
/// </summary>
[SugarColumn(ColumnName = "CURINGTIMESETTINGVALUE")]
public string CuringTimeSettingValue { get; set; }
/// <summary>
/// 固化时间实际值
/// </summary>
[SugarColumn(ColumnName = "ACTUALVALUE")]
public string ActualValue { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "CREATED_TIME")]
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(ColumnName = "UPDATED_TIME")]
public DateTime UpdatedTime { get; set; }
}
}

@ -99,7 +99,7 @@
"ID": 1,
"Name": "TestTask",
"JobGroup": "DEFAULT",
"Cron": "*/1 * * * * ?",
"Cron": "*/5 * * * * ?",
"AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_Admin_Quartz",
"Remark": "执行任务调度系统",

@ -0,0 +1,15 @@
using Admin.Core.IRepository;
using Admin.Core.Model;
namespace Admin.Core.Repository
{
/// <summary>
/// OldBoxFoamDataRepository
/// </summary>
public class OldBoxFoamDataRepository : BaseRepository<OldBoxFoamData>, IOldBoxFoamDataRepository
{
public OldBoxFoamDataRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

@ -0,0 +1,28 @@
using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using Admin.Core.Model.ViewModels;
using log4net;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.IdentityModel.Logging;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Admin.Core.Service
{
public class OldBoxFoamDataServices : BaseServices<OldBoxFoamData>, IOldBoxFoamDataServices
{
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(OldBoxFoamDataServices));
private readonly IBaseRepository<OldBoxFoamData> _dal;
public OldBoxFoamDataServices(IBaseRepository<OldBoxFoamData> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}

@ -1,8 +1,14 @@
using Admin.Core.IService;
using Admin.Core.Common;
using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.IService.ISys;
using Admin.Core.Model.Model_New;
using Admin.Core.Model.ViewModels;
using Aucma.Core.PLc;
using Quartz;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@ -16,21 +22,27 @@ namespace Admin.Core.Tasks
public class Job_Admin_Quartz : JobBase, IJob
{
bool flag=true;
public Job_Admin_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService,
IBaseOrderInfoServices baseOrderInfoServices)
IBaseOrderInfoServices _baseOrderInfoServices;
List<OrderBomInfo> bbinfolist = new List<OrderBomInfo>();
public Job_Admin_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService,
IBaseOrderInfoServices baseOrderInfoServices)
{
_SysTasksQzService = SysTasksQzService;
_sysJobLogService = sysJobLogService;
_baseOrderInfoServices = baseOrderInfoServices;
}
public async Task Execute(IJobExecutionContext context)
{
await ExecuteJob(context, async () => await Run(context));
}
public async Task Run(IJobExecutionContext context)
{
Console.WriteLine("sa1");
List<PrintPlanInfoView> orderBomInfoList = await _baseOrderInfoServices.QueryPrintInfo();
await Task.FromResult(true);
}
}
}

@ -26,23 +26,31 @@ namespace Admin.Core.Tasks
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz));
private readonly IBoxFoamDataServices _boxFoamDataServices;
private readonly IOldBoxFoamDataServices _oldBoxFoamDataServices;
public Job_BoxFoamData_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService,
IBoxFoamDataServices boxFoamDataServices)
IBoxFoamDataServices boxFoamDataServices, IOldBoxFoamDataServices oldBoxFoamDataServices)
{
_SysTasksQzService = SysTasksQzService;
_boxFoamDataServices= boxFoamDataServices;
_boxFoamDataServices = boxFoamDataServices;
_oldBoxFoamDataServices = oldBoxFoamDataServices;
}
public async Task Execute(IJobExecutionContext context)
{
await ExecuteJob(context, async () => await Run(context));
await ExecuteJob(context, async () => await OldBoxFoamDataRun(context));
}
public async Task Run(IJobExecutionContext context)
{
await SaveData();
}
public async Task OldBoxFoamDataRun(IJobExecutionContext context)
{
await SaveOldBoxFoamData();
}
#region PLC 任务处理表
/// <summary>
/// PLC 任务处理表
@ -228,5 +236,184 @@ namespace Admin.Core.Tasks
return await Task.FromResult(item);
}
#endregion
#region PLC 任务处理表
/// <summary>
/// PLC 任务处理表
/// </summary>
/// <param name="storeCode">仓库编码</param>
/// <param name="materialBarCode">物料编码</param>
/// <returns></returns>
public async Task SaveOldBoxFoamData()
{
try
{
var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("发泡Plc"));
if (obj.plc.IsConnected)
{
var taskList = await _oldBoxFoamDataServices.QueryAsync();
foreach (var item in taskList)
{
await UpdateRealBoxFoamData(obj, item);
}
}
}
catch (Exception ex)
{
logHelper.Error($"入库数据处理异常:{ex.Message}");
}
}
private async Task<OldBoxFoamData> UpdateRealBoxFoamData(PlcModel obj, OldBoxFoamData item)
{
try
{
#region 更新PLC数据
if (item.ObjId == 1)
{
item.Fixtureboxtype = obj.plc.ReadString("D3140")+ obj.plc.ReadString("D3141");
if (obj.plc.ReadInt16("Y0F0") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y0F1") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y110") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D182");
item.CuringTimeSettingValue = obj.plc.ReadString("D911");
item.ActualValue = obj.plc.ReadString("T3");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 2)
{
item.Fixtureboxtype = obj.plc.ReadString("D3142") + obj.plc.ReadString("D3143");
if (obj.plc.ReadInt16("Y0F5") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y0F6") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y111") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadString("D911");
item.ActualValue = obj.plc.ReadString("T13");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 3)
{
item.Fixtureboxtype = obj.plc.ReadString("D3144") + obj.plc.ReadString("D3145");
if (obj.plc.ReadInt16("Y0FA") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y0FB") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y112") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadString("D912");
item.ActualValue = obj.plc.ReadString("T23");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 4)
{
item.Fixtureboxtype = obj.plc.ReadString("D3148") + obj.plc.ReadString("D3149");
if (obj.plc.ReadInt16("Y100 ") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y101") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y113") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D184");
item.CuringTimeSettingValue = obj.plc.ReadString("D913");
item.ActualValue = obj.plc.ReadString("T33");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 5)
{
item.Fixtureboxtype = obj.plc.ReadString("D3150") + obj.plc.ReadString("D3151");
if (obj.plc.ReadInt16("Y105") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y106") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y114") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D185");
item.CuringTimeSettingValue = obj.plc.ReadString("D914");
item.ActualValue = obj.plc.ReadString("T43");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 6)
{
item.Fixtureboxtype = obj.plc.ReadString("D3152") + obj.plc.ReadString("D3143");
if (obj.plc.ReadInt16("Y10A") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y10B") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y115") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D186");
item.CuringTimeSettingValue = obj.plc.ReadString("D915");
item.ActualValue = obj.plc.ReadString("T53");
item.UpdatedTime = DateTime.Now;
}
#endregion
bool result = await _oldBoxFoamDataServices.UpdateAsync(item);
if (result)
{
//RefreshBoxFoamDataDelegateEvent?.Invoke();
}
else
{
// LogDelegateEvent?.Invoke($"物料[{planInfo.MaterialName}], 入库[{baseSpace.SpaceName}]失败,任务回滚!");
}
}
catch (Exception ex)
{
logHelper.Error($"更新老箱体发泡数据失败");
}
return await Task.FromResult(item);
}
#endregion
}
}

@ -19,6 +19,12 @@
<Compile Update="Views\MonitorPageView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\OldBoxFoamPageView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\OldWarehousePageView.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Views\RealTimeInventoryPageView.xaml.cs">
<SubType>Code</SubType>
</Compile>
@ -60,6 +66,12 @@
<Page Update="Views\MonitorPageView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\OldBoxFoamPageView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\OldWarehousePageView.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Views\QuantityIssuedView.xaml">
<SubType>Designer</SubType>
</Page>

@ -12,7 +12,6 @@ using Admin.Core.Common;
using Admin.Core.Model.ViewModels;
/*
*
*
*/
namespace Aucma.Core.BoxFoam.ViewModels
{

@ -10,6 +10,7 @@ using Admin.Core.Common;
using Aucma.Core.PLc;
using Aucma.Core.Scanner;
using System.Linq;
using System.Threading.Tasks;
namespace Aucma.Core.BoxFoam.ViewModels
{
@ -23,13 +24,19 @@ namespace Aucma.Core.BoxFoam.ViewModels
private FoamPlanPageView foamPlanPageView = new FoamPlanPageView();
FoamMonitorPageView foamMonitorPageView = new FoamMonitorPageView();
FoamMachinesPageView foamMachinesPageView = new FoamMachinesPageView();
OldBoxFoamPageView oldBoxFoamPage= new OldBoxFoamPageView();
OldWarehousePageView oldWarehousePage = new OldWarehousePageView();
public MainWindowViewModel()
{
UserContent = firstPage;
init();
Task.Run(() =>
{
init();
});
}
public void init()
public Task init()
{
// 设备状态刷新定时器
System.Timers.Timer timer = new System.Timers.Timer(1000 * 5);
@ -37,6 +44,8 @@ namespace Aucma.Core.BoxFoam.ViewModels
timer.AutoReset = true;
timer.Enabled = true;
timer.Start();
return Task.CompletedTask;
}
#region 设备状态刷新
@ -99,6 +108,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
Scanner1State(flag1);
}
#endregion
#region 更换界面
public System.Windows.Controls.UserControl _content;
@ -211,13 +221,18 @@ namespace Aucma.Core.BoxFoam.ViewModels
case "FoamMachinesPage":
UserContent = foamMachinesPageView;
break;
case "OldBoxFoamPage":
UserContent = oldBoxFoamPage;
break;
case "OldWarehousePage":
UserContent = oldWarehousePage;
break;
default:
break;
}
}
#endregion
#region MES数据库状态
/// <summary>
/// MES数据库-文字

@ -0,0 +1,48 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using Admin.Core.Service;
using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/**
* 线
* */
namespace Aucma.Core.BoxFoam.ViewModels
{
public partial class OldBoxFoamPageViewModel : ObservableObject
{
public readonly IOldBoxFoamDataServices? _oldBoxFoamDataServices;
public OldBoxFoamPageViewModel() {
_oldBoxFoamDataServices = App.ServiceProvider.GetService<IOldBoxFoamDataServices>();
OnLoad();
}
public async void OnLoad()
{
bool r= _oldBoxFoamDataServices.GetConnectionState();
List<OldBoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync();
if (list == null) return;
foreach (var item in list) OldBoxFoamDataGrid.Add(item);
}
#region 初始化datagrid
private ObservableCollection<OldBoxFoamData> oldBoxFoamDataGrid = new ObservableCollection<OldBoxFoamData>();
public ObservableCollection<OldBoxFoamData> OldBoxFoamDataGrid
{
get { return oldBoxFoamDataGrid; }
set
{
oldBoxFoamDataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
}
}

@ -68,6 +68,8 @@
<Button Content="发泡计划" x:Name="FoamPlanPage" FontSize="18" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamPlanPage}" />
<Button Content="发泡线监控" x:Name="FoamMonitorPage" FontSize="18" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamMonitorPage}" />
<Button Content="发泡机监控" x:Name="FoamMachinesPage" FontSize="18" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamMachinesPage}" />
<Button Content="老发泡线监控" x:Name="OldBoxFoamPage" FontSize="18" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=OldBoxFoamPage}" />
<!--<Button Content="泡前库监控" x:Name="OldWarehousePage" FontSize="18" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=OldWarehousePage}" />-->
<!--<Button Content="库存设置" x:Name="SetLibPage" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=StatisticsPage}" />-->
<Button Content="键 盘" x:Name="TabTip" FontSize="18" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" FontSize="18" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Background="#FF9900" BorderBrush="#FF9900" />

@ -0,0 +1,136 @@
<UserControl x:Class="Aucma.Core.BoxFoam.Views.OldBoxFoamPageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Aucma.Core.BoxFoam.Views"
mc:Ignorable="d"
Background="#1152AC"
FontFamily="Microsoft YaHei"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<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="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<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="18"/>
<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>
</UserControl.Resources>
<Grid Margin="0 10 0 0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#1157b9">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,1,5" >
<TextBlock Text="发泡线监控" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Border>
<!--信息展示-->
<Border x:Name="HeightHelperPanel" Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5">
<DataGrid Grid.Row="0" ItemsSource="{Binding PlanInfoDataGrid}" Background="#00000000"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding Local}" Header="位置" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="货道" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding BoxType}" Header="箱型" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding StoreAmount}" Header="库存数" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#1157b9">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,1,5" >
<TextBlock Text="泡前库" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Border>
<!--库存展示-->
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5">
<DataGrid Grid.Row="0" ItemsSource="{Binding OldBoxFoamDataGrid}" Background="#00000000"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding Local}" Header="位置" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding Obj_ID}" Header="货道" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding BoxType}" Header="箱型" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding StoreAmount}" Header="库存数" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Border>
</Grid>
</UserControl>

@ -0,0 +1,30 @@
using Aucma.Core.BoxFoam.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Aucma.Core.BoxFoam.Views
{
/// <summary>
/// OldBoxFoamPageView.xaml 的交互逻辑
/// </summary>
public partial class OldBoxFoamPageView : UserControl
{
public OldBoxFoamPageView()
{
InitializeComponent();
this.DataContext = new OldBoxFoamPageViewModel();
}
}
}

@ -0,0 +1,12 @@
<UserControl x:Class="Aucma.Core.BoxFoam.Views.OldWarehousePageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Aucma.Core.BoxFoam.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Aucma.Core.BoxFoam.Views
{
/// <summary>
/// OldWarehousePageView.xaml 的交互逻辑
/// </summary>
public partial class OldWarehousePageView : UserControl
{
public OldWarehousePageView()
{
InitializeComponent();
}
}
}

@ -81,8 +81,7 @@
"DBType": 3,
"Enabled": true,
"HitRate": 50,
//"Connection": "Data Source=localhost;Initial Catalog=Hsdb;User ID=sa;Password=sa;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"Connection": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=175.27.215.92)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=helowin)));User ID=aucma_scada;Password=aucma;",
"Connection": "Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_sacda;Password=aucma;",
"ProviderName": "System.Data.SqlClient"
},
{
@ -90,7 +89,7 @@
"DBType": 3,
"Enabled": true,
"HitRate": 40,
"Connection": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=175.27.215.92)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=helowin)));User ID=aucma_mes;Password=aucma;",
"Connection": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.72.20)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCLCDB)));User ID=c##aucma_mes;Password=aucma;",
"ProviderName": "System.Data.SqlClient"
}
],

@ -31,10 +31,13 @@ namespace Aucma.Core.Tasks
private readonly ISmTaskExecutionServices _smTaskExecutionServices;
private readonly ISMProductionCompletionRecordServices _smProductionCompletionRecordServices;
public AucamTaskService(ISmTaskExecutionServices smTaskExecutionServices, ISMProductionCompletionRecordServices smProductionCompletionRecordServices)
public AucamTaskService(ISmTaskExecutionServices smTaskExecutionServices, ISMProductionCompletionRecordServices smProductionCompletionRecordServices,
IOldBoxFoamDataServices oldBoxFoamDataServices)
{
_smTaskExecutionServices= smTaskExecutionServices;
_smProductionCompletionRecordServices = smProductionCompletionRecordServices;
}
System.Timers.Timer timer1 = new System.Timers.Timer(2000);

Loading…
Cancel
Save