|
|
@@ -15,6 +15,8 @@ use App\Waybill;
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
use Illuminate\Support\Carbon;
|
|
|
+use Illuminate\Support\Facades\DB;
|
|
|
+use Illuminate\Support\Facades\Log;
|
|
|
|
|
|
class WeightService
|
|
|
{
|
|
|
@@ -77,7 +79,13 @@ class WeightService
|
|
|
|
|
|
|
|
|
// 5、更新包裹信息
|
|
|
- $bool = $this->updateOrderPackage($orderPackage, $params, $measuringMachine);
|
|
|
+ try {
|
|
|
+ $bool = $this->updateOrderPackage($orderPackage, $params, $measuringMachine);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ $result = DB::select('select * from information_schema.innodb_trx');
|
|
|
+ Log::warning("包裹称重",["message"=>json_encode($result),"param"=>json_encode($result)]);
|
|
|
+ return $this->getWeightMessage($orderPackage, $e->getMessage());
|
|
|
+ }
|
|
|
// 6、称重时间
|
|
|
if ($bool) $this->afterApply($orderPackage);
|
|
|
else {
|