liuwf 1 year ago
parent 5f018c793c
commit 0787b253d6

@ -49,7 +49,6 @@ namespace Aucma.Core.CodeBinding.ViewModels
MvCodeHelper.ReceiveCode1Event += receiveCode1;
MvCodeHelper.ReceiveCode2Event += receiveCode2;
// var list = _codeBindingRecordServices.FirstAsync().Result;
LoadData();
// 程序运行 5 秒后添加新数据项
@ -306,11 +305,12 @@ namespace Aucma.Core.CodeBinding.ViewModels
// 1.数据库查询各个工序质检结果,不合格报警
// 2.查询条码绑定记录表绑定SN码
// 2.查询条码绑定记录表(内胆箱壳绑定就应该插入记录)绑定SN码
List<CodeBindingRecord> list = await _codeBindingRecordServices.QueryAsync(x=> x.BoxCode==code1);
CodeBindingRecord record = list.FirstOrDefault();
// List<CodeBindingRecord> list = await _codeBindingRecordServices.QueryByTime();
// CodeBindingRecord record = list.FirstOrDefault();
record.BoxName = "去别的数据库查询";
record.ProductCode = code2;
record.RecordTime2 = System.DateTime.Now;
record.BindingResult = "成功";

@ -51,6 +51,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
MvCodeHelper.ReceiveCodeEvent += ReceiveCode;
// test33();
ReceiveCode("12345", 1);
StartPlcTimer();
InitEveryDayMethod();
test2();
@ -75,7 +76,6 @@ namespace Aucma.Core.ProductOffLine.ViewModels
private void readPlcStatus(object source, System.Timers.ElapsedEventArgs e)
{
startGrab();
}
/// <summary>
/// 读取开启扫码信号
@ -275,13 +275,12 @@ namespace Aucma.Core.ProductOffLine.ViewModels
/// 扫描的条码处理
/// </summary>
/// <param name="code"></param>
/// <param name="direction">扫码器方向1左边分A库2右边分B库</param>
/// <param name="direction">扫码器方向</param>
private async void ReceiveCode(string code, int scannerNo)
{
//1.扫描的SN条码去条码系统查询GET_BARCODE_DATA
//条码系统返回校验数据
// string result = await _productOffLineServices.QueryChecked(code);
string result = "Y@1104@16160030000000910780@000010034895@@ @000000@000000009000000807@BCD-160C,家电下乡@@BCD-160C@皓月白-家电下乡@161601300@160@1-00版@家电下乡产品@默认@2010-09-01";
//1.扫描的SN条码去条码系统查询GET_BARCODE_DATA 返回校验数据
// string result = await _productOffLineServices.QueryChecked(code);
string result = "Y@1104@16160030000000910780@000010034895@@ @000000@000000009000000807@BCD-160C,家电下乡@@BCD-160C@皓月白-家电下乡@161601300@160@1-00版@家电下乡产品@默认@2010-09-01";
// 如果校验失败,下发报警
if ("N".Equals(result.Substring(0, 1)))
{

@ -58,7 +58,7 @@
</Border>
</Grid>
<Grid Grid.Row="3">
<DataGrid Name="dataGrid" ItemsSource="{Binding MaterialDataGrid}" Background="Transparent"
<DataGrid Name="qualityGrid" ItemsSource="{Binding QualityDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"

Loading…
Cancel
Save