1
This commit is contained in:
@@ -421,7 +421,6 @@ func PrinterOrderVoice(param map[string]string, setting *model.PrintSettingObj,
|
|||||||
rejectionValue = append(rejectionValue, param[model.OrderNoPrint], param[model.VendorNamePrint], param[model.VendorOrderNoPrint], param[model.CustcareRefundReasonPrint], utils.Time2DateStr(time.Now()))
|
rejectionValue = append(rejectionValue, param[model.OrderNoPrint], param[model.VendorNamePrint], param[model.VendorOrderNoPrint], param[model.CustcareRefundReasonPrint], utils.Time2DateStr(time.Now()))
|
||||||
textMsg = strings.Replace(fmt.Sprintf(strings.Replace(rejection, "\n", "", -1), rejectionValue...), "\\n", "\r\n", -1)
|
textMsg = strings.Replace(fmt.Sprintf(strings.Replace(rejection, "\n", "", -1), rejectionValue...), "\\n", "\r\n", -1)
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
|
|
||||||
voice := strings.Replace(fmt.Sprintf(strings.Replace(printVoiceMsg, "\n", "", -1), printVoiceValue...), "\\n", "\r\n", -1)
|
voice := strings.Replace(fmt.Sprintf(strings.Replace(printVoiceMsg, "\n", "", -1), printVoiceValue...), "\\n", "\r\n", -1)
|
||||||
@@ -472,11 +471,11 @@ func PrintStoreStatus(param map[string]string, setting *model.PrintSettingObj) s
|
|||||||
case -9:
|
case -9:
|
||||||
printVoiceMsg += `<sound>%d</sound>`
|
printVoiceMsg += `<sound>%d</sound>`
|
||||||
printVoiceValue = append(printVoiceValue, model.LoseTokenVoice)
|
printVoiceValue = append(printVoiceValue, model.LoseTokenVoice)
|
||||||
textMsg += `<center><b>门店丢失授权通知</b></center><br>`
|
textMsg += `<left><b>门店丢失授权通知</b></left><br>`
|
||||||
textMsg += `<center><b>门店:%s</b></center><br>`
|
textMsg += `<left><b>门店:%s</b></left><br>`
|
||||||
textMsg += `<center><b>平台:%s</b></center><br>`
|
textMsg += `<left><b>平台:%s</b></left><br>`
|
||||||
textMsg += `<center><b>下线时间:%s</b></center><br>`
|
textMsg += `<left><b>下线时间:%s</b></left><br>`
|
||||||
textMsg += `<center><b>授权丢失,将无法继续打压订单!!!!</b></center><br>`
|
textMsg += `<left><b>授权丢失,将无法继续打压订单!!!!</b></left><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)
|
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)
|
msg := strings.Replace(fmt.Sprintf(strings.Replace(textMsg, "\n", "", -1), textMsgValue...), "\\n", "\r\n", -1)
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ func DelPrinterSeq(appID int, printNo string) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func DoPrint(appID int, msgID, printNo, content string, orderNo string) (err error) {
|
func DoPrintMsg(appID int, msgID, printNo, content string, orderNo string) (err error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/dao"
|
"git.rosy.net.cn/jx-callback/business/dao"
|
||||||
@@ -367,9 +368,12 @@ func (c *ApiController) DoPrint(dataMap map[string]interface{}) (data, errCode s
|
|||||||
globals.SugarLogger.Debugf("MakePrintMsgOnTempVoice 4 err := %v", err)
|
globals.SugarLogger.Debugf("MakePrintMsgOnTempVoice 4 err := %v", err)
|
||||||
return "", model.ErrCodeGeneralFailed, err
|
return "", model.ErrCodeGeneralFailed, err
|
||||||
}
|
}
|
||||||
|
if printMsg == "" {
|
||||||
|
return "", model.ErrCodeGeneralFailed, errors.New("无打印数据")
|
||||||
|
}
|
||||||
content = printMsg
|
content = printMsg
|
||||||
|
|
||||||
if err = cms.DoPrint(appID, msgID, printNo, content, orderNo); err != nil {
|
if err = cms.DoPrintMsg(appID, msgID, printNo, content, orderNo); err != nil {
|
||||||
globals.SugarLogger.Debugf("DoPrint 5 err := %v", err)
|
globals.SugarLogger.Debugf("DoPrint 5 err := %v", err)
|
||||||
return "", model.ErrCodeGeneralFailed, err
|
return "", model.ErrCodeGeneralFailed, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user