|
@@ -294,20 +294,21 @@ class RProjectController extends DooController
|
|
|
}
|
|
|
//
|
|
|
$lastRowArray = $this->numofperact->getLastNew2($this->params['pmid']);
|
|
|
- $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'],$lastRowArray['numpname'],$lastRowArray['times']);
|
|
|
+ $maxTimes = $this->numofperact->getMaxTimes($lastRowArray['pmid'],$lastRowArray['numpname']);
|
|
|
+ $auditUserArray = $this->measureauditact->getAllAudit($lastRowArray['pmid'],$lastRowArray['numpname'],$maxTimes['times']);
|
|
|
$auditArray = $this->measureauditact->getLastNewRowInfo($lastRowArray['pmid'], $lastRowArray['numpname'], $this->auth->getUid());
|
|
|
if($_POST['act'] == 'p'){
|
|
|
if ($this->measureauditact->setStatusTo($auditArray['maid'], 3, $_POST['content'],1)) {
|
|
|
$countAudit = count($auditUserArray);
|
|
|
if ($auditArray['last'] == '1') {
|
|
|
$this->measureauditact->setStatusTo($auditUserArray[0]['maid'], 3);
|
|
|
- $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checked', $lastRowArray['times']);
|
|
|
+ $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checked', $maxTimes['times']);
|
|
|
echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
die();
|
|
|
} else {
|
|
|
if (($countAudit == 2) && ($auditUserArray[0]['last'] == 1) && ($auditUserArray[1]['maid'] == $auditArray['maid'])) {
|
|
|
$this->measureauditact->updateMastatus($auditUserArray[0]['maid']);
|
|
|
- $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $lastRowArray['times']);
|
|
|
+ $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
|
|
|
echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
die();
|
|
|
}
|
|
@@ -319,20 +320,20 @@ class RProjectController extends DooController
|
|
|
} else {
|
|
|
$this->measureauditact->updateMastatus($auditUserArray[$k + 1]['maid']);
|
|
|
}
|
|
|
- $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $lastRowArray['times']);
|
|
|
+ $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
|
|
|
echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
die();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['times']);
|
|
|
+ $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
|
|
|
}
|
|
|
}
|
|
|
if($_POST['act'] == 'np'){
|
|
|
$this->measureauditact->setCheckno($auditArray['maid'], $_POST['content'],1);
|
|
|
- $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $lastRowArray['times']);
|
|
|
- $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['times']);
|
|
|
+ $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $maxTimes['times']);
|
|
|
+ $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
|
|
|
echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
die();
|
|
|
}
|