cqp 2 týždňov pred
rodič
commit
bed70ada54

+ 1 - 1
app/Service/StatisticsService.php

@@ -600,7 +600,7 @@ class StatisticsService extends Service
         $result = [];
         // 需要合计的字段
         $sumFields = ['xs', 'weight', 'freight_amount', 'js_amount', 'customer_store_zx_fee', 'jj_fee', 'dh_fee', 'total_amount'];
-        $sumFields_map = ['freight_amount' => 4, 'js_amount' => 4,'customer_store_zx_fee' => 4, 'jj_fee' => 4, 'dh_fee' => 4, 'total_amount' => 4];
+        $sumFields_map = ['weight' => 4,'freight_amount' => 4, 'js_amount' => 4,'customer_store_zx_fee' => 4, 'jj_fee' => 4, 'dh_fee' => 4, 'total_amount' => 4];
 
         // 业务类型 日期 地区 算一张表算运费
         foreach ($return as $g => $group) {

+ 2 - 2
app/Service/TPlusServerService.php

@@ -1134,7 +1134,7 @@ class TPlusServerService extends Service
                 $table->decimal('sl_fee', 10, 2)->default(0)->comment('上楼费');
                 // 新增的计算字段
                 $table->integer('xs')->default(0)->comment('箱数');
-                $table->decimal('weight', 12, 3)->default(0)->comment('总重量(kg)');
+                $table->decimal('weight', 12, 4)->default(0)->comment('总重量(kg)');
                 $table->tinyInteger('area_range')->default(1)->comment('运价区间 (1: <5kg, 2: >=5kg)');
                 $table->decimal('freight_unit_price', 10, 2)->default(0)->comment('配送费单价');
                 $table->decimal('freight_amount', 12, 4)->default(0)->comment('配送费金额');
@@ -1229,7 +1229,7 @@ class TPlusServerService extends Service
                     $dataArray[$key]['xs'] = $xs;
                     //总重量
                     $weight = 0;
-                    if(! empty($value['product_weight']) && is_numeric($value['product_weight']) && $value['product_weight'] > 0) $weight = bcdiv(bcmul($xs, $value['product_weight']),1000,3);
+                    if(! empty($value['product_weight']) && is_numeric($value['product_weight']) && $value['product_weight'] > 0) $weight = bcdiv(bcmul($xs, $value['product_weight']),1000,4);
                     $dataArray[$key]['weight'] = $weight;
                     //运价区间
                     $area_range = 1;