Jelajahi Sumber

电量优化

unknown 1 bulan lalu
induk
melakukan
74eb5dfae1
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      application/api/controller/PowerManagement.php

+ 4 - 4
application/api/controller/PowerManagement.php

@@ -131,8 +131,8 @@ class PowerManagement extends Api
                 ->where(function($query) use ($month) {
                     $startDate = $month . '-01';
                     $endDate = date('Y-m-d', strtotime($startDate . ' +1 month'));
-                    $query->where('开工时间', '>=', $startDate)
-                        ->where('开工时间', '<', $endDate);
+                    $query->where('sczl_rq', '>=', $startDate)
+                        ->where('sczl_rq', '<', $endDate);
                 })
                 ->select();
 
@@ -160,7 +160,7 @@ class PowerManagement extends Api
     {
         return db('设备_产量计酬')
             ->field('主电表, 辅电表')
-            ->where('开工时间', 'like', "$date%")
+            ->where('sczl_rq', 'like', "$date%")
             ->where('主电表', '<>', 0)
             ->where('辅电表', '<>', 0)
             ->where('sczl_jtbh', $machineId)
@@ -188,7 +188,7 @@ class PowerManagement extends Api
         // 转换为标准日期格式
         $month = substr($param['mouth'], 0, 4) . '-' . substr($param['mouth'], 4, 2);
         $where = [
-            '开工时间' => ['like',$month.'%'],
+            'sczl_rq' => ['like',$month.'%'],
             'sczl_jtbh' => $param['machine'],
             '主电表' => ['<>',0]
         ];