cqp hai 3 semanas
pai
achega
f70d94a77e
Modificáronse 1 ficheiros con 13 adicións e 2 borrados
  1. 13 2
      app/Service/TestService.php

+ 13 - 2
app/Service/TestService.php

@@ -468,14 +468,22 @@ class TestService extends Service
         $today = (new \DateTime())->setTime(0, 0, 0)->format('Y-m-d H:i:s') . '.000';
         $today = (new \DateTime())->setTime(0, 0, 0)->format('Y-m-d H:i:s') . '.000';
         $fourDaysAgo = (new \DateTime())->sub(new \DateInterval('P4D'))->setTime(0, 0, 0)->format('Y-m-d H:i:s') . '.000';
         $fourDaysAgo = (new \DateTime())->sub(new \DateInterval('P4D'))->setTime(0, 0, 0)->format('Y-m-d H:i:s') . '.000';
 
 
+        $page = $data['pageSize'] ?? 10;
+        $version = $data['version'] ?? 0;
+        $start_time = $data['start_time'] ?? $today;
+        $end_time = $data['end_time'] ?? $today;
+        $order_number = $data['order_number'] ?? '';
+
         $header = ["Authorization: {$token}",'Content-Type:application/json'];
         $header = ["Authorization: {$token}",'Content-Type:application/json'];
         $url = $host . "/api/System/SqlQuery";
         $url = $host . "/api/System/SqlQuery";
         $json = [
         $json = [
             'customSQLFileName' => "U8SQL",
             'customSQLFileName' => "U8SQL",
             'customSQLPath' => 'U8API/SO_SOMain/Get',
             'customSQLPath' => 'U8API/SO_SOMain/Get',
             'paramObj' => [
             'paramObj' => [
-                "@pagesize" => 10,
-                "@where" => "AND m.dcreatesystime >= '$today' AND m.dDate >= '$today'",
+                "@pagesize" => $page,
+                "@where" => "AND m.dDate >= '$start_time' AND m.dDate <= '$end_time'",
+                "@code" => $order_number,
+                "@version" => $version,
             ]
             ]
         ];
         ];
         $json = json_encode($json);
         $json = json_encode($json);
@@ -537,6 +545,7 @@ class TestService extends Service
                     'total_qty' => $total_qty,
                     'total_qty' => $total_qty,
                     'total_money' => $money,
                     'total_money' => $money,
                     'remark' => $value['cmemo'] ?? '',
                     'remark' => $value['cmemo'] ?? '',
+                    'version' => $value['version'],
                     'detail' => $return_detail,
                     'detail' => $return_detail,
                 ];
                 ];
             }
             }
@@ -582,6 +591,7 @@ class TestService extends Service
                     'total_qty' => $total_qty,
                     'total_qty' => $total_qty,
                     'total_money' => $money,
                     'total_money' => $money,
                     'remark' => $value['cmemo'] ?? '',
                     'remark' => $value['cmemo'] ?? '',
+                    'version' => $value['version'],
                     'detail' => $return_detail,
                     'detail' => $return_detail,
                 ];
                 ];
             }
             }
@@ -624,6 +634,7 @@ class TestService extends Service
                     'total_qty' => $total_qty,
                     'total_qty' => $total_qty,
                     'total_money' => $money,
                     'total_money' => $money,
                     'remark' => $value['cmemo'] ?? '',
                     'remark' => $value['cmemo'] ?? '',
+                    'version' => $value['version'],
                     'detail' => $return_detail,
                     'detail' => $return_detail,
                 ];
                 ];
             }
             }