1
This commit is contained in:
@@ -152,7 +152,10 @@ func MakePrintMsgOnTempVoice(param map[string]string, setting *PrintSettingObj,
|
||||
|
||||
// 打运单
|
||||
if param[WayBillStatusPrint] != "" {
|
||||
switch param[WayBillStatusPrint] {
|
||||
case "15":
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 门店状态
|
||||
@@ -275,29 +278,34 @@ func PrinterOrderVoice(param map[string]string, setting *PrintSettingObj, userId
|
||||
}
|
||||
|
||||
// PrintWayBillOrderStatus 打印运单类通知消息
|
||||
func PrintWayBillOrderStatus(param map[string]string, setting *PrintSettingObj) {
|
||||
func PrintWayBillOrderStatus(param map[string]string, setting *PrintSettingObj) string {
|
||||
var (
|
||||
printVoiceMsg string //语音信息
|
||||
printVoiceValue = make([]interface{}, 0, 0)
|
||||
textMsg string // 文本信息
|
||||
err error
|
||||
textMsg string // 文本信息
|
||||
textMsgValue = make([]interface{}, 0, 0) // 文本信息
|
||||
)
|
||||
|
||||
switch param[WayBillStatusPrint] {
|
||||
case:
|
||||
if setting.PickingSetting.WaitPickingPrint == SettingOpen { // 打印订单
|
||||
textMsg, err = MakePrintMsgOnTemp(param, userId)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
case utils.Int2Str(WaybillStatusAccepted), utils.Int2Str(WaybillStatusCourierAssigned): // 分配骑手
|
||||
if setting.RiderVoiceSetting.RiderTakeOrder == 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>`
|
||||
textMsg += `<center><b>订单来源: %s</b></center><br>`
|
||||
textMsg += `<center><b>单号: #%s</b></center><br>`
|
||||
textMsgValue = append(textMsgValue, param[RiderNamePrint], param[RiderNamePrint], utils.Time2DateStr(time.Now()), param[VendorNamePrint], param[VendorOrderNoPrint])
|
||||
}
|
||||
if setting.PickingSetting.WaitPickingVoice == SettingOpen && setting.SystemVoice == SettingClose { // 订单通知
|
||||
printVoiceMsg += `<sound>%s</sound><sound>%s</sound>` // 你有订单未拣货
|
||||
printVoiceValue = append(printVoiceValue, WaitPickUpOrderVoice)
|
||||
printVoiceMsg, printVoiceValue = SyntheticSpeech(printVoiceMsg, printVoiceValue, param)
|
||||
}
|
||||
|
||||
}
|
||||
if setting.RiderVoiceSetting.RiderTakeOrderVoice == SettingOpen && setting.SystemVoice == SettingClose { // 骑手接单语音通知
|
||||
printVoiceMsg += `<sound>%s</sound><sound>%s</sound>` // 骑手已经接单了
|
||||
printVoiceValue = append(printVoiceValue, RiderGetOrderVoice)
|
||||
}
|
||||
|
||||
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)
|
||||
return voice + msg
|
||||
}
|
||||
|
||||
// PrintStoreStatus 打印门店状态
|
||||
|
||||
@@ -12,7 +12,7 @@ func init() {
|
||||
"5": FiveVoice,
|
||||
"6": SixVoice,
|
||||
"7": SevenVoice,
|
||||
"8": EightyVoice,
|
||||
"8": EightVoice,
|
||||
"9": NineVoice,
|
||||
"10": TenVoice,
|
||||
"20": TwentyVoice,
|
||||
@@ -149,5 +149,9 @@ const (
|
||||
AppIDPrint = "appId" // 应用id
|
||||
OrderStatusPrint = "orderStatus" // 订单状态
|
||||
WayBillStatusPrint = "wayBillStatus" // 运单状态
|
||||
StoreStatusPrint = "storeStatusPrint" // 门店状态
|
||||
StoreStatusPrint = "storeStatus" // 门店状态
|
||||
|
||||
RiderVendorIdPrint = "riderVendorId" // 骑手所属平台id
|
||||
RiderNamePrint = "riderName" // 骑手名称
|
||||
RiderPhonePrint = "riderPhone" // 骑手电话
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user