|
|
@@ -47,7 +47,7 @@ class printUtil
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public function printMsg($content, $shop = null)
|
|
|
+ public function printMsg($content, $shop = null, $orderSn = '')
|
|
|
{
|
|
|
$time = time(); //请求时间
|
|
|
$msgInfo = array(
|
|
|
@@ -60,9 +60,9 @@ class printUtil
|
|
|
'times' => $this->times//打印次数
|
|
|
);
|
|
|
$client = new \HttpClient(self::IP, self::PORT);
|
|
|
- if (!$client->post(self::PATH, $msgInfo)) {
|
|
|
+ //if (!$client->post(self::PATH, $msgInfo)) {
|
|
|
//echo 'error';
|
|
|
- } else {
|
|
|
+ //} else {
|
|
|
//服务器返回的JSON字符串,建议要当做日志记录起来
|
|
|
$result = $client->getContent();
|
|
|
Yii::info('打印日志:' . $result);
|
|
|
@@ -72,7 +72,7 @@ class printUtil
|
|
|
$sjName = $shop->merchantName ?? '';
|
|
|
$mainId = $shop->mainId ?? 0;
|
|
|
$shopName = $shop->shopName ?? '';
|
|
|
- noticeUtil::push($sjName . ' ' . $shopName . '有订单打印未成功,报错内容:' . $msg, '15280215347');
|
|
|
+ noticeUtil::push($sjName . $shopName . "出现订单打印未成功{$orderSn},报错内容:" . $msg, '15280215347');
|
|
|
$staffList = ShopAdminClass::getAllByCondition(['mainId' => $mainId], null, '*', null, true);
|
|
|
if (!empty($staffList)) {
|
|
|
foreach ($staffList as $staff) {
|
|
|
@@ -87,7 +87,7 @@ class printUtil
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
public function signature($time)
|