diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index b93566232..8539f4ecc 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -484,7 +484,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) { //printer.Sound = "sounda" //if printer, _ := dao.GetPrinter(dao.GetDB(), printMsg.PrintNo); printer != nil { //先把结束标签消了 - result = strings.ReplaceAll(result, byteSignSoundE, "") + result = strings.ReplaceAll(result, byteSignSoundE, "") // 3c736f756e643e 3230 3c736f756e643e //fd 固定 //001a (声音数据长度高八位低八位) //0101 固定 @@ -505,6 +505,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) { int16Sound := strconv.FormatInt(intSound, 16) voice += int16Sound } + fmt.Println("voice=========", voice) //voiceDataGBK, _ := jxutils.Utf8ToGbk([]byte(voice)) //voiceData := hex.EncodeToString(voiceDataGBK) @@ -518,6 +519,7 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) { //soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2)) //result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr) + result = strings.ReplaceAll(result, sound, "") result = strings.ReplaceAll(result, byteSignSound, hexSignSoundOld+voice) //} }