* check wether plans is empty.

This commit is contained in:
zhujinyong
2012-09-24 02:10:31 +00:00
parent da98e09af1
commit 02654e31af
+1
View File
@@ -319,6 +319,7 @@ EOT;
{
$products = $this->dao->select('id, code, name, PO')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->fetchAll('id');
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('deleted')->eq(0)->andWhere('product')->in(array_keys($products))->fetchAll('id');
if(!$plans) return array();
$planStories = $this->dao->select('plan, id, status')->from(TABLE_STORY)->where('deleted')->eq(0)->andWhere('plan')->in(array_keys($plans))->fetchGroup('plan', 'id');
foreach($plans as $plan)
{