浏览代码

/abutment/consultBidListCopy /admin/consultbidlistcopy 这两个接口 状态是已取消转单 转单的数据过滤掉

wufeng 2 年之前
父节点
当前提交
05d1695d09
共有 2 个文件被更改,包括 18 次插入4 次删除
  1. 9 2
      app/abutment/controller/Consult.php
  2. 9 2
      app/admin/controller/Consult.php

+ 9 - 2
app/abutment/controller/Consult.php

@@ -492,7 +492,7 @@ class Consult extends BaseController
         $this->post = $this->request->filter('trim')->post();
         $page = isset($this->post['page']) && $this->post['page'] !== "" ? intval($this->post['page']) : "1";
         $size = isset($this->post['size']) && $this->post['size'] !== "" ? intval($this->post['size']) : "10";
-        $where = [['cb.is_del', "=", 0]];
+        $where = [['cb.is_del', "=", 0], ['c.status', '<>', 5]];
         $zxNo = isset($this->post['zxNo']) && $this->post['zxNo'] !== "" ? trim($this->post['zxNo']) : "";
         if ($zxNo !== "") {
             $where[] = ['cb.zxNo', 'like', '%' . $zxNo . '%'];
@@ -538,13 +538,20 @@ class Consult extends BaseController
         if ($company_name !== "") $where[] = ["cb.createrid", 'in', get_company_item_user_by_name($company_name)];
 
 
-        $count = Db::name('consult_bids')->alias('cb')->where($where)->count();
+        $count = Db::name('consult_bids')
+            ->alias('cb')
+            ->leftJoin("depart_user u", "u.uid=cb.createrid AND u.is_del=0")
+            ->leftJoin("consult_info c", "c.infoNo=cb.infoNo")
+            ->where($where)
+            ->count();
+
         $total = ceil($count / $size);
         $page = $page >= $total ? $total : $page;
         $list = Db::name('consult_bids')
             ->alias('cb')
             ->field('cb.*,u.itemid')
             ->leftJoin("depart_user u", "u.uid=cb.createrid AND u.is_del=0")
+            ->leftJoin("consult_info c", "c.infoNo=cb.infoNo")
             ->where($where)
             ->page($page, $size)
             ->order('cb.addtime', 'desc')

+ 9 - 2
app/admin/controller/Consult.php

@@ -2207,7 +2207,7 @@ class Consult extends Base
     {
         $page = isset($this->post['page']) && $this->post['page'] !== "" ? intval($this->post['page']) : "1";
         $size = isset($this->post['size']) && $this->post['size'] !== "" ? intval($this->post['size']) : "10";
-        $where = [['cb.is_del', "=", 0]];
+        $where = [['cb.is_del', "=", 0],['c.status','<>',5]];
         $zxNo = isset($this->post['zxNo']) && $this->post['zxNo'] !== "" ? trim($this->post['zxNo']) : "";
         if ($zxNo !== "") {
             $where[] = ['cb.zxNo', 'like', '%' . $zxNo . '%'];
@@ -2253,13 +2253,20 @@ class Consult extends Base
         if ($company_name !== "") $where[] = ["cb.createrid", 'in', get_company_item_user_by_name($company_name)];
 
 
-        $count = Db::name('consult_bids')->alias('cb')->where($where)->count();
+        $count = Db::name('consult_bids')
+            ->alias('cb')
+            ->leftJoin("depart_user u", "u.uid=cb.createrid AND u.is_del=0")
+            ->leftJoin("consult_info c", "c.infoNo=cb.infoNo")
+            ->where($where)
+            ->count();
+
         $total = ceil($count / $size);
         $page = $page >= $total ? $total : $page;
         $list = Db::name('consult_bids')
             ->alias('cb')
             ->field('cb.*,u.itemid')
             ->leftJoin("depart_user u", "u.uid=cb.createrid AND u.is_del=0")
+            ->leftJoin("consult_info c", "c.infoNo=cb.infoNo")
             ->where($where)
             ->page($page, $size)
             ->order('cb.addtime', 'desc')