|
@@ -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);
|