* finish task #3727.

This commit is contained in:
wangyidong
2018-03-16 15:51:14 +08:00
parent 87a0679cbf
commit 809c8d5eb2
8 changed files with 55 additions and 23 deletions
+4 -7
View File
@@ -2616,16 +2616,13 @@ class projectModel extends model
*
* @return mixed
*/
public function getPlans($productID)
public function getPlans($products)
{
$plans = $this->dao->select('id,title,product')->from(TABLE_PRODUCTPLAN)
->where('product')->in($productID)
->fetchAll();
$this->loadModel('productplan');
$productPlans = array();
foreach ($plans as $plan)
foreach($products as $productID => $product)
{
$productPlans[$plan->product][$plan->id] = $plan->title;
$productPlans[$productID] = $this->productplan->getPairs($product->id, $product->branch);
}
return $productPlans;
}