diff --git a/app/Service/v3/Implementations/FeiePrintService.php b/app/Service/v3/Implementations/FeiePrintService.php index 074a192..858e7e0 100644 --- a/app/Service/v3/Implementations/FeiePrintService.php +++ b/app/Service/v3/Implementations/FeiePrintService.php @@ -55,6 +55,26 @@ class FeiePrintService implements FeiePrintServiceInterface // $item = (array)$item; // } $printSn = Feprint::query()->where('market_id',$data->market_id)->value('sn'); + if (env('APP_ENV') === 'dev') { + $client = new FeiePrintClient($this->feieHost, $this->feiePort); + $msgInfo = array( + 'user' => $this->feieUser, + 'stime' => time(), + 'sig' => sha1($this->feieUser . $this->feieUkey . time()), + 'apiname' => 'Open_queryPrinterStatus', + 'sn' => $printSn + ); + $client->post($this->feieApiPath, $msgInfo); + $result = json_decode($client->getContent(),true); + if($result['data'] != '在线,工作状态正常。'){ + return [ + 'msg' => 'ok', + 'ret' => 0, + 'data' => '920527381_20200927151404_1155818771', + 'serverExecutedTime' => 4 + ]; + } + } $content = $this->printFormat($data, 4, 14, 7, 7); $res = $this->printMsg($printSn, $content, 1); return $res; @@ -178,7 +198,11 @@ class FeiePrintService implements FeiePrintServiceInterface $orderInfo .= '联系电话:' . $tel . '
'; } $orderInfo .= '下单时间:' . $arr->pay_time_text . '
'; - $orderInfo .= '送达时间:' . $arr->delivery_time_note . '
'; + if($arr->shipping_type != 3 && $arr->delivery_money > 0) { + $orderInfo .= '送达时间:' . $arr->delivery_time_note . '
'; + }else{ + $orderInfo .= '自提时间:' . $arr->delivery_time_note . '
'; + } //$orderInfo .= 'http://www.feieyun.com';//把解析后的二维码生成的字符串用标签套上即可自动生成二维码 return $orderInfo; }