Browse Source

禅道审核界面 审核人列表重复bug

NoNZero 8 năm trước cách đây
mục cha
commit
e4e96f4269
2 tập tin đã thay đổi với 12 bổ sung7 xóa
  1. 5 0
      protected/class/attfile.php
  2. 7 7
      protected/controller/RProjectController.php

+ 5 - 0
protected/class/attfile.php

@@ -32,6 +32,11 @@ class attFile
         return $this->__file->getOne(array('where' => 'pmid=? and numpname=? and times=?  and isnew=2', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));
     }
 
+    public function getOrgin($pmid, $numpname, $times = 0)
+    {
+        return $this->__file->find(array('where' => 'pmid=? and numpname=? and times=?  and isnew=1', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));
+    }
+
     public function getNewLast3($pmid, $numpname, $times = 0)
     {
         return $this->__file->getOne(array('where' => 'pmid=? and numpname=? and times=?  and isnew=2', 'param' => array($pmid, $numpname, $times), 'asArray' => TRUE));

+ 7 - 7
protected/controller/RProjectController.php

@@ -29,7 +29,7 @@ class RProjectController extends DooController
     public function __construct()
     {
         $this->auth = new Auth();
-        $this->attfile = new attFile();
+        $this->fileatt = new attFile();
         $this->profile = new Profile();
         $this->project = new Project();
         $this->contractact = new Contractact();
@@ -614,7 +614,7 @@ class RProjectController extends DooController
     {
         // 面包屑导航
 
-
+        $fileatt = new attFile();
         // 期数列表
         $tmpArray = $this->numofperact->getGroupByLastOne2($this->params['pmid']);
         foreach ($tmpArray as $k => $v) {
@@ -646,8 +646,10 @@ class RProjectController extends DooController
         $maxTimes = $this->numofperact->getMaxTimes($lastRowArray['pmid'], $lastRowArray['numpname']);
 //        $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
         $maxtimez = $this->measureauditact->getRowGroupByTimes($this->params['mpid']);
-        $auditUserArray = $this->measureauditact->getRowByMpidTimes($this->params['mpid'], $maxtimez['times']);
+        $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'], $lastRowArray['numpname'],$maxTimes['times']);
         $auditArray = $this->measureauditact->getLastNewRowInfo($lastRowArray['pmid'], $lastRowArray['numpname'], $this->auth->getUid());
+        $attfileArray = $this->fileatt->getReportFile($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+        $orginArray['time'] = date('Y-m-d', $attfileArray['intime']);
         if (isset($_POST['act'])) {
             $auditStatusArray = array('checkno', 'checked');
             $myAuditStatus = $this->measureauditact->getMyAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $this->auth->getUid());
@@ -659,7 +661,7 @@ class RProjectController extends DooController
         if ($_POST['act'] == 'p') {
             if ($this->measureauditact->setMyAuditPass($auditArray['maid'], $_POST['content'], 1, $this->auth->getUid())) {
                 $countAudit = count($auditUserArray);
-                $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+                $this->fileatt->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
                 if ($auditArray['last'] == 1) {
                     $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checked', $maxTimes['times']);
                     // SMS Start
@@ -726,7 +728,7 @@ class RProjectController extends DooController
         if ($_POST['act'] == 'np') {
             $this->measureauditact->setCheckno($auditArray['maid'], $_POST['content'], 1);
             $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $maxTimes['times']);
-            $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+            $this->fileatt->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
             // SMS Start
             $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
             $userProArray = $this->profile->getProWithUid($TenderArray['uid']);
@@ -780,8 +782,6 @@ class RProjectController extends DooController
         $strAvatar = $this->auth->getAvatar($measureArray['uid']);
         $orginArray['avatar'] = '<img src="' . $strAvatar . '"></li>';
         $orginArray['name'] = $this->profile->getProWithUid($measureArray['uid'])['name'];
-        $attfileArray = $this->attfile->getFirstFile($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['times']);
-        $orginArray['time'] = date('Y-m-d', $attfileArray['intime']);
         $this->data['auditArray'] = $auditUserArray;
         $this->data['orginArray'] = $orginArray;
         $this->data['pmid'] = $this->params['pmid'];