Browse Source

计量支付在线审批
审批页面信息显示
无锁接口变更拉去文件名称

NoNZero 9 years ago
parent
commit
28427830e6

+ 5 - 0
protected/class/attfile.php

@@ -93,6 +93,11 @@ class attFile {
 	return $this->__file->update(array('where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times)));
     }
 
+    public function updateHash($pmid, $numpname, $times = 0) {
+        $this->__file->filehashcode = md5(mt_rand());
+        return $this->__file->update(array('where' => 'pmid=? and numpname=? and times=? and isnew=2', 'param' => array($pmid, $numpname, $times)));
+    }
+
 }
 
 ?>

+ 2 - 2
protected/controller/ClientController.php

@@ -1,5 +1,5 @@
 <?php
-ini_set('display_errors',on);
+
 Doo::loadCore('auth/DooAuth');
 Doo::loadClass('PasswordHash');
 Doo::loadClass('client');
@@ -343,7 +343,7 @@ class ClientController extends DooController
                     if($value['audittime']>0){
                         $uinfoArray[$key]['audittime'] = date('Y-m-d',$value['audittime']);
                     }else{
-                        $uinfoArray[$key]['audittime'] = 0;
+                        $uinfoArray[$key]['audittime'] = '0';
                     }
                 }
             } else {

+ 2 - 0
protected/controller/RProjectController.php

@@ -326,11 +326,13 @@ class RProjectController extends DooController
                         }
                     }
                 }
+                $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $lastRowArray['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']);
             echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
             die();
         }