shish 3 년 전
부모
커밋
9f45e37f77
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      app-pt/controllers/TestController.php

+ 7 - 4
app-pt/controllers/TestController.php

@@ -47,7 +47,7 @@ class TestController extends PublicController
         $pfSendCost = 0;
         $where = ['mainId' => $mainId, 'status' => ['in', [OrderClass::ORDER_STATUS_UN_SEND, OrderClass::ORDER_STATUS_SENDING, OrderClass::ORDER_STATUS_COMPLETE]]];
         $where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
-print_r($where);
+        print_r($where);
         $ghsOrderList = OrderClass::getAllByCondition($where, null, '*');
         if (!empty($ghsOrderList)) {
             foreach ($ghsOrderList as $ghsKey => $ghsOrder) {
@@ -57,7 +57,7 @@ print_r($where);
                 $pfSendCost = bcadd($pfSendCost, $sendCost, 2);
             }
         }
-        echo ' '.$pfIncome.' ';
+        echo ' ' . $pfIncome . ' ';
         echo "==================";
 
 
@@ -191,12 +191,14 @@ print_r($where);
         //批发开单
         $where = ['mainId' => $mainId, 'status' => ['in', [OrderClass::ORDER_STATUS_UN_SEND, OrderClass::ORDER_STATUS_SENDING, OrderClass::ORDER_STATUS_COMPLETE]]];
         $where['payTime'] = ['between', [$currentStartTime, $currentEndTime]];
-print_r($where);
+        print_r($where);
         $ghsOrderList = OrderClass::getAllByCondition($where, null, '*');
+        $ghsTotal = 0;
         if (!empty($ghsOrderList)) {
             foreach ($ghsOrderList as $ghsKey => $ghsOrder) {
                 $payWay = $ghsOrder['payWay'] ?? 0;
                 $actPrice = $ghsOrder['actPrice'] ?? 0;
+                $ghsTotal = bcadd($ghsTotal, $actPrice, 2);
                 $getStaffId = $ghsOrder['getStaffId'] ?? 0;
                 $debtPrice = $ghsOrder['debtPrice'] ?? 0;
                 $remainDebtPrice = $ghsOrder['remainDebtPrice'] ?? 0;
@@ -276,7 +278,8 @@ print_r($where);
             $current = $i['amount'] ?? 0;
             $total = bcadd($current, $total, 2);
         }
-        echo ' '.$total.' ';
+        echo ' '.$ghsTotal.' ';
+        echo ' ' . $total . ' ';
         print_r($incomeList);
         die;
     }