URL地址:http://DeviceIP:8099/customPrintingOfTickets
支持Post方法
请求参数
字段 | 类型 | 必填 | 描述 | 示例值 |
deviceno | string | 是 | ||
sign | string | 是 | ||
timestemp |
string | 是 | ||
data |
json | 是 | 表示的是Json数组的字符串 |
data Json数据结构字段如下:
字段 | 类型 | 必填 | 描述 | 示例值 |
itemList | List<Item> | 是 |
Item 的数据格字段如下:
字段 | 类型 | 必填 | 描述 | 示例值 |
type | int | 否 | 文本数据的类型 |
不填该字段,默认是0; 0:表示普通的文本数据; 1:表示二维码的文本数据; |
alignType | int | 否 | 对齐方式 |
不填该字段,默认是0 |
boldStyle | int | 否 | 是否粗体 |
不填该字段,默认是0 |
widthLarge | int | 否 | 字体宽度变大设置 |
不填该字段,默认是0 |
heightLarge | int | 否 | 字体高度变大设置 |
不填该字段,默认是0 |
text | String | 是 | 数据内容 |
注意:小票一行最多显示中文数位16个,英文字符显示的个数为32个(58mm宽度);宽度80mm,可以打24个中文字符; |
实例数据为:
{
"data": {
"itemList": [{
"type": 0,
"alignType": 1,
"text": "自定义的停车小票"
}, {
"type": 0,
"text": "交 易 号:123456789789"
}, {
"type": 0,
"text": "车 牌:粤A123456"
}, {
"type": 0,
"text": "入场时间:2020-10-22 12:00:00"
}, {
"type": 0,
"text": "离场时间:2020-10-22 14:00:23"
}, {
"type": 0,
"text": "项 目:停车费"
}, {
"type": 0,
"text": "金 额:12:00"
}, {
"type": 0,
"text": "--------------------------------"
}, {
"type": 0,
"text": "温馨提示:"
}, {
"type": 0,
"text": "1.此收据是您获取电子发票的唯一凭证,请妥善保管。"
}, {
"type": 0,
"text": "2.如您需要当日的电子发票,请在消费当日申请。"
}, {
"type": 0,
"text": "3.二维码有效期为30天。"
}, {
"type": 0,
"text": "4.服务电话:0731-0000000"
}, {
"type": 0,
"text": "5.增值税电子普通发票的法律权利,基本用途、基本使用固定与税负机关监制的增值税普通发票相同,可以作为报销凭证。"
}, {
"type": 0,
"text": "6.如果您对增值税电子普通发票有任何疑问,请拨打12366税负服务热线咨询。"
}, {
"type": 0,
"text": "--------------------------------"
}, {
"type": 0,
"text": "因为交易数据上传需要时间, 请在离场10分钟后, 扫描以下二维码开局发票。"
}, {
"type": 1,
"text": "https://www.baidu.com/baidu?tn=monline_3_dg&ie=utf-8&wd=urlencoder+%E5%9C%A8%E7%BA%BF%E7%BC%96%E7%A0%81"
}, {
"type": 0,
"text": "--------------------------------"
}, {
"text": "找零红包二维码"
}, {
"type": 1,
"text": "https://www.baidu.com/baidu?tn=monline_3_dg&ie=utf-8&wd=urlencoder+%E5%9C%A8%E7%BA%BF%E7%BC%96%E7%A0%81"
}]
},
"timestemp": "now",
"sign": "968E67E4D26C36A6A90813A1001CDED2",
"deviceno": "78uihdahfhda"
}
设备响应参数
字段 | 类型 | 必填 | 描述 | 示例值 |
resultCode | string | 是 | 0表示成功,1,表示失败 | 0 |
msg | string | 是 | 请求的消息 |