Files
GX.O3.WMS/APP.O3/Domain/UnitOfWork/WMS/Model/Print.cs
T

288 lines
8.1 KiB
C#
Executable File

using System.Collections.Generic;
namespace Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model
{
/// <summary>
/// 蓝牙打印机配置接口
/// </summary>
public interface IBluetoothPrintConfig
{
/// <summary>
/// 声明蓝牙打印机配置必须有详细配置
/// </summary>
public List<IBluetoothPrintDetailConfig> ConfigDetails { get; set; }
}
/// <summary>
/// 蓝牙打印机详细配置接口
/// </summary>
public interface IBluetoothPrintDetailConfig
{
}
/// <summary>
/// 德佟蓝牙打印机元素配置接口
/// </summary>
public interface IElementConfig
{
}
/// <summary>
/// 蓝牙打印配置基类
/// </summary>
public class BluetoothPrintConfigBase
{
public BluetoothPrintConfigBase()
{
ConfigDetails = new List<IBluetoothPrintDetailConfig>();
}
/// <summary>
/// 配置名称
/// </summary>
public string ConfigName { get; set; }
/// <summary>
/// 配置代码
/// </summary>
public string ConfigNumber { get; set; }
/// <summary>
/// 打印数量
/// </summary>
public int PrintCount { get; set; }
/// <summary>
/// 标签宽度
/// </summary>
public decimal LabelWidth { get; set; }
/// <summary>
/// 标签长度
/// </summary>
public decimal LabelHeight { get; set; }
/// <summary>
/// 详细配置
/// </summary>
public List<IBluetoothPrintDetailConfig> ConfigDetails { get; set; }
}
/// <summary>
/// 蓝牙打印详细配置基类
/// </summary>
public class BluetoothPrintDetailConfigBase
{
/// <summary>
/// 元素类型
/// </summary>
public int ElementType { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机元素配置基类
/// </summary>
public class BluetoothPrintElementConfigBase_DT : BluetoothPrintDetailConfigBase
{
/// <summary>
/// 字段是否有默认值
/// </summary>
public bool IsDefaultValue { get; set; }
/// <summary>
/// 字段值
/// </summary>
public string FieldValue { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; }
}
/// <summary>
/// 蓝牙打印机配置类
/// </summary>
public class BluetoothPrintConfig : BluetoothPrintConfigBase, IBluetoothPrintConfig
{
}
/// <summary>
/// 蓝牙打印机详细配置类
/// </summary>
public class BluetoothPrintDetailConfig : BluetoothPrintDetailConfigBase, IBluetoothPrintDetailConfig
{
/// <summary>
/// 绑定字段名
/// </summary>
public string BindingFieldName { get; set; }
/// <summary>
/// 手动/自动编码
/// </summary>
public bool EncodeMode { get; set; }
/// <summary>
/// X轴左侧开始位置
/// </summary>
public decimal XAxisLeftBeginPosition { get; set; }
/// <summary>
/// Y轴顶部开始位置
/// </summary>
public decimal YAxisTopBeginPosition { get; set; }
/// <summary>
/// X轴方向放大倍率
/// </summary>
public decimal XAxisMultiplication { get; set; }
/// <summary>
/// Y轴方向放大倍率
/// </summary>
public decimal YAxisMultiplication { get; set; }
/// <summary>
/// 条码高度
/// </summary>
public decimal BarcodeHeight { get; set; }
/// <summary>
/// 条码宽度
/// </summary>
public decimal BarcodeWidth { get; set; }
/// <summary>
/// 窄条码线高度
/// </summary>
public decimal NarrowBarcodeLineHeight { get; set; }
/// <summary>
/// 宅条码线宽度
/// </summary>
public decimal NarrowBarcodeLineWidth { get; set; }
/// <summary>
/// 条码旋转角度
/// </summary>
public decimal BarcodeRotationAngle { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机配置类
/// </summary>
public class BluetoothPrintConfig_DT : BluetoothPrintConfigBase, IBluetoothPrintConfig
{
/// <summary>
/// 整体旋转角度
/// </summary>
public decimal Orientation { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机详细配置类
/// </summary>
public class BluetoothPrintDetailConfig_DT : IBluetoothPrintDetailConfig
{
public BluetoothPrintDetailConfig_DT()
{
ElementConfigs = new List<IElementConfig>();
}
/// <summary>
/// 配置的条码
/// </summary>
public string Barcode { get; set; }
/// <summary>
/// 元素配置集合
/// </summary>
public List<IElementConfig> ElementConfigs { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机方框配置
/// </summary>
public class BoxConfig : BluetoothPrintElementConfigBase_DT, IElementConfig
{
public decimal X { get; set; }
public decimal Y { get; set; }
public decimal Width { get; set; }
public decimal Height { get; set; }
public decimal LineWidth { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机文本配置
/// </summary>
public class TextConfig : BluetoothPrintElementConfigBase_DT, IElementConfig
{
public decimal X { get; set; }
public decimal Y { get; set; }
public decimal Width { get; set; }
public decimal Height { get; set; }
public decimal FontHeight { get; set; }
public string FontStyle { get; set; }
public decimal Orientation { get; set; }
public bool AutoReturn { get; set; }
public string BindingField { get; set; }
public bool IsInterceptText { get; set; }
public int InterceptLength { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机一维码配置
/// </summary>
public class BarcodeConfig : BluetoothPrintElementConfigBase_DT, IElementConfig
{
public decimal X { get; set; }
public decimal Y { get; set; }
public decimal Width { get; set; }
public decimal Height { get; set; }
public decimal TextHeight { get; set; }
public decimal Orientation { get; set; }
public string BindingField { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机二维码配置
/// </summary>
public class QRCodeConfig : BluetoothPrintElementConfigBase_DT, IElementConfig
{
public decimal X { get; set; }
public decimal Y { get; set; }
public decimal Width { get; set; }
public decimal Orientation { get; set; }
public string BindingField { get; set; }
}
/// <summary>
/// 德佟蓝牙打印机直线配置
/// </summary>
public class LineConfig : BluetoothPrintElementConfigBase_DT, IElementConfig
{
public decimal X1 { get; set; }
public decimal Y1 { get; set; }
public decimal X2 { get; set; }
public decimal Y2 { get; set; }
public decimal LineWidth { get; set; }
}
/// <summary>
/// 请求蓝牙打印机配置参数实体
/// </summary>
public class QueryPrintConfigModel
{
public string OrgId { get; set; }
public string ConfigNumber { get; set; }
public string PrinterBrand { get; set; }
public List<string> BarcodeList { get; set; }
}
public class PrintModel
{
public string DBAias { get; set; }
public string UserID { get; set; }
public string FMOULD { get; set; }
public List<string> FBarcode { get; set; }
}
}