shizhongqi vor 4 Jahren
Ursprung
Commit
53f0153ce1
1 geänderte Dateien mit 1 neuen und 20 gelöschten Zeilen
  1. 1 20
      biz-ghs/order/services/RefundOrderService.php

+ 1 - 20
biz-ghs/order/services/RefundOrderService.php

@@ -76,8 +76,7 @@ class RefundOrderService extends BaseService
                 $num = $currentProduct['num'] ?? 0;
                 $xhUnitName = $currentProduct['unitName'] ?? '';
                 $xhUnitPrice = $currentProduct['unitPrice'] ?? '';
-                //$unitType = $currentProduct['unitType'] ?? 0;
-                $unitType = self::getUnitType($xhUnitName);
+                $unitType = $currentProduct['unitType'] ?? 0;
 
                 $xhPrice = bcmul($num, $xhUnitPrice, 2);
 
@@ -274,22 +273,4 @@ class RefundOrderService extends BaseService
 
         return $refund;
     }
-
-    private static function getUnitType($unitName)
-    {
-        if (empty($unitName)) {
-            util::fail('单位名称不正确');
-        }
-
-        if ($unitName == '支') {
-            return dict::getDict('unitType', 'small');
-        }
-
-        if ($unitName == '扎' || $unitName == '盒') {
-            return dict::getDict('unitType', 'big');
-        }
-
-        util::fail($unitName . ' - 单位名称不存在');
-    }
-
 }