|
@@ -1,5 +1,5 @@
|
|
<?php
|
|
<?php
|
|
-
|
|
|
|
|
|
+ini_set('display_errors',on);
|
|
Doo::loadCore('auth/DooAuth');
|
|
Doo::loadCore('auth/DooAuth');
|
|
Doo::loadClass('PasswordHash');
|
|
Doo::loadClass('PasswordHash');
|
|
Doo::loadClass('client');
|
|
Doo::loadClass('client');
|
|
@@ -61,7 +61,7 @@ class ClientController extends DooController
|
|
if ($this->auth->login($_POST['v3name'], $_POST['v3pass'])) {
|
|
if ($this->auth->login($_POST['v3name'], $_POST['v3pass'])) {
|
|
$uinfo = $this->auth->getUinfo();
|
|
$uinfo = $this->auth->getUinfo();
|
|
if (isset($uinfo['isstop']) && $uinfo['isstop'] > 0) {
|
|
if (isset($uinfo['isstop']) && $uinfo['isstop'] > 0) {
|
|
- echo json_encode(array('status' => FALSE, 'msg' => '登录失败'), JSON_UNESCAPED_UNICODE);
|
|
|
|
|
|
+ echo json_encode(array('status' => FALSE, 'msg' => '用户名或密码错误'), JSON_UNESCAPED_UNICODE);
|
|
die;
|
|
die;
|
|
}
|
|
}
|
|
if (isset($uinfo['uid'])) {
|
|
if (isset($uinfo['uid'])) {
|
|
@@ -74,7 +74,7 @@ class ClientController extends DooController
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- echo json_encode(array('status' => FALSE, 'msg' => '登录失败'), JSON_UNESCAPED_UNICODE);
|
|
|
|
|
|
+ echo json_encode(array('status' => FALSE, 'msg' => '用户名或密码错误'), JSON_UNESCAPED_UNICODE);
|
|
die;
|
|
die;
|
|
}
|
|
}
|
|
} catch (Exception $exc) {
|
|
} catch (Exception $exc) {
|
|
@@ -115,14 +115,23 @@ class ClientController extends DooController
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// 编制人审核第一期时 开始审核第一期时候调用
|
|
|
|
|
|
+// 编制人审核第一期时 开始审核第一期时候调用ll
|
|
public function ClientPeriod()
|
|
public function ClientPeriod()
|
|
{
|
|
{
|
|
// TODO:上报数据
|
|
// TODO:上报数据
|
|
// TODO:每期更新数据时候和上传时候要查询当前进行期数的第几次一并写入数据库
|
|
// TODO:每期更新数据时候和上传时候要查询当前进行期数的第几次一并写入数据库
|
|
- if (isset($this->params['userid']) && isset($this->params['tenderid']) && isset($this->params['phaseno']) && isset($_POST['MD5_JL'])) {
|
|
|
|
|
|
+ if (isset($this->params['userid']) && isset($this->params['tenderid']) && isset($this->params['phaseno']) && isset($_POST['MD5_JL']) && isset($_POST['MD5_Zip'])) {
|
|
$fp = $this->upfile('upfile');
|
|
$fp = $this->upfile('upfile');
|
|
if (isset($fp[0]['filepath'])) {
|
|
if (isset($fp[0]['filepath'])) {
|
|
|
|
+ /**
|
|
|
|
+ * 增加上传压缩包md5检测机制
|
|
|
|
+ */
|
|
|
|
+ $localmd5HashString = hash_file("md5",Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
|
|
+ if($localmd5HashString!=trim($_POST['MD5_Zip'])){
|
|
|
|
+ $status = array('status' => 'FALSE', 'msg' => '期数数据上传失败,请重新上传');
|
|
|
|
+ echo json_encode($status, JSON_UNESCAPED_UNICODE);
|
|
|
|
+ die();
|
|
|
|
+ }
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath['dirname'] . '/' . $extPath['filename'];
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath['dirname'] . '/' . $extPath['filename'];
|
|
@@ -671,7 +680,7 @@ class ClientController extends DooController
|
|
// 标段期审核接口
|
|
// 标段期审核接口
|
|
function auditMeasure()
|
|
function auditMeasure()
|
|
{
|
|
{
|
|
- if (isset($_POST['userid']) && isset($_POST['tenderid']) && isset($_POST['phaseno']) && isset($_POST['MD5_JL'])) {
|
|
|
|
|
|
+ if (isset($_POST['userid']) && isset($_POST['tenderid']) && isset($_POST['phaseno']) && isset($_POST['MD5_JL']) && isset($_POST['MD5_Zip'])) {
|
|
$auditcontent = iconv('GBK', 'UTF-8', $_POST['CheckerMemo']);
|
|
$auditcontent = iconv('GBK', 'UTF-8', $_POST['CheckerMemo']);
|
|
$auditArray = $this->measureauditact->getLastNewRowInfo($_POST['tenderid'], $_POST['phaseno'], $_POST['userid']);
|
|
$auditArray = $this->measureauditact->getLastNewRowInfo($_POST['tenderid'], $_POST['phaseno'], $_POST['userid']);
|
|
if (isset($auditArray ['mastatus']) && ($auditArray ['mastatus'] == 'checked') || ($auditArray ['mastatus'] == 'checkno')) {
|
|
if (isset($auditArray ['mastatus']) && ($auditArray ['mastatus'] == 'checked') || ($auditArray ['mastatus'] == 'checkno')) {
|
|
@@ -681,6 +690,12 @@ class ClientController extends DooController
|
|
$auditUserArray = $this->measureauditact->getUserAuditLast($_POST['tenderid'], $_POST['phaseno']);
|
|
$auditUserArray = $this->measureauditact->getUserAuditLast($_POST['tenderid'], $_POST['phaseno']);
|
|
$fp = $this->upfile('upfile');
|
|
$fp = $this->upfile('upfile');
|
|
if (isset($fp[0]['filepath'])) {
|
|
if (isset($fp[0]['filepath'])) {
|
|
|
|
+ $localmd5HashString = hash_file("md5",Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
|
|
+ if($localmd5HashString!=trim($_POST['MD5_Zip'])){
|
|
|
|
+ $status = array('status' => 'FALSE', 'msg' => '审核期数数据上传失败,请重新上传');
|
|
|
|
+ echo json_encode($status, JSON_UNESCAPED_UNICODE);
|
|
|
|
+ die();
|
|
|
|
+ }
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath ['dirname'] . '/' . $extPath['filename'];
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath ['dirname'] . '/' . $extPath['filename'];
|
|
@@ -868,7 +883,7 @@ class ClientController extends DooController
|
|
*/
|
|
*/
|
|
function setCheckno()
|
|
function setCheckno()
|
|
{
|
|
{
|
|
- if (isset($this->params['userid']) && isset($this->params['tenderid']) && isset($this->params['phaseno']) && isset($_POST['MD5_JL'])) {
|
|
|
|
|
|
+ if (isset($this->params['userid']) && isset($this->params['tenderid']) && isset($this->params['phaseno']) && isset($_POST['MD5_JL']) && isset($_POST['MD5_Zip'])) {
|
|
$auditcontent = iconv('GBK', 'UTF-8', $_POST['CheckerMemo']);
|
|
$auditcontent = iconv('GBK', 'UTF-8', $_POST['CheckerMemo']);
|
|
$auditArray = $this->measureauditact->getRowInfo($this->params['tenderid'], $this->params['phaseno'], $this->params['userid']);
|
|
$auditArray = $this->measureauditact->getRowInfo($this->params['tenderid'], $this->params['phaseno'], $this->params['userid']);
|
|
if (isset($auditArray['maid'])) {
|
|
if (isset($auditArray['maid'])) {
|
|
@@ -882,6 +897,12 @@ class ClientController extends DooController
|
|
if (isset($fp[0]['filepath'])) {
|
|
if (isset($fp[0]['filepath'])) {
|
|
// 解压缩文件等待以后直接使用
|
|
// 解压缩文件等待以后直接使用
|
|
// TODO:根据校验码校验包的完整性
|
|
// TODO:根据校验码校验包的完整性
|
|
|
|
+ $localmd5HashString = hash_file("md5",Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
|
|
+ if($localmd5HashString!=trim($_POST['MD5_Zip'])){
|
|
|
|
+ $status = array('status' => 'FALSE', 'msg' => '未通过期数数据上传失败,请重新上传');
|
|
|
|
+ echo json_encode($status, JSON_UNESCAPED_UNICODE);
|
|
|
|
+ die();
|
|
|
|
+ }
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
$res = $this->zip->open(Doo::conf()->SITE_PATH . $fp[0]['filepath']);
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
$extPath = pathinfo($fp[0]['filepath']);
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath ['dirname'] . '/' . $extPath['filename'];
|
|
$extPathdir = Doo::conf()->SITE_PATH . $extPath ['dirname'] . '/' . $extPath['filename'];
|
|
@@ -1084,19 +1105,35 @@ class ClientController extends DooController
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- function upfile($fildname, $param = 'doc, docx, xls, xlsx, png, zip')
|
|
|
|
- {
|
|
|
|
|
|
+ function upfile($fildname, $param = 'doc, docx, xls, xlsx, png, zip') {
|
|
return $this->att->uploadMut($fildname, $param);
|
|
return $this->att->uploadMut($fildname, $param);
|
|
}
|
|
}
|
|
|
|
|
|
- function upItemFile($fildname, $param = 'doc, docx, xls, xlsx, png, zip')
|
|
|
|
- {
|
|
|
|
|
|
+ function upItemFile($fildname, $param = 'doc, docx, xls, xlsx, png, zip') {
|
|
$this->att->setUploadDir();
|
|
$this->att->setUploadDir();
|
|
return $this->att->uploadMut($fildname, $param);
|
|
return $this->att->uploadMut($fildname, $param);
|
|
}
|
|
}
|
|
|
|
|
|
- function getFileupErrorNo()
|
|
|
|
- {
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 根据标段ID获取标段是否已经被删除的提示
|
|
|
|
+ * 标段ID
|
|
|
|
+ */
|
|
|
|
+ public function getCountPmid() {
|
|
|
|
+ if (isset($this->params['tenderid'])) {
|
|
|
|
+ $isexist = $this->actmeasure->getCountPmid($this->params['tenderid']);
|
|
|
|
+ if ($isexist > 0) {
|
|
|
|
+ echo json_encode(array('status' => TRUE, 'msg' => '', 'info' => null), JSON_UNESCAPED_UNICODE);
|
|
|
|
+ die();
|
|
|
|
+ } else {
|
|
|
|
+ echo json_encode(array('status' => 'FALSE', 'msg' => '该项目[XXX]在云端已被删除,点击“确定”后,可手动删除该项目'), JSON_UNESCAPED_UNICODE);
|
|
|
|
+ die();
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $this->msg(0, '获取标段是否存在参数错误');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function getFileupErrorNo() {
|
|
return $this->att->error();
|
|
return $this->att->error();
|
|
}
|
|
}
|
|
|
|
|