|  | @@ -13,6 +13,7 @@ Doo::loadClass('attachment');
 | 
	
		
			
				|  |  |  Doo::loadHelper('DooPager');
 | 
	
		
			
				|  |  |  Doo::loadClass('sign');
 | 
	
		
			
				|  |  |  Doo::loadModelAt('aconfig', 'admin');
 | 
	
		
			
				|  |  | +Doo::loadClass('measureconcerner');
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * MainController
 | 
	
	
		
			
				|  | @@ -23,7 +24,7 @@ Doo::loadModelAt('aconfig', 'admin');
 | 
	
		
			
				|  |  |  class SProjectController extends DooController
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private $aconfig,$data, $sign, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $measureauditact, $itemmeasurenum, $itemfle, $att;
 | 
	
		
			
				|  |  | +    private $aconfig,$data, $sign, $concern, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $measureauditact, $itemmeasurenum, $itemfle, $att;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public function beforeRun($resource, $action)
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -56,6 +57,7 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |          $this->itemfle = new ItemFile();
 | 
	
		
			
				|  |  |          $this->att = new attachment();
 | 
	
		
			
				|  |  |          $this->sign = new Signn();
 | 
	
		
			
				|  |  | +        $this->concern = new MeasureConcerner();
 | 
	
		
			
				|  |  |          $this->data['rootUrl'] = Doo::conf()->APP_URL;
 | 
	
		
			
				|  |  |          $this->data['currChannle'] = 's';
 | 
	
		
			
				|  |  |          $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
 | 
	
	
		
			
				|  | @@ -136,6 +138,27 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public function proSection()
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  | +        //删除标段
 | 
	
		
			
				|  |  | +        if(isset($_POST['secid']) && is_numeric($_POST['secid'])){
 | 
	
		
			
				|  |  | +            //删除标段关注人、审批人、期数、文件数据表、附件的内容,并更改签署表的状态为‘del’
 | 
	
		
			
				|  |  | +            if((isset($_POST['delsec']) && isset($_POST['text']) && trim($_POST['text']) == '删除标段') || isset($_POST['delsec2'])){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $mcresult = $this->concern->delMeasureConcernListbyPmid($_POST['secid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $maresult = $this->measureauditact->delMeasureAuditListbyPmid($_POST['secid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $attresult = $this->attfile->delAllTimesFile3($_POST['secid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $this->itemmeasurenum->delItembyPmid($_POST['secid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $muresult = $this->numofperact->delMeasureNumofperListbyPmid($_POST['secid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $signresult = $this->sign->updateSignStatusbyPmid($_POST['secid']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                $this->actmeasure->del($_POST['secid']);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return Doo::conf()->APP_URL . 'sproject/' . $this->params['pid'] . '/section';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          $this->data['currproArray'] = $this->data['allproArray'] = NULL;
 | 
	
		
			
				|  |  |          $proArray = $this->actmeasure->getGroupProject($this->auth->getUid());
 | 
	
		
			
				|  |  |          foreach ($proArray as $v) {
 | 
	
	
		
			
				|  | @@ -166,6 +189,8 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |          // 标段
 | 
	
		
			
				|  |  |          // 搜索有没有相应的月份,有就把实际赋值,没有就为零
 | 
	
		
			
				|  |  |          $this->data['MeasureArray'] = $this->actmeasure->getRowsByPid($this->params['pid']);
 | 
	
		
			
				|  |  | +        $this->data['MyMeasureArray'] = array();
 | 
	
		
			
				|  |  | +        $i = 0;
 | 
	
		
			
				|  |  |          $totalstid = 0;
 | 
	
		
			
				|  |  |          $monthArray = [];
 | 
	
		
			
				|  |  |          foreach ($this->data['MeasureArray'] as $key => $value) {
 | 
	
	
		
			
				|  | @@ -227,6 +252,11 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |              foreach ($month1 as $k => $v) {
 | 
	
		
			
				|  |  |                  $allmonth1[] = $v;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if($value['uid'] == $this->auth->getUid()){
 | 
	
		
			
				|  |  | +                $this->data['MyMeasureArray'][$i] = $this->data['MeasureArray'][$key];
 | 
	
		
			
				|  |  | +                $i++;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 中文表述年月
 | 
	
	
		
			
				|  | @@ -257,10 +287,10 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          foreach ($total as $value2) {
 | 
	
		
			
				|  |  | -            $total3[] = round(($value2 / $totalstid) * 100);
 | 
	
		
			
				|  |  | +            $total3[] = $totalstid != 0 ? round(($value2 / $totalstid) * 100) : 0;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          foreach ($total1 as $value11) {
 | 
	
		
			
				|  |  | -            $total4[] = round(($value11 / $totalstid) * 100);
 | 
	
		
			
				|  |  | +            $total4[] = $totalstid != 0 ? round(($value11 / $totalstid) * 100) : 0;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          $this->data['projectDate'] = implode(',', $cnymArray);
 | 
	
		
			
				|  |  |          $this->data['t1'] = implode(',', $total3);
 | 
	
	
		
			
				|  | @@ -305,7 +335,7 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |          // 面包屑导航标段
 | 
	
		
			
				|  |  |          $this->data['curractmeasureArray'] = NULL;
 | 
	
		
			
				|  |  |          $this->data['allactmeasureArray'] = [];
 | 
	
		
			
				|  |  | -        $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  | +        $actmeasureArray = $this->actmeasure->getRowUser($this->auth->getUid());
 | 
	
		
			
				|  |  |          foreach ($actmeasureArray as $kkkk => $vvvv) {
 | 
	
		
			
				|  |  |              if ($vvvv['stid'] == $measureArray['stid']) {
 | 
	
		
			
				|  |  |                  if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
	
		
			
				|  | @@ -476,7 +506,7 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |  // 面包屑导航标段
 | 
	
		
			
				|  |  |          $this->data['curractmeasureArray'] = NULL;
 | 
	
		
			
				|  |  |          $this->data['allactmeasureArray'] = [];
 | 
	
		
			
				|  |  | -        $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  | +        $actmeasureArray = $this->actmeasure->getRowUser($this->auth->getUid());
 | 
	
		
			
				|  |  |          foreach ($actmeasureArray as $kkkk => $vvvv) {
 | 
	
		
			
				|  |  |              if ($vvvv['stid'] == $measureArray['stid']) {
 | 
	
		
			
				|  |  |                  if (($vvvv['pmid'] == $this->params['pmid'])) {
 | 
	
	
		
			
				|  | @@ -597,7 +627,7 @@ class SProjectController extends DooController
 | 
	
		
			
				|  |  |  // 面包屑导航标段
 | 
	
		
			
				|  |  |          $this->data['curractmeasureArray'] = NULL;
 | 
	
		
			
				|  |  |          $this->data['allactmeasureArray'] = [];
 | 
	
		
			
				|  |  | -        $actmeasureArray = $this->actmeasure->getAll();
 | 
	
		
			
				|  |  | +        $actmeasureArray = $this->actmeasure->getRowUser($this->auth->getUid());
 | 
	
		
			
				|  |  |          foreach ($actmeasureArray as $kkkk => $vvvv) {
 | 
	
		
			
				|  |  |              if ($vvvv['stid'] == $measureArray['stid']) {
 | 
	
		
			
				|  |  |                  if (($vvvv['pmid'] == $this->params['pmid'])) {
 |