You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using SlnMesnac.LabelPrint.Bartender.equip;
|
|
|
|
|
using SlnMesnac.LabelPrint.Common;
|
|
|
|
|
using SlnMesnac.LabelPrint.Log4net;
|
|
|
|
|
using SlnMesnac.LabelPrint.Model;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.LabelPrint.BarTender.equip
|
|
|
|
|
{
|
|
|
|
|
public class PalletLabelPrintEquip : PrintEquip
|
|
|
|
|
{
|
|
|
|
|
private readonly LogHelper logHelper = LogHelper.Instance;
|
|
|
|
|
private readonly JsonChange jsonChange = JsonChange.Instance;
|
|
|
|
|
public override bool AddPara()
|
|
|
|
|
{
|
|
|
|
|
var para = base.ParaClass as BaseLabelInfo;
|
|
|
|
|
if (para != null)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
logHelper.Info($"打印标签信息:{jsonChange.ModeToJson(para)}");
|
|
|
|
|
string msg = "25BUN544858988" + para.column_A.ToString();
|
|
|
|
|
byte[] buffer = Encoding.UTF8.GetBytes( msg );
|
|
|
|
|
string hexString = BitConverter.ToString( buffer).Replace("-",string.Empty);
|
|
|
|
|
base.EngineFormat.SubStrings["rfid"].Value = hexString;
|
|
|
|
|
base.EngineFormat.SubStrings["qrcode"].Value = "25BUN544858988" + para.column_A.ToString();
|
|
|
|
|
base.EngineFormat.SubStrings["barcode"].Value = "25BUN544858988" + para.column_A.ToString();
|
|
|
|
|
base.EngineFormat.SubStrings["pallet"].Value = para.column_A.ToString();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(e.ToString());
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|