Browse Source

列表接口总数返回

曹鹤洋 1 year ago
parent
commit
328a1026a1

+ 2 - 0
application/api/controller/LargeWasteRewardPunish.php

@@ -80,6 +80,7 @@ class LargeWasteRewardPunish extends Api
             ->page($page,$limit)
             ->select();
 
+        $total = db()->table('db_大废品')->where($where)->count();
         $gd = db()->table('工单_基本资料')->column('Gd_gdbh, Gd_cpmc');
         $rs = db()->table('人事_基本资料')->column('员工编号, 员工姓名');
         foreach ($rows as $key=>$value) {
@@ -92,6 +93,7 @@ class LargeWasteRewardPunish extends Api
         }
 
         $data = [
+            'total'          => $total,
             'rows'          => $rows,
         ];
         $this->success('成功',$data);

+ 1 - 3
application/api/controller/OtherCountDocument.php

@@ -107,9 +107,7 @@ class OtherCountDocument extends Api
             ->page($page,$limit)
             ->order('Sczl_rq asc, UniqId asc')
             ->select();
-        $total = db()->table('db_拉料计件')
-            ->where($where)
-            ->count();
+        $total = db()->table('db_拉料计件')->where($where)->count();
         $gd = db()->table('工单_基本资料')->column('Gd_gdbh, Gd_cpmc');
         $rs = db()->table('人事_基本资料')->column('员工编号, 员工姓名');
         foreach ($rows as $key=>$value) {

+ 2 - 0
application/api/controller/PackagingCountDocument.php

@@ -94,6 +94,7 @@ class PackagingCountDocument extends Api
             ->where($where)
             ->page($page,$limit)
             ->select();
+        $total = db()->table('db_包装计件')->where($where)->count();
         $rs = db()->table('人事_基本资料')->column('员工编号, 员工姓名');
         foreach ($rows as $key=>$value) {
             $rows[$key]['mod_rq'] = $value['mod_rq']=='1900-01-01 00:00:00' ? '' :$value['mod_rq'];
@@ -101,6 +102,7 @@ class PackagingCountDocument extends Api
         }
 
         $data = [
+            'total'          => $total,
             'rows'          => $rows,
         ];
         $this->success('成功',$data);

+ 3 - 0
application/api/controller/PackagingProcessOutput.php

@@ -94,6 +94,8 @@ class PackagingProcessOutput extends Api
             ->where($where)
             ->page($page,$limit)
             ->select();
+        $total = db()->table('db_包装产量预报')->where($where)->count();
+
         $sczl_cls = $sczl_PgCls = 0;
         foreach ($rows as $key=>$value){
             $sczl_cls += $value['sczl_cl'];
@@ -103,6 +105,7 @@ class PackagingProcessOutput extends Api
         $data = [
             'sczl_cls'      => $sczl_cls,
             'sczl_PgCls'    => $sczl_PgCls,
+            'total'    => $total,
             'rows'          => $rows,
         ];
         $this->success('成功',$data);

+ 2 - 0
application/api/controller/PieceWorkSchedule.php

@@ -81,6 +81,7 @@ class PieceWorkSchedule extends Api
             ->order('wgjs_rq desc, UniqId asc')
             ->page($page,$limit)
             ->select();
+        $total = db()->table('db_wgjs')->where($where)->count();
 
         $rs = db()->table('人事_基本资料')->column('员工编号, 员工姓名, 所在部门');
 
@@ -113,6 +114,7 @@ class PieceWorkSchedule extends Api
         }
 
         $data = [
+            'total'          => $total,
             'rows'          => $rows,
         ];
         $this->success('成功',$data);

+ 2 - 0
application/api/controller/WorkOrderSpotCheck.php

@@ -95,6 +95,7 @@ class WorkOrderSpotCheck extends Api
             ->page($page,$limit)
             ->select();
 
+        $total = db()->table('db_抽检记录')->where($where)->count();
         $gd = db()->table('工单_基本资料')->column('Gd_gdbh, Gd_cpmc');
         $rs = db()->table('人事_基本资料')->column('员工编号, 员工姓名');
         foreach ($rows as $key=>$value) {
@@ -107,6 +108,7 @@ class WorkOrderSpotCheck extends Api
         }
 
         $data = [
+            'total'          => $total,
             'rows'          => $rows,
         ];
         $this->success('成功',$data);

+ 2 - 0
application/api/controller/WorkOrderVerification.php

@@ -95,6 +95,7 @@ class WorkOrderVerification extends Api
             ->page($page,$limit)
             ->select();
 
+        $total = db()->table('db_qczl')->where($where)->count();
         $gd = db()->table('工单_基本资料')->column('Gd_gdbh, Gd_cpmc');
         
         foreach ($rows as $key=>$value){
@@ -112,6 +113,7 @@ class WorkOrderVerification extends Api
         }
 
         $data = [
+            'total'          => $total,
             'rows'          => $rows,
         ];
         $this->success('成功',$data);