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)
|
textMsgValue = make([]interface{}, 0, 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
// 离线打印文本开启
|
switch utils.Str2Int(param[model.StoreStatusPrint]) {
|
||||||
if setting.PickingSetting.BusinessOffLine == model.SettingOpen {
|
case -9:
|
||||||
textMsg += `<center><b>门店下线通知</b></center><br>`
|
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>平台:%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()))
|
textMsgValue = append(textMsgValue, param[model.StoreNamePrint], param[model.VendorNamePrint], utils.Time2DateStr(time.Now()))
|
||||||
}
|
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)
|
||||||
if setting.SystemVoice == model.SettingOpen && setting.PickingSetting.BusinessOffLineVoice == model.SettingOpen {
|
return voice + msg
|
||||||
printVoiceMsg += `<sound>%s</sound>`
|
default:
|
||||||
printVoiceValue = append(printVoiceValue, model.StoreOfflineVoice)
|
// 离线打印文本开启
|
||||||
}
|
if setting.PickingSetting.BusinessOffLine == model.SettingOpen {
|
||||||
voice := strings.Replace(fmt.Sprintf(strings.Replace(printVoiceMsg, "\n", "", -1), printVoiceValue...), "\\n", "\r\n", -1)
|
textMsg += `<center><b>门店下线通知</b></center><br>`
|
||||||
msg := strings.Replace(fmt.Sprintf(strings.Replace(textMsg, "\n", "", -1), textMsgValue...), "\\n", "\r\n", -1)
|
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号订单)
|
// SyntheticSpeech 合成语音 (美团xxx号订单)
|
||||||
|
|||||||
Reference in New Issue
Block a user