package jxprint

import (
	"git.rosy.net.cn/baseapi/utils"
	"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
	"testing"
)

func TestPrintMsg(t *testing.T) {
	status, err := CurPrinterHandler.PrintMsg(jxcontext.AdminCtx, "120220915001877", "1", "test", `{
	"allSkuCount": "2",
	"allSkuTypeCount": "1",
	"appId": "1000",
	"businessType": "1",
	"buyerComment": "(缺货时电话与我联系)",
	"consigneeAddress": "胜浦街道苏州市吴中区新胜路1号",
	"consigneeMobile": "18468578703,380",
	"consigneeName": "刘*****",
	"eBaiOrderNo": "好菜鲜生",
	"eBailCode": "1126",
	"officialName": "京西菜市",
	"orderNo": "4016410104553361126",
	"orderStatus": "5",
	"payOrderTime": "2023-03-22 11:15:06",
	"qrcOrder": "4016410104553361126",
	"skuList": "[{\"skuName\":\"【精选好价】肥瘦五花肉（下午易缺货）250g/组\",\"skuCount\":\"X2\",\"salePrice\":\"￥22.10\",\"totalCountPrice\":\"￥44.20\",\"upc\":\"\"}]",
	"storeName": "好菜鲜生(胜浦中胜路店)",
	"storeTel": "13205196216",
	"trySendTime": "2023-03-22 11:45:13",
	"userPayMoney": "￥43.20",
	"vendorID": "3",
	"vendorName": "饿百新零售",
	"vendorOrderNo": "5"
}`)
	t.Log(utils.Format4Output(status, false))
	if err != nil {
		t.Fatal(err)
	}
}

func TestGetPrintStatus(t *testing.T) {
	status, err := CurPrinterHandler.GetPrinterStatus(jxcontext.AdminCtx, "20220818000001", "1")
	t.Log(utils.Format4Output(status, false))
	if err != nil {
		t.Fatal(err)
	}
}
