|
|
@ -51,6 +51,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
|
|
|
|
_productPlanInfoServices = App.ServiceProvider.GetService<IProductPlanInfoServices>();
|
|
|
|
MvCodeHelper.ReceiveCodeEvent += ReceiveCode;
|
|
|
|
MvCodeHelper.ReceiveCodeEvent += ReceiveCode;
|
|
|
|
// test33();
|
|
|
|
// test33();
|
|
|
|
|
|
|
|
ReceiveCode("12345", 1);
|
|
|
|
StartPlcTimer();
|
|
|
|
StartPlcTimer();
|
|
|
|
InitEveryDayMethod();
|
|
|
|
InitEveryDayMethod();
|
|
|
|
test2();
|
|
|
|
test2();
|
|
|
@ -75,7 +76,6 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
private void readPlcStatus(object source, System.Timers.ElapsedEventArgs e)
|
|
|
|
private void readPlcStatus(object source, System.Timers.ElapsedEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
startGrab();
|
|
|
|
startGrab();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 读取开启扫码信号
|
|
|
|
/// 读取开启扫码信号
|
|
|
@ -275,13 +275,12 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
/// 扫描的条码处理
|
|
|
|
/// 扫描的条码处理
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="code"></param>
|
|
|
|
/// <param name="code"></param>
|
|
|
|
/// <param name="direction">扫码器方向,1左边分A库,2右边分B库</param>
|
|
|
|
/// <param name="direction">扫码器方向</param>
|
|
|
|
private async void ReceiveCode(string code, int scannerNo)
|
|
|
|
private async void ReceiveCode(string code, int scannerNo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//1.扫描的SN条码去条码系统查询GET_BARCODE_DATA
|
|
|
|
//1.扫描的SN条码去条码系统查询GET_BARCODE_DATA 返回校验数据
|
|
|
|
//条码系统返回校验数据
|
|
|
|
// string result = await _productOffLineServices.QueryChecked(code);
|
|
|
|
// 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";
|
|
|
|
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)))
|
|
|
|
if ("N".Equals(result.Substring(0, 1)))
|
|
|
|
{
|
|
|
|
{
|
|
|
|