1
This commit is contained in:
@@ -408,23 +408,38 @@ func PrintStoreStatus(param map[string]string, setting *model.PrintSettingObj) s
|
||||
textMsgValue = make([]interface{}, 0, 0)
|
||||
)
|
||||
|
||||
// 离线打印文本开启
|
||||
if setting.PickingSetting.BusinessOffLine == model.SettingOpen {
|
||||
textMsg += `<center><b>门店下线通知</b></center><br>`
|
||||
switch utils.Str2Int(param[model.StoreStatusPrint]) {
|
||||
case -9:
|
||||
printVoiceMsg += `<sound>%s</sound>`
|
||||
printVoiceValue = append(printVoiceValue, model.LoseTokenVoice)
|
||||
textMsg += `<center><b>门店丢失授权通知</b></center><br>`
|
||||
textMsg += `<center><b>门店:%s</b></center><br>`
|
||||
textMsg += `<center><b>平台:%s</b></center><br>`
|
||||
textMsg += `<center><b>下线时间:%s</b></center><br>`
|
||||
textMsg += `<center><b>授权丢失,将无法继续打压订单!!!!</b></center><br>`
|
||||
textMsgValue = append(textMsgValue, param[model.StoreNamePrint], param[model.VendorNamePrint], utils.Time2DateStr(time.Now()))
|
||||
}
|
||||
// 离线打印语音开启
|
||||
if setting.SystemVoice == model.SettingOpen && setting.PickingSetting.BusinessOffLineVoice == model.SettingOpen {
|
||||
printVoiceMsg += `<sound>%s</sound>`
|
||||
printVoiceValue = append(printVoiceValue, model.StoreOfflineVoice)
|
||||
}
|
||||
voice := strings.Replace(fmt.Sprintf(strings.Replace(printVoiceMsg, "\n", "", -1), printVoiceValue...), "\\n", "\r\n", -1)
|
||||
msg := strings.Replace(fmt.Sprintf(strings.Replace(textMsg, "\n", "", -1), textMsgValue...), "\\n", "\r\n", -1)
|
||||
voice := strings.Replace(fmt.Sprintf(strings.Replace(printVoiceMsg, "\n", "", -1), printVoiceValue...), "\\n", "\r\n", -1)
|
||||
msg := strings.Replace(fmt.Sprintf(strings.Replace(textMsg, "\n", "", -1), textMsgValue...), "\\n", "\r\n", -1)
|
||||
return voice + msg
|
||||
default:
|
||||
// 离线打印文本开启
|
||||
if setting.PickingSetting.BusinessOffLine == model.SettingOpen {
|
||||
textMsg += `<center><b>门店下线通知</b></center><br>`
|
||||
textMsg += `<center><b>门店:%s</b></center><br>`
|
||||
textMsg += `<center><b>平台:%s</b></center><br>`
|
||||
textMsg += `<center><b>下线时间:%s</b></center><br>`
|
||||
textMsgValue = append(textMsgValue, param[model.StoreNamePrint], param[model.VendorNamePrint], utils.Time2DateStr(time.Now()))
|
||||
}
|
||||
// 离线打印语音开启
|
||||
if setting.SystemVoice == model.SettingOpen && setting.PickingSetting.BusinessOffLineVoice == model.SettingOpen {
|
||||
printVoiceMsg += `<sound>%s</sound>`
|
||||
printVoiceValue = append(printVoiceValue, model.StoreOfflineVoice)
|
||||
}
|
||||
voice := strings.Replace(fmt.Sprintf(strings.Replace(printVoiceMsg, "\n", "", -1), printVoiceValue...), "\\n", "\r\n", -1)
|
||||
msg := strings.Replace(fmt.Sprintf(strings.Replace(textMsg, "\n", "", -1), textMsgValue...), "\\n", "\r\n", -1)
|
||||
|
||||
return voice + msg
|
||||
return voice + msg
|
||||
}
|
||||
}
|
||||
|
||||
// SyntheticSpeech 合成语音 (美团xxx号订单)
|
||||
|
||||
Reference in New Issue
Block a user