north 7 年之前
父节点
当前提交
82b31dd823
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      www/protected/modules/j/controllers/HouseKeepingController.php

+ 6 - 4
www/protected/modules/j/controllers/HouseKeepingController.php

@@ -14,18 +14,20 @@ class HouseKeepingController extends JBaseController
     {
 
         $id = (Yii::app()->request->getParam('id'));
-        $store_id = intval(Yii::app()->request->getParam('store_id'));
+        $store_id = Yii::app()->request->getParam('store_id','');
 
 
         $criteria = new EMongoCriteria();
+        if (!empty($store_id)) {
+            $criteria->store_id('==', intval($store_id));
+        }
+
         // id筛选
         if ($id) {
             $criteria->user_id('==', new MongoId($id));
-            $je = JEmploye::get(new MongoId($id));
-            $criteria->store_id('==', $je->owned_stores);
         }
 
-        $criteria->store_id('==', intval($store_id));
+
 
         $cursor = HouseKeeping::model()->findAll($criteria);
         $rows = CommonFn::getRowsFromCursor($cursor);