From 6ce9c708dc8cfde2ded711716705c8d3d0ea51ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 27 Jul 2022 18:13:41 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp_utils.go | 1 + business/jxstore/event/print_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index 4ea7d89ed..c599c67e7 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -487,6 +487,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) { // 将语音包转换为十六进制 voice := "" for _, v := range strings.Split(sound, "2c") { + voice += hexSignSoundSolidification soundNum, _ := hex.DecodeString(v) // 十六进制转字符串 intSound, _ := strconv.ParseInt(string(soundNum), 10, 64) int16Sound := strconv.FormatInt(intSound, 16) diff --git a/business/jxstore/event/print_test.go b/business/jxstore/event/print_test.go index 9241ec03c..674f79f73 100644 --- a/business/jxstore/event/print_test.go +++ b/business/jxstore/event/print_test.go @@ -14,7 +14,7 @@ func TestPrintMsg(t *testing.T) { msg := &model.PrintMsg{ ModelIDCULD: model.ModelIDCULD{}, PrintNo: "20220707000002", - Content: "10", + Content: "64,64,66", OrderNo: 202207261655, Status: 0, Comment: "",