wenjy 1 month ago
commit 842eb67bed

File diff suppressed because it is too large Load Diff

@ -79,12 +79,12 @@ namespace MaterialTraceability.Business.Impl
///add by yinzf ///add by yinzf
/// <summary> /// <summary>
/// /// 放卷开始
/// </summary> /// </summary>
/// <param name="position"></param> /// <param name="position"></param>
public void UpBegin(int position) public void UpBegin(int position)
{ {
//禁止下料
} }
//end add //end add
/// <summary> /// <summary>
@ -1751,18 +1751,6 @@ namespace MaterialTraceability.Business.Impl
plcBusiness.writePlc(appConfig.LyAddress.1B, 0); plcBusiness.writePlc(appConfig.LyAddress.1B, 0);
plcBusiness.writePlc(appConfig.LyAddress.1BOK, 1); plcBusiness.writePlc(appConfig.LyAddress.1BOK, 1);
break; break;
case 3:
LogRefreshEvent?.Invoke(LogType.PlcLog, "2A轴异常下料信号触发,下发下料信号");
LogHelper.Info("2A轴异常下料信号触发,下发下料信号");
plcBusiness.writePlc(appConfig.LyAddress.2A, 0);
plcBusiness.writePlc(appConfig.LyAddress.2AOK, 1);
break;
case 4:
LogRefreshEvent?.Invoke(LogType.PlcLog, "2B轴异常下料信号触发,下发下料信号");
LogHelper.Info("2B轴异常下料信号触发,下发下料信号");
plcBusiness.writePlc(appConfig.LyAddress.2B, 0);
plcBusiness.writePlc(appConfig.LyAddress.2BOK, 1);
break;
default: default:
break; break;
} }
@ -1774,7 +1762,7 @@ namespace MaterialTraceability.Business.Impl
/// <param name="position"></param> /// <param name="position"></param>
public void DownBegin(int position) public void DownBegin(int position)
{ {
throw new NotImplementedException(); //禁止下料
} }
/// <summary> /// <summary>

@ -57,6 +57,9 @@ namespace MaterialTraceability.Business
switch (appConfig.processId) switch (appConfig.processId)
{ {
case "AB":
signalRead = new ABSignalReadBusiness();
break;
case "TB": case "TB":
signalRead = new TBSignalReadBusiness(); signalRead = new TBSignalReadBusiness();
break; break;

@ -55,6 +55,7 @@
<Compile Include="BusinessHelper.cs" /> <Compile Include="BusinessHelper.cs" />
<Compile Include="CFliterRFID.cs" /> <Compile Include="CFliterRFID.cs" />
<Compile Include="EquipBusiness.cs" /> <Compile Include="EquipBusiness.cs" />
<Compile Include="Impl\ABSignalReadBusiness.cs" />
<Compile Include="Impl\LYSignalReadBusiness.cs" /> <Compile Include="Impl\LYSignalReadBusiness.cs" />
<Compile Include="Impl\MQSignalReadBusiness.cs" /> <Compile Include="Impl\MQSignalReadBusiness.cs" />
<Compile Include="Impl\TBSignalReadBusiness.cs" /> <Compile Include="Impl\TBSignalReadBusiness.cs" />

@ -168,6 +168,69 @@ namespace MaterialTraceability.Business
{ {
//获取工序编号 TB-涂布、LY冷压预分切、MQ-模切、JR-卷绕 //获取工序编号 TB-涂布、LY冷压预分切、MQ-模切、JR-卷绕
string processCode = appConfig.processId; string processCode = appConfig.processId;
#region 凹版
//凹版工序
if (processCode.Equals("AB"))
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 1);
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(6, 0);
}
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(7, 1);
}
//放卷 涨紧信号
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(1, 0);
}
//放卷结束信号
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(2, 0);
}
//收卷涨紧信号-1A气胀轴
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(3, 1);
}
//收卷结束信号-1A气胀轴
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
lock (string.Empty)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(4, 1);
}
}
//异常下料-1A
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(5, 1);
}
//异常下料-1B
if (plcInstance.readInt32ByAddress(appConfig.AbAddress.) == 1)
{
plcInstance.writeInt32ByAddress(appConfig.AbAddress., 0);
SignalRefreshEvent?.Invoke(5, 2);
}
}
#endregion
#region 涂布 #region 涂布
if (processCode.Equals("TB")) if (processCode.Equals("TB"))
{ {
@ -750,6 +813,7 @@ namespace MaterialTraceability.Business
} }
} }
#endregion #endregion
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -39,10 +39,10 @@ namespace MaterialTraceability.Common
/// <param name="msg"></param> /// <param name="msg"></param>
public static void PlcLog(string msg) public static void PlcLog(string msg)
{ {
/*if (logPlc.IsInfoEnabled) if (logPlc.IsInfoEnabled)
{ {
logPlc.Info(msg); logPlc.Info(msg);
}*/ }
} }
/// <summary> /// <summary>

@ -0,0 +1,59 @@
using MaterialTraceability.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MaterialTraceability.Entity.Config
{
public sealed class AbAddress
{
private static INIFile iNIFile = new INIFile(System.Environment.CurrentDirectory + "/PlcConfig/App.InI");
private static readonly Lazy<AbAddress> lazy = new Lazy<AbAddress>(() => new AbAddress());
public static AbAddress Instance
{
get
{
return lazy.Value;
}
}
private AbAddress() { }
public string = iNIFile.IniReadValue("ABPLcAddress", "心跳");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷开始");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷涨紧");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷结束");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷开始");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷涨紧");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷结束");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷异常下料");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷异常下料");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷控制下料");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷控制下料");
public string RFID = iNIFile.IniReadValue("ABPLcAddress", "RFID异常");
public string MES = iNIFile.IniReadValue("ABPLcAddress", "MES异常");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷手动上料");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷手动上料");
public string = iNIFile.IniReadValue("ABPLcAddress", "放卷气胀轴泄气");
public string = iNIFile.IniReadValue("ABPLcAddress", "收卷气胀轴泄气");
}
}

@ -55,5 +55,7 @@ namespace MaterialTraceability.Entity.DTO
public LyAddress LyAddress = LyAddress.Instance; public LyAddress LyAddress = LyAddress.Instance;
public MqAddress mqAddress = MqAddress.Instance; public MqAddress mqAddress = MqAddress.Instance;
public AbAddress AbAddress = AbAddress.Instance;
} }
} }

@ -44,6 +44,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Config\AbAddress.cs" />
<Compile Include="Config\LyAddress.cs" /> <Compile Include="Config\LyAddress.cs" />
<Compile Include="Config\MqAddress.cs" /> <Compile Include="Config\MqAddress.cs" />
<Compile Include="Config\TbAddress.cs" /> <Compile Include="Config\TbAddress.cs" />

@ -46,6 +46,9 @@ namespace MaterialTraceabilityUI
case "MQ_A": case "MQ_A":
iniSection = "MQPLcAddress"; iniSection = "MQPLcAddress";
break; break;
case "AB":
iniSection = "ABPLcAddress";
break;
default: default:
break; break;
} }

@ -73,7 +73,10 @@ namespace MaterialTraceabilityUI
{ {
exp = exp.And(x => x.Sfc.Contains(this.sfcText.Text.ToString())); exp = exp.And(x => x.Sfc.Contains(this.sfcText.Text.ToString()));
} }
if (appConfig.processId == "AB")
{
exp = exp.And(x => x.MachineId == appConfig.machineId);
}
Expression<Func<ProDownRecord, object>> order = x => x.beginTime; Expression<Func<ProDownRecord, object>> order = x => x.beginTime;
List<ProDownRecord> proUpRecords = this.SelectDownRecords(exp).Result; List<ProDownRecord> proUpRecords = this.SelectDownRecords(exp).Result;

@ -1,4 +1,5 @@
using MaterialTraceability.Entity.DAO; using MaterialTraceability.Entity.DAO;
using MaterialTraceability.Entity.DTO;
using MaterialTraceability.SqlSugar; using MaterialTraceability.SqlSugar;
using MaterialTraceability.SqlSugar.ServiceImpl; using MaterialTraceability.SqlSugar.ServiceImpl;
using MaterialTraceabilityUI.Common; using MaterialTraceabilityUI.Common;
@ -25,6 +26,7 @@ namespace MaterialTraceabilityUI
/// </summary> /// </summary>
public partial class LogRecordControl : UserControl public partial class LogRecordControl : UserControl
{ {
private AppConfigDto appConfig = AppConfigDto.Instance;
private IBaseServices<RecordLogInfo> logInfoServices = new BaseServices<RecordLogInfo>(); private IBaseServices<RecordLogInfo> logInfoServices = new BaseServices<RecordLogInfo>();
public LogRecordControl() public LogRecordControl()
{ {
@ -61,7 +63,10 @@ namespace MaterialTraceabilityUI
int isAlarm = Convert.ToString(this.isAlarm.SelectedItem) == "是" ? 1 : 0; int isAlarm = Convert.ToString(this.isAlarm.SelectedItem) == "是" ? 1 : 0;
exp = exp.And(x => x.isAlarm == isAlarm); exp = exp.And(x => x.isAlarm == isAlarm);
} }
if (appConfig.processId == "AB")
{
exp = exp.And(x => x.machineId == appConfig.machineId.ToString());
}
List<RecordLogInfo> recordLogInfos = logInfoServices.Query(exp).Result; List<RecordLogInfo> recordLogInfos = logInfoServices.Query(exp).Result;
this.LogRecordDataGrid.ItemsSource = recordLogInfos; this.LogRecordDataGrid.ItemsSource = recordLogInfos;

@ -20,6 +20,9 @@ namespace MaterialTraceabilityUI
public partial class MainWindow : Window, INotifyPropertyChanged public partial class MainWindow : Window, INotifyPropertyChanged
{ {
#region 界面引用 #region 界面引用
//凹版页面
private intaglioPage intaglioPage = new intaglioPage();
//涂布界面 //涂布界面
private CoatingProcess coatingProcess = new CoatingProcess(); private CoatingProcess coatingProcess = new CoatingProcess();
@ -165,6 +168,10 @@ namespace MaterialTraceabilityUI
{ {
UserContent = firstPage; UserContent = firstPage;
} }
else if (processId.Contains("AB"))
{
UserContent = intaglioPage;
}
else else
{ {
UserContent = dieCuttingProcess; UserContent = dieCuttingProcess;
@ -237,6 +244,10 @@ namespace MaterialTraceabilityUI
{ {
UserContent = coatingProcess; UserContent = coatingProcess;
} }
else if (processId.Contains("AB"))
{
UserContent = intaglioPage;
}
else if (processId.Contains("LY")) else if (processId.Contains("LY"))
{ {
UserContent = firstPage; UserContent = firstPage;

@ -106,9 +106,9 @@
<DataGridTextColumn Binding="{Binding endTime}" Header="结束时间" Width="*"/> <DataGridTextColumn Binding="{Binding endTime}" Header="结束时间" Width="*"/>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<Label Content="放卷SFC" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="54,270,0,145"/> <Label Content="放卷SFC" x:Name="lb_fjsfc" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="54,270,0,145"/>
<TextBox Height="26" FontSize="18" x:Name="sfcTextBox" HorizontalAlignment="Left" VerticalAlignment="Center" Width="145" Margin="155,275,0,149"/> <TextBox Height="26" FontSize="18" x:Name="sfcTextBox" HorizontalAlignment="Left" VerticalAlignment="Center" Width="145" Margin="155,275,0,149"/>
<Label Content="EA值" Height="35" FontSize="18" Foreground="#007DFA" Width="65" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="336,271,0,144"/> <Label Content="EA值" x:Name="lb_eavalue" Height="35" FontSize="18" Foreground="#007DFA" Width="65" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="336,271,0,144"/>
<TextBox Height="26" FontSize="18" x:Name="eaTextBox" HorizontalAlignment="Left" VerticalAlignment="Center" Width="132" Margin="406,275,0,149"/> <TextBox Height="26" FontSize="18" x:Name="eaTextBox" HorizontalAlignment="Left" VerticalAlignment="Center" Width="132" Margin="406,275,0,149"/>
<Label Content="CCD打标数" x:Name="ccdLable" Height="35" FontSize="18" Foreground="#007DFA" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,340,0,75" Visibility="Hidden"/> <Label Content="CCD打标数" x:Name="ccdLable" Height="35" FontSize="18" Foreground="#007DFA" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,340,0,75" Visibility="Hidden"/>
<TextBox Height="26" FontSize="18" x:Name="ccdTextBox" HorizontalAlignment="Left" VerticalAlignment="Center" Width="120" Margin="178,344,0,80" Visibility="Hidden"/> <TextBox Height="26" FontSize="18" x:Name="ccdTextBox" HorizontalAlignment="Left" VerticalAlignment="Center" Width="120" Margin="178,344,0,80" Visibility="Hidden"/>

@ -29,6 +29,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Navigation; using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace MaterialTraceabilityUI namespace MaterialTraceabilityUI
{ {
@ -318,7 +319,20 @@ namespace MaterialTraceabilityUI
{ {
ccdLable.Visibility = Visibility.Visible; ccdLable.Visibility = Visibility.Visible;
ccdTextBox.Visibility = Visibility.Visible; ccdTextBox.Visibility = Visibility.Visible;
}/*else if (appConfig.processId == "LY_A") }
else if (appConfig.processId == "AB")
{
lb_fjsfc.Visibility = Visibility.Hidden;
sfcTextBox.Visibility = Visibility.Hidden;
lb_eavalue.Visibility = Visibility.Hidden;
eaTextBox.Visibility = Visibility.Hidden;
endFlagLabel.Visibility = Visibility.Hidden;
endFlagCombox.Visibility = Visibility.Hidden;
split.Visibility = Visibility.Hidden;
ccdLable.Visibility = Visibility.Hidden;
ccdTextBox.Visibility = Visibility.Hidden;
}
/*else if (appConfig.processId == "LY_A")
{ {
endFlagLabel.Visibility = Visibility.Visible; endFlagLabel.Visibility = Visibility.Visible;
endFlagCombox.Visibility = Visibility.Visible; endFlagCombox.Visibility = Visibility.Visible;
@ -785,18 +799,21 @@ namespace MaterialTraceabilityUI
MessageBox.Show("未选择异常记录"); MessageBox.Show("未选择异常记录");
return; return;
} }
if (appConfig.processId != "AB")
if (StringExtension.IsBlank(sfcTextBox.Text))
{ {
MessageBox.Show("请输入放卷位SFC"); if (StringExtension.IsBlank(sfcTextBox.Text))
return; {
} MessageBox.Show("请输入放卷位SFC");
return;
}
if (StringExtension.IsBlank(eaTextBox.Text)) if (StringExtension.IsBlank(eaTextBox.Text))
{ {
MessageBox.Show("请输入ea值"); MessageBox.Show("请输入ea值");
return; return;
}
} }
string splitSfc = GetSfcByRfid(downRecord.Rfid); string splitSfc = GetSfcByRfid(downRecord.Rfid);
if (StringExtension.IsBlank(splitSfc)) if (StringExtension.IsBlank(splitSfc))

@ -28,7 +28,7 @@ namespace MaterialTraceabilityUI
/// </summary> /// </summary>
public partial class UpMaterialRecord : UserControl public partial class UpMaterialRecord : UserControl
{ {
private AppConfigDto appConfig = AppConfigDto.Instance;
private IBaseServices<ProUpRecord> uprecordServices = new BaseServices<ProUpRecord>(); private IBaseServices<ProUpRecord> uprecordServices = new BaseServices<ProUpRecord>();
public UpMaterialRecord() public UpMaterialRecord()
@ -72,8 +72,10 @@ namespace MaterialTraceabilityUI
{ {
exp = exp.And(x => x.Sfc.Contains(this.sfcText.Text.ToString())); exp = exp.And(x => x.Sfc.Contains(this.sfcText.Text.ToString()));
} }
if (appConfig.processId == "AB")
//exp = exp.And(x => x.MachineId == Convert.ToInt32(ConfigHelper.GetConfig("MachineID"))); {
exp = exp.And(x => x.MachineId == appConfig.machineId);
}
Expression<Func<ProUpRecord, object>> order = x => x.beginTime; Expression<Func<ProUpRecord, object>> order = x => x.beginTime;
List<ProUpRecord> proUpRecords = this.SelectUpRecords(exp).Result; List<ProUpRecord> proUpRecords = this.SelectUpRecords(exp).Result;

@ -36,6 +36,8 @@ namespace MaterialTraceabilityUI
private LYSignalReadBusiness lYSignalRead = new LYSignalReadBusiness(); private LYSignalReadBusiness lYSignalRead = new LYSignalReadBusiness();
private MQSignalReadBusiness mQSignalRead = new MQSignalReadBusiness(); private MQSignalReadBusiness mQSignalRead = new MQSignalReadBusiness();
private ABSignalReadBusiness ABSignalRead = new ABSignalReadBusiness();
public WriteInfo() public WriteInfo()
{ {
InitializeComponent(); InitializeComponent();
@ -46,7 +48,23 @@ namespace MaterialTraceabilityUI
this.processId = processId; this.processId = processId;
this.position = position; this.position = position;
InitializeComponent(); InitializeComponent();
this.rfidCode.Text = "JSLY5RD"; if (processId == "AB")
{
if (position == 0)
{
//this.rfidCode.Text = "";
}
else
{
this.rfidCode.Text = "JSLY5RD";
}
}
else
{
this.rfidCode.Text = "JSLY5RD";
}
} }
/// <summary> /// <summary>
@ -100,7 +118,19 @@ namespace MaterialTraceabilityUI
MessageBox.Show("冷压RFID条码信息写入成功"); MessageBox.Show("冷压RFID条码信息写入成功");
} }
else if (processId == "AB")
{
if (position == 0)
{
ABSignalRead.FJMesBegin(position, rfidCode, false);
}
else
{
ABSignalRead.SJMesBegin(position, rfidCode, false);
}
MessageBox.Show("凹版RFID条码信息写入成功");
}
this.Close(); this.Close();
} }

@ -46,7 +46,7 @@
</Border> </Border>
</UniformGrid> </UniformGrid>
<UniformGrid Columns="4" Grid.Row="1" Margin="0,5"> <!--<UniformGrid Columns="4" Grid.Row="1" Margin="0,5">
<Border x:Name="down_1" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_1_MouseDown"> <Border x:Name="down_1" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_1_MouseDown">
<StackPanel Margin="5,5"> <StackPanel Margin="5,5">
<TextBlock Text="收卷1A轴内侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/> <TextBlock Text="收卷1A轴内侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/>
@ -79,25 +79,25 @@
<TextBlock x:Name="Down_EA_4" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_EA_4" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
</StackPanel> </StackPanel>
</Border> </Border>
</UniformGrid> </UniformGrid>-->
<UniformGrid Columns="4" Grid.Row="2" Margin="0,5"> <UniformGrid Columns="4" Grid.Row="2" Margin="0,5">
<Border x:Name="down_5" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_5_MouseDown"> <Border x:Name="down_5" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_5_MouseDown">
<StackPanel Margin="5,5"> <StackPanel Margin="5,5">
<TextBlock Text="收卷1B内侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/> <TextBlock Text="收卷轴" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/>
<TextBlock x:Name="Down_SFC_5" Text="SFC" FontSize="13" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2" FontWeight="Bold"/> <TextBlock x:Name="Down_SFC_5" Text="SFC" FontSize="13" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2" FontWeight="Bold"/>
<TextBlock x:Name="Down_RFID_5" Text="RFID" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_RFID_5" Text="RFID" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
<TextBlock x:Name="Down_EA_5" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_EA_5" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
</StackPanel> </StackPanel>
</Border> </Border>
<Border x:Name="down_6" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_6_MouseDown"> <!--<Border x:Name="down_6" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_6_MouseDown">
<StackPanel Margin="5,5"> <StackPanel Margin="5,5">
<TextBlock Text="收卷1B轴外侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/> <TextBlock Text="收卷轴外侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/>
<TextBlock x:Name="Down_SFC_6" Text="SFC" FontSize="13" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2" FontWeight="Bold"/> <TextBlock x:Name="Down_SFC_6" Text="SFC" FontSize="13" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2" FontWeight="Bold"/>
<TextBlock x:Name="Down_RFID_6" Text="RFID" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_RFID_6" Text="RFID" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
<TextBlock x:Name="Down_EA_6" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_EA_6" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
</StackPanel> </StackPanel>
</Border> </Border>-->
<Border x:Name="down_7" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_7_MouseDown"> <!--<Border x:Name="down_7" BorderThickness="1,1,1,1" BorderBrush="#DBE6FA" Background="#F0F7FF" CornerRadius="5" Margin="5,0" Width="220" MouseDown="down_7_MouseDown">
<StackPanel Margin="5,5"> <StackPanel Margin="5,5">
<TextBlock Text="收卷2B轴内侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/> <TextBlock Text="收卷2B轴内侧" FontSize="15" Foreground="#666867" HorizontalAlignment="Center"/>
<TextBlock x:Name="Down_SFC_7" Text="SFC" FontSize="13" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2" FontWeight="Bold"/> <TextBlock x:Name="Down_SFC_7" Text="SFC" FontSize="13" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2" FontWeight="Bold"/>
@ -112,7 +112,7 @@
<TextBlock x:Name="Down_RFID_8" Text="RFID" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_RFID_8" Text="RFID" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
<TextBlock x:Name="Down_EA_8" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/> <TextBlock x:Name="Down_EA_8" Text="EA" TextWrapping="Wrap" Foreground="#5985EA" Margin="0,2"/>
</StackPanel> </StackPanel>
</Border> </Border>-->
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</StackPanel> </StackPanel>

@ -35,11 +35,11 @@ namespace MaterialTraceabilityUI
InitializeComponent(); InitializeComponent();
try try
{ {
if (appConfig.processId.Contains("LY")) if (appConfig.processId == "AB")
{ {
MainBusiness.LogRefreshEvent += LogRefresh; MainBusiness.LogRefreshEvent += LogRefresh;
LYSignalReadBusiness.LogRefreshEvent += LogRefresh; ABSignalReadBusiness.LogRefreshEvent += LogRefresh;
LYSignalReadBusiness.ViewModelRefreshEvent += ProductionParam; ABSignalReadBusiness.ViewModelRefreshEvent += ProductionParam;
UserControlInit(); UserControlInit();
refreshThread(); refreshThread();
@ -78,138 +78,138 @@ namespace MaterialTraceabilityUI
case 1: case 1:
action = () => action = () =>
{ {
this.Down_SFC_1.Text = "SFC" + viewModelDto.rfidInfo.sfc; this.Down_SFC_5.Text = "SFC" + viewModelDto.rfidInfo.sfc;
}; };
Down_SFC_1.Dispatcher.BeginInvoke(action); Down_SFC_5.Dispatcher.BeginInvoke(action);
action = () => action = () =>
{ {
this.Down_RFID_1.Text = "RFID"+viewModelDto.rfidInfo.rfid; this.Down_RFID_5.Text = "RFID" + viewModelDto.rfidInfo.rfid;
}; };
Down_RFID_1.Dispatcher.BeginInvoke(action); Down_RFID_5.Dispatcher.BeginInvoke(action);
action = () => action = () =>
{ {
this.Down_EA_1.Text = "EA"+viewModelDto.rfidInfo.ea; this.Down_EA_5.Text = "EA" + viewModelDto.rfidInfo.ea;
}; };
Down_EA_1.Dispatcher.BeginInvoke(action); Down_EA_5.Dispatcher.BeginInvoke(action);
break; break;
case 2: case 2:
action = () => //action = () =>
{ //{
this.Down_SFC_2.Text = "SFC" + viewModelDto.rfidInfo.sfc; // this.Down_SFC_2.Text = "SFC" + viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_2.Dispatcher.BeginInvoke(action); //Down_SFC_2.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_2.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_2.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_2.Dispatcher.BeginInvoke(action); //Down_RFID_2.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_2.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_2.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_2.Dispatcher.BeginInvoke(action); //Down_EA_2.Dispatcher.BeginInvoke(action);
break; break;
case 5: case 5:
action = () => //action = () =>
{ //{
this.Down_SFC_3.Text = "SFC"+viewModelDto.rfidInfo.sfc; // this.Down_SFC_3.Text = "SFC"+viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_3.Dispatcher.BeginInvoke(action); //Down_SFC_3.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_3.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_3.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_3.Dispatcher.BeginInvoke(action); //Down_RFID_3.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_3.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_3.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_3.Dispatcher.BeginInvoke(action); //Down_EA_3.Dispatcher.BeginInvoke(action);
break; break;
case 6: case 6:
action = () => //action = () =>
{ //{
this.Down_SFC_4.Text = "SFC"+viewModelDto.rfidInfo.sfc; // this.Down_SFC_4.Text = "SFC"+viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_4.Dispatcher.BeginInvoke(action); //Down_SFC_4.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_4.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_4.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_4.Dispatcher.BeginInvoke(action); //Down_RFID_4.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_4.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_4.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_4.Dispatcher.BeginInvoke(action); //Down_EA_4.Dispatcher.BeginInvoke(action);
break; break;
case 4: case 4:
action = () => //action = () =>
{ //{
this.Down_SFC_5.Text = "SFC"+viewModelDto.rfidInfo.sfc; // this.Down_SFC_5.Text = "SFC"+viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_5.Dispatcher.BeginInvoke(action); //Down_SFC_5.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_5.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_5.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_5.Dispatcher.BeginInvoke(action); //Down_RFID_5.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_5.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_5.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_5.Dispatcher.BeginInvoke(action); //Down_EA_5.Dispatcher.BeginInvoke(action);
break; break;
case 3: case 3:
action = () => //action = () =>
{ //{
this.Down_SFC_6.Text = "SFC"+viewModelDto.rfidInfo.sfc; // this.Down_SFC_6.Text = "SFC"+viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_6.Dispatcher.BeginInvoke(action); //Down_SFC_6.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_6.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_6.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_6.Dispatcher.BeginInvoke(action); //Down_RFID_6.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_6.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_6.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_6.Dispatcher.BeginInvoke(action); //Down_EA_6.Dispatcher.BeginInvoke(action);
break; break;
case 8: case 8:
action = () => //action = () =>
{ //{
this.Down_SFC_7.Text = "SFC"+viewModelDto.rfidInfo.sfc; // this.Down_SFC_7.Text = "SFC"+viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_7.Dispatcher.BeginInvoke(action); //Down_SFC_7.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_7.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_7.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_7.Dispatcher.BeginInvoke(action); //Down_RFID_7.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_7.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_7.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_7.Dispatcher.BeginInvoke(action); //Down_EA_7.Dispatcher.BeginInvoke(action);
break; break;
case 7: case 7:
action = () => //action = () =>
{ //{
this.Down_SFC_8.Text = "SFC"+viewModelDto.rfidInfo.sfc; // this.Down_SFC_8.Text = "SFC"+viewModelDto.rfidInfo.sfc;
}; //};
Down_SFC_8.Dispatcher.BeginInvoke(action); //Down_SFC_8.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_RFID_8.Text = "RFID"+viewModelDto.rfidInfo.rfid; // this.Down_RFID_8.Text = "RFID"+viewModelDto.rfidInfo.rfid;
}; //};
Down_RFID_8.Dispatcher.BeginInvoke(action); //Down_RFID_8.Dispatcher.BeginInvoke(action);
action = () => //action = () =>
{ //{
this.Down_EA_8.Text = "EA"+viewModelDto.rfidInfo.ea; // this.Down_EA_8.Text = "EA"+viewModelDto.rfidInfo.ea;
}; //};
Down_EA_8.Dispatcher.BeginInvoke(action); //Down_EA_8.Dispatcher.BeginInvoke(action);
break; break;
default: default:
break; break;
@ -404,8 +404,8 @@ namespace MaterialTraceabilityUI
logInfoServices.Add(new RecordLogInfo() logInfoServices.Add(new RecordLogInfo()
{ {
id = System.Guid.NewGuid().ToString("N"), id = System.Guid.NewGuid().ToString("N"),
processId = "LY_A", processId = appConfig.processId,
machineId = ConfigurationManager.AppSettings["machineId"].ToString(), machineId = appConfig.machineId.ToString(),
alarmType = logTypeStr, alarmType = logTypeStr,
alarmInfo = info, alarmInfo = info,
isAlarm = isAlarm, isAlarm = isAlarm,
@ -565,8 +565,8 @@ namespace MaterialTraceabilityUI
/// <param name="e"></param> /// <param name="e"></param>
private void down_5_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) private void down_5_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{ {
//WriteInfo write = new WriteInfo(appConfig.processId, 4); WriteInfo write = new WriteInfo(appConfig.processId, 1);
//write.ShowDialog(); write.ShowDialog();
} }
/// <summary> /// <summary>

Loading…
Cancel
Save