|
|
@@ -273,6 +273,7 @@ class OrderController extends BaseController
|
|
|
$priceMap = \bizGhs\custom\classes\CustomClass::$levelPriceKeyMap;
|
|
|
$addPriceMap = \bizGhs\custom\classes\CustomClass::$levelAddPriceKeyMap;
|
|
|
$totalWeight = 0;
|
|
|
+ $totalNum = 0;
|
|
|
foreach ($productList as $eleKey => $element) {
|
|
|
$level = 0;
|
|
|
$productId = $element['productId'];
|
|
|
@@ -288,6 +289,7 @@ class OrderController extends BaseController
|
|
|
$weight = $current['weight'] ?? 0;
|
|
|
$currentWeight = bcmul($num, $weight, 2);
|
|
|
$totalWeight = bcadd($totalWeight, $currentWeight, 2);
|
|
|
+ $totalNum = bcadd($totalNum, $num);
|
|
|
}
|
|
|
$post['product'] = $productList;
|
|
|
|
|
|
@@ -304,7 +306,7 @@ class OrderController extends BaseController
|
|
|
'cargo_weight' => intval($totalWeight * 1000), // 单位:克 -- 把千克转换为克 ---- 重量(用户未知)-- 大概
|
|
|
'cargo_price' => intval($modifyPrice * 100), // 单位:分 -- 把元转换为分
|
|
|
'cargo_type' => IntraCityExpress::GOODS_TYPE_FLOWER,
|
|
|
- 'cargo_num' => 1
|
|
|
+ 'cargo_num' => $totalNum
|
|
|
];
|
|
|
$customName = $custom->name;
|
|
|
$customMobile = $custom->mobile;
|
|
|
@@ -343,8 +345,8 @@ class OrderController extends BaseController
|
|
|
$distance = $result['distance'] ?? 0;
|
|
|
$sendCost = bcdiv($fee, 100, 2);
|
|
|
$post['sendCost'] = $sendCost;
|
|
|
+ noticeUtil::push("运费:{$sendCost} 重量:{$totalWeight} 距离:{$distance} 姓名:{$customName} 手机号 {$customMobile} 经纬 {$originalLng} {$originalLat} 金额:{$modifyPrice} 数量:{$totalNum}", '15280215347');
|
|
|
$modifyPrice = bcadd($modifyPrice, $sendCost, 2);
|
|
|
- noticeUtil::push("运费:{$sendCost} 重量:{$totalWeight} 距离:{$distance} {$customName} {$customMobile} 经纬 {$originalLng} {$originalLat}", '15280215347');
|
|
|
}
|
|
|
|
|
|
$post['modifyPrice'] = $modifyPrice;
|