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