hsiao 2017-02-20 22:19:15 1920次浏览 0条回复 0 0 0
            if($taskInfo->task_type){      //如果task_type字段等于1则开始执行

            $t = time();
            $start = mktime(0,0,0,date("m",$t),date("d",$t),date("Y",$t));
            $end = mktime(23,59,59,date("m",$t),date("d",$t),date("Y",$t)); 
            $limitTaskNumOneDay=Companytasklist::model()->findAll(array(
                'condition'=>'taskerid='.Yii::app()->user->getId().' and publishid='.$taskInfo->publishid.' and tasksecondTime>'.$start.' and tasksecondTime<'.$end
            ));
            
            $weekstart = mktime(0,0,0,date("m",$t),(date("d",$t)-7),date("Y",$t));
            $limitTaskNumOneWeek=Companytasklist::model()->findAll(array(
                'condition'=>'taskerid='.Yii::app()->user->getId().' and publishid='.$taskInfo->publishid.' and tasksecondTime>'.$weekstart.' and tasksecondTime<'.$end
            ));
            
             
        
		
            if($item->wangwanginfo==0 && count($limitTaskNumOneWeek)>2)
            {
                echo "MAXNUMS";//不符合
                Yii::app()->end();
            }
            
			if($item->wangwanginfo==1 && count($limitTaskNumOneWeek)>2)
            {
                echo "MAXNUMS1";//不符合
                Yii::app()->end();
            }
			if($item->wangwanginfo==2 && count($limitTaskNumOneWeek)>4)
            {
                echo "MAXNUMS2";//不符合
                Yii::app()->end();
            }
			if($item->wangwanginfo==3 && count($limitTaskNumOneWeek)>4)
            {
                echo "MAXNUMS3";//不符合一周不超过5单要求
                Yii::app()->end();
            }
			if($item->wangwanginfo==4 && count($limitTaskNumOneWeek)>5)
            {
                echo "MAXNUMS4";//不符合
                Yii::app()->end();
            }
				if($item->wangwanginfo==5 && count($limitTaskNumOneWeek)>6)
            {
                echo "MAXNUMS5";//不符合
                Yii::app()->end();
            }
				if($item->wangwanginfo==6 && count($limitTaskNumOneWeek)>9)
            {
                echo "MAXNUMS6";//不符合
                Yii::app()->end();
            }
				if($item->wangwanginfo==7 && count($limitTaskNumOneWeek)>13)
            {
                echo "MAXNUMS7";//不符合
                Yii::app()->end();
            }
				if($item->wangwanginfo==8 && count($limitTaskNumOneWeek)>18)
            {
                echo "MAXNUMS8";//不符合
                Yii::app()->end();
            }
				if($item->wangwanginfo==9 && count($limitTaskNumOneWeek)>25)//星一周不超过5单
            {
                echo "MAXNUMS9";//不符合
                Yii::app()->end();
            }
				if($item->wangwanginfo==10 && count($limitTaskNumOneWeek)>30)
            {
                echo "MAXNUMS10";//不符合
                Yii::app()->end();
            }
			
			
			
        }

为什么只执行

           if($item->wangwanginfo==0 && count($limitTaskNumOneWeek)>2)

            {
                echo "MAXNUMS";//不符合
                Yii::app()->end();
            }

下面的不执行了,怎么改才可以呢?

    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册