|
@@ -162,13 +162,14 @@ class HumanResourceController extends DooController {
|
|
$staff->pendStatus = 0;
|
|
$staff->pendStatus = 0;
|
|
$staff->pendingApprovals = 0;
|
|
$staff->pendingApprovals = 0;
|
|
$staff->InductionDate = date ( "Y-m-d H:i:s" );
|
|
$staff->InductionDate = date ( "Y-m-d H:i:s" );
|
|
|
|
+ $staff->cldAccess='["INFORMATION","DIRECTORIES","LOCK","RECEIPTS","INVOICE"]';
|
|
|
|
|
|
if ($staffDetail ['nature'] == 2)
|
|
if ($staffDetail ['nature'] == 2)
|
|
$staff->practiceDate = date ( "Y-m-d H:i:s" );
|
|
$staff->practiceDate = date ( "Y-m-d H:i:s" );
|
|
if ($staffDetail ['nature'] == 3)
|
|
if ($staffDetail ['nature'] == 3)
|
|
$staff->probationaryDate = date ( "Y-m-d H:i:s" );
|
|
$staff->probationaryDate = date ( "Y-m-d H:i:s" );
|
|
-
|
|
|
|
- //发送短信
|
|
|
|
|
|
+
|
|
|
|
+ // 发送短信
|
|
$passwork = mt_rand ( 100000, 999999 );
|
|
$passwork = mt_rand ( 100000, 999999 );
|
|
$staff->passwork = md5 ( $passwork );
|
|
$staff->passwork = md5 ( $passwork );
|
|
|
|
|
|
@@ -193,36 +194,199 @@ class HumanResourceController extends DooController {
|
|
'operation' => "员工 入职审批通过",
|
|
'operation' => "员工 入职审批通过",
|
|
'status' => 3,
|
|
'status' => 3,
|
|
'img' => $this->staff ['avatar'],
|
|
'img' => $this->staff ['avatar'],
|
|
- 'username' => $this->staff['username'],
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'category' => $this->staff ['category'],
|
|
'category' => $this->staff ['category'],
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
|
|
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
|
|
- //发送微信抄送
|
|
|
|
- $msg = '[抄送]'.$staffDetail['category'].'-'.$staffDetail['username'].'申请入职成功\n入职时间:'.$staffDetail['hiredate'];
|
|
|
|
|
|
+ // 发送微信抄送
|
|
|
|
+ $msg = '[抄送]' . $staffDetail ['category'] . '-' . $staffDetail ['username'] . '申请入职成功\n入职时间:' . $staffDetail ['hiredate'];
|
|
|
|
|
|
- $cidmode=$staffDetail['cid'];
|
|
|
|
- if(!empty($staffDetail['departmentID']))
|
|
|
|
- $cidmode=$staffDetail['cid'].'-'.$staffDetail['departmentID'];
|
|
|
|
- $InductionCC=$staffManage->getStaffManageByCid($cidmode);
|
|
|
|
|
|
+ $cidmode = $staffDetail ['cid'];
|
|
|
|
+ if (! empty ( $staffDetail ['departmentID'] ))
|
|
|
|
+ $cidmode = $staffDetail ['cid'] . '-' . $staffDetail ['departmentID'];
|
|
|
|
+ $InductionCC = $staffManage->getStaffManageByCid ( $cidmode );
|
|
$InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
$InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
|
|
|
|
- foreach ($InductionCC as $value){
|
|
|
|
- $this->setWXMsg ( $value[0],$msg );
|
|
|
|
|
|
+ foreach ( $InductionCC as $value ) {
|
|
|
|
+ $this->setWXMsg ( $value [0], $msg );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
$staff->update ( array (
|
|
$staff->update ( array (
|
|
'where' => 'sid=' . $sid
|
|
'where' => 'sid=' . $sid
|
|
) );
|
|
) );
|
|
|
|
|
|
|
|
+ // 权限跳转
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ $CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
|
|
+ $accessModular = 'HR';
|
|
|
|
+ if (in_array ( $accessModular, $CAAdetail ['cldAccessArray'] )) {
|
|
|
|
+ return '/hr';
|
|
|
|
+ } else {
|
|
|
|
+ $list = $staff->getApprovalData ( $CAAdetail ['sid'] );
|
|
|
|
+
|
|
|
|
+ $isVisit = count ( $list );
|
|
|
|
+ if ($isVisit > 0) { // 未做强制不能访问
|
|
|
|
+ return '/hr';
|
|
|
|
+ } else {
|
|
|
|
+ header ( 'Content-Type:text/html;charset=utf-8' );
|
|
|
|
+ echo "审批成功 <a href='/'>点击跳转首页</a>";
|
|
|
|
+ die ();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 员工再入职审批
|
|
|
|
+ */
|
|
|
|
+ function employeeReentryApprovals() {
|
|
|
|
+ Doo::loadModel ( 'staff' );
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
|
+ Doo::loadModel ( 'reentryManage' );
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ $sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
|
|
|
|
+
|
|
|
|
+ $sid = $XDeode->decode ( $sidKey );
|
|
|
|
+ if (! is_numeric ( $sid ) || empty ( $sid ))
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
+
|
|
|
|
+ $staffDetail = $staff->getOne ( array (
|
|
|
|
+ 'where' => 'pendStatus=7 and sid=' . $sid . ' and pendingApprovals=' . $this->staff ['sid'],
|
|
|
|
+ 'asArray' => true
|
|
|
|
+ ) );
|
|
|
|
+
|
|
|
|
+ if (empty ( $staffDetail ))
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
|
|
|
|
+ $processApprovals = json_decode ( $staffDetail ['processApprovals'], true );
|
|
|
|
+ $invoiceManage = json_decode ( $staffDetail ['staffManage'], true );
|
|
|
|
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ if (empty ( $processApprovals )) {
|
|
|
|
+ $processApprovals = array (
|
|
|
|
+ $this->staff ['sid'] => array (
|
|
|
|
+ 'date' => date ( "Y-m-d H:i:s" )
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ $nextInvoiceManage = next ( $invoiceManage );
|
|
|
|
+
|
|
|
|
+ if ($nextInvoiceManage !== false)
|
|
|
|
+ $staff->pendingApprovals = $nextInvoiceManage [0];
|
|
|
|
+ $staff->processApprovals = json_encode ( $processApprovals );
|
|
|
|
+ } else {
|
|
|
|
+ $processApprovals [$this->staff ['sid']] = array (
|
|
|
|
+ 'date' => date ( "Y-m-d H:i:s" )
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ $pendingApprovals = 0;
|
|
|
|
+ foreach ( $invoiceManage as $key => $value ) {
|
|
|
|
+ if ($value [0] == $this->staff ['sid']) {
|
|
|
|
+ if (isset ( $invoiceManage [$key + 1] ))
|
|
|
|
+ $pendingApprovals = $invoiceManage [$key + 1] [0];
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (! empty ( $pendingApprovals ))
|
|
|
|
+ $staff->pendingApprovals = $pendingApprovals;
|
|
|
|
+ $staff->processApprovals = json_encode ( $processApprovals );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (count ( $processApprovals ) == count ( $invoiceManage )) {
|
|
|
|
+ // 确认再入职
|
|
|
|
+ // Doo::loadClass ( 'XDeode' );
|
|
|
|
+ // $XDeode = new XDeode ( 5 );
|
|
|
|
+ // Doo::loadModel ( 'staff' );
|
|
|
|
+ // $staff = new staff ();
|
|
|
|
+
|
|
|
|
+ // $sid = $XDeode->decode ( $sidKey );
|
|
|
|
+
|
|
|
|
+ // $detail = $staff->getStaffBySid ( $sid );
|
|
|
|
+
|
|
|
|
+ $staffDetail;
|
|
|
|
+ $staff2 = new staff ();
|
|
|
|
+
|
|
|
|
+ // 工龄记录
|
|
|
|
+ $seniorityFormula = json_decode ( $staffDetail ['seniorityFormula'] );
|
|
|
|
+ array_push ( $seniorityFormula, array (
|
|
|
|
+ 'InductionDate' => date ( "Y-m-d H:i:s" ),
|
|
|
|
+ 'dimissionDate' => ''
|
|
|
|
+ ) );
|
|
|
|
+
|
|
|
|
+ $item = array (
|
|
|
|
+ 'sid' => $sid,
|
|
|
|
+ 'nature' => 1,
|
|
|
|
+ 'pendStatus' => 0,
|
|
|
|
+ 'seniorityFormula' => json_encode ( $seniorityFormula ),
|
|
|
|
+ 'hiredate' => date ( "Y-m-d" ) ,
|
|
|
|
+ 'cldAccess'=>'["INFORMATION","DIRECTORIES","LOCK","RECEIPTS","INVOICE"]',
|
|
|
|
+ );
|
|
|
|
+ $staff2->setStaffByCondition ( $item );
|
|
|
|
+ // 更新假期相关信息
|
|
|
|
+ Doo::loadModel ( 'holidaystaff' );
|
|
|
|
+ $holidaystaff = new HStaff ();
|
|
|
|
+ $holidaystaff->delete ( array (
|
|
|
|
+ 'where' => 'uid=' . $sid
|
|
|
|
+ ) );
|
|
|
|
+ $holidaystaff = new HStaff ();
|
|
|
|
+ $holidaystaff->uid = $sid;
|
|
|
|
+ $holidaystaff->insert ();
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ $staffmsg = $staff->getUserById ( $sid );
|
|
|
|
+ $this->updateAnnualLeave ( $staffmsg [0] );
|
|
|
|
+
|
|
|
|
+ // 发送短信
|
|
|
|
+ $passwork = mt_rand ( 100000, 999999 );
|
|
|
|
+ $staff->passwork = md5 ( $passwork );
|
|
|
|
+
|
|
|
|
+ if (! empty ( $staffDetail ['telephone'] ) && is_numeric ( $staffDetail ['telephone'] )) {
|
|
|
|
+ Doo::loadClass ( 'Human.func' );
|
|
|
|
+ $msg = $staffDetail ['username'] . ',' . $passwork;
|
|
|
|
+ send_sms ( 17280, $staffDetail ['telephone'], '{"%msg%":"' . $msg . '"}' );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 操作日志
|
|
|
|
+ Doo::loadModel ( 'staffOperationLog' );
|
|
|
|
+ $staffOperationLog = new staffOperationLog ();
|
|
|
|
+
|
|
|
|
+ $item = array (
|
|
|
|
+ 'date' => date ( "Y-m-d H:i:s" ),
|
|
|
|
+ 'operation' => "员工 再入职审批通过",
|
|
|
|
+ 'status' => 3,
|
|
|
|
+ 'img' => $this->staff ['avatar'],
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
|
|
+ 'uid' => $staffDetail ['sid'],
|
|
|
|
+ 'category' => $this->staff ['category'],
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
|
|
+ );
|
|
|
|
+ $staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
+
|
|
|
|
+ // 发送微信抄送
|
|
|
|
+ $msg = '[抄送]' . $staffDetail ['category'] . '-' . $staffDetail ['username'] . '申请 再入职成功\n入职时间:' . date ( "Y-m-d" );
|
|
|
|
+
|
|
|
|
+ $cidmode = $staffDetail ['cid'];
|
|
|
|
+ if (! empty ( $staffDetail ['departmentID'] ))
|
|
|
|
+ $cidmode = $staffDetail ['cid'] . '-' . $staffDetail ['departmentID'];
|
|
|
|
+ $InductionCC = $staffManage->getStaffManageByCid ( $cidmode );
|
|
|
|
+ $InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
|
|
+
|
|
|
|
+ foreach ( $InductionCC as $value ) {
|
|
|
|
+ $this->setWXMsg ( $value [0], $msg );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ $staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
|
|
+ $staff->update ( array (
|
|
|
|
+ 'where' => 'sid=' . $sid
|
|
|
|
+ ) );
|
|
|
|
|
|
// 权限跳转
|
|
// 权限跳转
|
|
$staff = new staff ();
|
|
$staff = new staff ();
|
|
@@ -308,7 +472,6 @@ class HumanResourceController extends DooController {
|
|
// $staff->dimissionDate = date ( "Y-m-d" );
|
|
// $staff->dimissionDate = date ( "Y-m-d" );
|
|
$staff->pendingApprovalsLeave = 0;
|
|
$staff->pendingApprovalsLeave = 0;
|
|
|
|
|
|
-
|
|
|
|
// 操作日志
|
|
// 操作日志
|
|
Doo::loadModel ( 'staffOperationLog' );
|
|
Doo::loadModel ( 'staffOperationLog' );
|
|
$staffOperationLog = new staffOperationLog ();
|
|
$staffOperationLog = new staffOperationLog ();
|
|
@@ -317,13 +480,12 @@ class HumanResourceController extends DooController {
|
|
'operation' => "员工 离职审批通过",
|
|
'operation' => "员工 离职审批通过",
|
|
'status' => 2,
|
|
'status' => 2,
|
|
'img' => $this->staff ['avatar'],
|
|
'img' => $this->staff ['avatar'],
|
|
- 'username' => $this->staff['username'],
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'category' => $this->staff ['category'],
|
|
'category' => $this->staff ['category'],
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
@@ -331,8 +493,6 @@ class HumanResourceController extends DooController {
|
|
'where' => 'sid=' . $sid
|
|
'where' => 'sid=' . $sid
|
|
) );
|
|
) );
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 权限跳转
|
|
// 权限跳转
|
|
$staff = new staff ();
|
|
$staff = new staff ();
|
|
$CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
$CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
@@ -426,20 +586,16 @@ class HumanResourceController extends DooController {
|
|
$staffOperationLog = new staffOperationLog ();
|
|
$staffOperationLog = new staffOperationLog ();
|
|
$item = array (
|
|
$item = array (
|
|
'date' => date ( "Y-m-d H:i:s" ),
|
|
'date' => date ( "Y-m-d H:i:s" ),
|
|
- 'operation' =>"员工 转正审批通过",
|
|
|
|
|
|
+ 'operation' => "员工 转正审批通过",
|
|
'status' => 2,
|
|
'status' => 2,
|
|
|
|
|
|
'img' => $this->staff ['avatar'],
|
|
'img' => $this->staff ['avatar'],
|
|
- 'username' => $this->staff['username'],
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'category' => $this->staff ['category'],
|
|
'category' => $this->staff ['category'],
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
-
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
@@ -447,8 +603,6 @@ class HumanResourceController extends DooController {
|
|
'where' => 'sid=' . $sid
|
|
'where' => 'sid=' . $sid
|
|
) );
|
|
) );
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 权限跳转
|
|
// 权限跳转
|
|
$staff = new staff ();
|
|
$staff = new staff ();
|
|
$CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
$CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
@@ -543,19 +697,18 @@ class HumanResourceController extends DooController {
|
|
$staff->achievementBonus = $appliedPromote [4];
|
|
$staff->achievementBonus = $appliedPromote [4];
|
|
$staff->positionId = $XDeode->decode ( $appliedPromote [0] );
|
|
$staff->positionId = $XDeode->decode ( $appliedPromote [0] );
|
|
|
|
|
|
|
|
+ // 发送微信抄送
|
|
|
|
|
|
- //发送微信抄送
|
|
|
|
-
|
|
|
|
- $msg = '[抄送]'.$staffDetail['category'].'-'.$staffDetail['username'].'申请晋升成功\n晋升时间:'.date ( "Y-m-d" );
|
|
|
|
|
|
+ $msg = '[抄送]' . $staffDetail ['category'] . '-' . $staffDetail ['username'] . '申请晋升成功\n晋升时间:' . date ( "Y-m-d" );
|
|
|
|
|
|
- $cidmode=$staffDetail['cid'];
|
|
|
|
- if(!empty($staffDetail['departmentID']))
|
|
|
|
- $cidmode=$staffDetail['cid'].'-'.$staffDetail['departmentID'];
|
|
|
|
- $InductionCC=$staffManage->getStaffManageByCid($cidmode);
|
|
|
|
|
|
+ $cidmode = $staffDetail ['cid'];
|
|
|
|
+ if (! empty ( $staffDetail ['departmentID'] ))
|
|
|
|
+ $cidmode = $staffDetail ['cid'] . '-' . $staffDetail ['departmentID'];
|
|
|
|
+ $InductionCC = $staffManage->getStaffManageByCid ( $cidmode );
|
|
$InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
$InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
|
|
|
|
- foreach ($InductionCC as $value){
|
|
|
|
- $this->setWXMsg ( $value[0],$msg );
|
|
|
|
|
|
+ foreach ( $InductionCC as $value ) {
|
|
|
|
+ $this->setWXMsg ( $value [0], $msg );
|
|
}
|
|
}
|
|
|
|
|
|
// 操作日志
|
|
// 操作日志
|
|
@@ -569,14 +722,13 @@ class HumanResourceController extends DooController {
|
|
'status' => 3,
|
|
'status' => 3,
|
|
|
|
|
|
'img' => $this->staff ['avatar'],
|
|
'img' => $this->staff ['avatar'],
|
|
- 'username' => $this->staff['username'],
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'category' => $this->staff ['category'],
|
|
'category' => $this->staff ['category'],
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
|
|
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
$staff->updateDate = date ( "Y-m-d H:i:s" );
|
|
@@ -584,8 +736,6 @@ class HumanResourceController extends DooController {
|
|
'where' => 'sid=' . $sid
|
|
'where' => 'sid=' . $sid
|
|
) );
|
|
) );
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 权限跳转
|
|
// 权限跳转
|
|
$staff = new staff ();
|
|
$staff = new staff ();
|
|
$CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
$CAAdetail = $staff->getStaffBySid ( $_COOKIE ["staff"] );
|
|
@@ -851,11 +1001,11 @@ class HumanResourceController extends DooController {
|
|
'date' => date ( "Y-m-d H:i:s" ),
|
|
'date' => date ( "Y-m-d H:i:s" ),
|
|
'status' => 1,
|
|
'status' => 1,
|
|
'img' => '/global/img/avtra',
|
|
'img' => '/global/img/avtra',
|
|
- 'username' =>$this->staff['username'] ,
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $id,
|
|
'uid' => $id,
|
|
- 'sid'=>$this->staff['sid'],
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid'],
|
|
'operation' => "添加新员工",
|
|
'operation' => "添加新员工",
|
|
- 'category' =>$this->staff['category']
|
|
|
|
|
|
+ 'category' => $this->staff ['category']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
|
|
@@ -902,23 +1052,20 @@ class HumanResourceController extends DooController {
|
|
'regularsDate' => date ( "Y-m-d H:i:s" )
|
|
'regularsDate' => date ( "Y-m-d H:i:s" )
|
|
);
|
|
);
|
|
|
|
|
|
-
|
|
|
|
- //发送微信抄送
|
|
|
|
|
|
+ // 发送微信抄送
|
|
Doo::loadModel ( 'staffRegularManage' );
|
|
Doo::loadModel ( 'staffRegularManage' );
|
|
$staffLeaveManage = new staffRegularManage ();
|
|
$staffLeaveManage = new staffRegularManage ();
|
|
- $msg = '[抄送]'.$staffDetail['category'].'-'.$staffDetail['username'].'申请转正成功\n转正时间:'.date ( "Y-m-d" );
|
|
|
|
-
|
|
|
|
- $cidmode=$staffDetail['cid'];
|
|
|
|
- if(!empty($staffDetail['departmentID']))
|
|
|
|
- $cidmode=$staffDetail['cid'].'-'.$staffDetail['departmentID'];
|
|
|
|
- $InductionCC=$staffLeaveManage->getStaffManageByCid($cidmode);
|
|
|
|
- $InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
|
|
-
|
|
|
|
- foreach ($InductionCC as $value){
|
|
|
|
- $this->setWXMsg ( $value[0],$msg );
|
|
|
|
- }
|
|
|
|
|
|
+ $msg = '[抄送]' . $staffDetail ['category'] . '-' . $staffDetail ['username'] . '申请转正成功\n转正时间:' . date ( "Y-m-d" );
|
|
|
|
|
|
|
|
+ $cidmode = $staffDetail ['cid'];
|
|
|
|
+ if (! empty ( $staffDetail ['departmentID'] ))
|
|
|
|
+ $cidmode = $staffDetail ['cid'] . '-' . $staffDetail ['departmentID'];
|
|
|
|
+ $InductionCC = $staffLeaveManage->getStaffManageByCid ( $cidmode );
|
|
|
|
+ $InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
|
|
|
|
|
|
+ foreach ( $InductionCC as $value ) {
|
|
|
|
+ $this->setWXMsg ( $value [0], $msg );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
$staff->setStaffByCondition ( $item );
|
|
$staff->setStaffByCondition ( $item );
|
|
|
|
|
|
@@ -929,10 +1076,10 @@ class HumanResourceController extends DooController {
|
|
'date' => date ( "Y-m-d H:i:s" ),
|
|
'date' => date ( "Y-m-d H:i:s" ),
|
|
'status' => 1,
|
|
'status' => 1,
|
|
'img' => $this->staff ['avatar'],
|
|
'img' => $this->staff ['avatar'],
|
|
- 'username' => $this->staff['username'],
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'category' => $this->staff ['category'],
|
|
'category' => $this->staff ['category'],
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
if ($nature == 'TRIAL')
|
|
if ($nature == 'TRIAL')
|
|
$item += array (
|
|
$item += array (
|
|
@@ -1033,11 +1180,10 @@ class HumanResourceController extends DooController {
|
|
'operation' => "申请入职",
|
|
'operation' => "申请入职",
|
|
|
|
|
|
'img' => $staffDetail ['avatar'],
|
|
'img' => $staffDetail ['avatar'],
|
|
- 'username' => $staffDetail['username'],
|
|
|
|
|
|
+ 'username' => $staffDetail ['username'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'uid' => $staffDetail ['sid'],
|
|
'category' => $staffDetail ['category'],
|
|
'category' => $staffDetail ['category'],
|
|
- 'sid'=>$staffDetail ['sid'],
|
|
|
|
-
|
|
|
|
|
|
+ 'sid' => $staffDetail ['sid']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
|
|
@@ -1099,10 +1245,9 @@ class HumanResourceController extends DooController {
|
|
'username' => $this->staff ['username'],
|
|
'username' => $this->staff ['username'],
|
|
'operation' => "申请离职",
|
|
'operation' => "申请离职",
|
|
'uid' => $this->staff ['sid'],
|
|
'uid' => $this->staff ['sid'],
|
|
- 'category' => $this->staff ['category'] ,
|
|
|
|
-
|
|
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
|
|
+ 'category' => $this->staff ['category'],
|
|
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
|
|
@@ -1142,34 +1287,31 @@ class HumanResourceController extends DooController {
|
|
// 计算工龄天数
|
|
// 计算工龄天数
|
|
// echo $staff->seniorityFormula;
|
|
// echo $staff->seniorityFormula;
|
|
$day = $this->getSeniority ( $seniorityFormula );
|
|
$day = $this->getSeniority ( $seniorityFormula );
|
|
- $dimissionDate=date ( "Y-m-d " );
|
|
|
|
|
|
+ $dimissionDate = date ( "Y-m-d " );
|
|
$item = array (
|
|
$item = array (
|
|
'sid' => $sid,
|
|
'sid' => $sid,
|
|
'nature' => 4,
|
|
'nature' => 4,
|
|
'pendStatus' => 4,
|
|
'pendStatus' => 4,
|
|
'seniorityFormula' => json_encode ( $seniorityFormula ),
|
|
'seniorityFormula' => json_encode ( $seniorityFormula ),
|
|
'hireBiasDate' => $day,
|
|
'hireBiasDate' => $day,
|
|
- 'dimissionDate' => $dimissionDate
|
|
|
|
|
|
+ 'dimissionDate' => $dimissionDate
|
|
);
|
|
);
|
|
$staff->setStaffByCondition ( $item );
|
|
$staff->setStaffByCondition ( $item );
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //发送微信抄送
|
|
|
|
|
|
+ // 发送微信抄送
|
|
Doo::loadModel ( 'staffLeaveManage' );
|
|
Doo::loadModel ( 'staffLeaveManage' );
|
|
$staffLeaveManage = new staffLeaveManage ();
|
|
$staffLeaveManage = new staffLeaveManage ();
|
|
- $msg = '[抄送]'.$detail['category'].'-'.$detail['username'].'申请离职成功\n离职时间:'.$dimissionDate;
|
|
|
|
|
|
+ $msg = '[抄送]' . $detail ['category'] . '-' . $detail ['username'] . '申请离职成功\n离职时间:' . $dimissionDate;
|
|
|
|
|
|
- $cidmode=$detail['cid'];
|
|
|
|
- if(!empty($detail['departmentID']))
|
|
|
|
- $cidmode=$detail['cid'].'-'.$detail['departmentID'];
|
|
|
|
- $InductionCC=$staffLeaveManage->getStaffManageByCid($cidmode);
|
|
|
|
|
|
+ $cidmode = $detail ['cid'];
|
|
|
|
+ if (! empty ( $detail ['departmentID'] ))
|
|
|
|
+ $cidmode = $detail ['cid'] . '-' . $detail ['departmentID'];
|
|
|
|
+ $InductionCC = $staffLeaveManage->getStaffManageByCid ( $cidmode );
|
|
$InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
$InductionCC = json_decode ( $InductionCC ['CC'], true );
|
|
-
|
|
|
|
- foreach ($InductionCC as $value){
|
|
|
|
- $this->setWXMsg ( $value[0],$msg );
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
+ foreach ( $InductionCC as $value ) {
|
|
|
|
+ $this->setWXMsg ( $value [0], $msg );
|
|
|
|
+ }
|
|
|
|
|
|
return '/hrEmployee';
|
|
return '/hrEmployee';
|
|
}
|
|
}
|
|
@@ -1226,10 +1368,9 @@ class HumanResourceController extends DooController {
|
|
'username' => $this->staff ['username'],
|
|
'username' => $this->staff ['username'],
|
|
'operation' => "申请转正",
|
|
'operation' => "申请转正",
|
|
'uid' => $this->staff ['sid'],
|
|
'uid' => $this->staff ['sid'],
|
|
- 'category' => $this->staff ['category'] ,
|
|
|
|
-
|
|
|
|
|
|
+ 'category' => $this->staff ['category'],
|
|
|
|
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
|
|
@@ -1304,14 +1445,11 @@ class HumanResourceController extends DooController {
|
|
|
|
|
|
'operation' => "申请晋升" . $pDetail [1],
|
|
'operation' => "申请晋升" . $pDetail [1],
|
|
|
|
|
|
-
|
|
|
|
'img' => $this->staff ['avatar'],
|
|
'img' => $this->staff ['avatar'],
|
|
- 'username' => $this->staff['username'],
|
|
|
|
|
|
+ 'username' => $this->staff ['username'],
|
|
'uid' => $detail ['sid'],
|
|
'uid' => $detail ['sid'],
|
|
'category' => $this->staff ['category'],
|
|
'category' => $this->staff ['category'],
|
|
- 'sid'=>$this->staff ['sid'],
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ 'sid' => $this->staff ['sid']
|
|
);
|
|
);
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
$staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
|
|
@@ -1319,6 +1457,76 @@ class HumanResourceController extends DooController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 再入职申请
|
|
|
|
+ */
|
|
|
|
+ function employeeReentryApply() {
|
|
|
|
+ $sidKey = $this->get_args ( 'sidKey' ) ? $this->get_args ( 'sidKey' ) : "";
|
|
|
|
+
|
|
|
|
+ if (! empty ( $sidKey )) {
|
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
|
+ Doo::loadModel ( 'staff' );
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ Doo::loadModel ( 'reentryManage' );
|
|
|
|
+ $reentryManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ $sid = $XDeode->decode ( $sidKey );
|
|
|
|
+
|
|
|
|
+ $detail = $staff->getStaffBySid ( $sid );
|
|
|
|
+ if (empty ( $detail ))
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
+
|
|
|
|
+ $item = array (
|
|
|
|
+ 'sid' => $sid,
|
|
|
|
+ 'pendStatus' => 7
|
|
|
|
+ );
|
|
|
|
+ $staff->setStaffByCondition ( $item );
|
|
|
|
+
|
|
|
|
+ // 离职审批组
|
|
|
|
+ // 获得审批组KEY
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ $cidMode = $this->staff ['cid'];
|
|
|
|
+ if (! empty ( $this->staff ['departmentID'] ))
|
|
|
|
+ $cidMode = $detail ['cid'] . '_' . $detail ['departmentID'];
|
|
|
|
+
|
|
|
|
+ $staffManageDetail = $reentryManage->getStaffManageByCid ( $cidMode );
|
|
|
|
+ if (empty ( $staffManageDetail ))
|
|
|
|
+ die ( 'illegal request ' );
|
|
|
|
+
|
|
|
|
+ $pendingApprovalsSid = current ( $staffManageDetail ['staffList'] ) [0];
|
|
|
|
+ if (empty ( $pendingApprovalsSid ))
|
|
|
|
+ die ( 'illegal request ' );
|
|
|
|
+ $staff->pendingApprovals = $pendingApprovalsSid;
|
|
|
|
+ $staff->staffManage = $staffManageDetail ['staff'];
|
|
|
|
+ $staff->processApprovals = '';
|
|
|
|
+ $staff->sid = $detail ['sid'];
|
|
|
|
+
|
|
|
|
+ // 抄送组
|
|
|
|
+ $staff->processCC = $staffManageDetail ['CC'];
|
|
|
|
+ $staff->update ();
|
|
|
|
+
|
|
|
|
+ // 操作日志
|
|
|
|
+ Doo::loadModel ( 'staffOperationLog' );
|
|
|
|
+ $staffOperationLog = new staffOperationLog ();
|
|
|
|
+ $item = array (
|
|
|
|
+ 'date' => date ( "Y-m-d H:i:s" ),
|
|
|
|
+ 'status' => 3,
|
|
|
|
+ 'img' => $detail ['avatar'],
|
|
|
|
+ 'username' => $detail ['username'],
|
|
|
|
+ 'operation' => "申请再入职",
|
|
|
|
+ 'uid' => $detail ['sid'],
|
|
|
|
+ 'category' => $detail ['category'],
|
|
|
|
+
|
|
|
|
+ 'sid' => $detail ['sid']
|
|
|
|
+ );
|
|
|
|
+ $staffOperationLog->setInvoiceOperationLog ( $item );
|
|
|
|
+
|
|
|
|
+ return '/hrEmployee';
|
|
|
|
+ }
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 确认在入职
|
|
* 确认在入职
|
|
*/
|
|
*/
|
|
function employeeReentry() {
|
|
function employeeReentry() {
|
|
@@ -1370,6 +1578,184 @@ class HumanResourceController extends DooController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 员工再入职审批流程
|
|
|
|
+ */
|
|
|
|
+ function reentryApprovals() {
|
|
|
|
+ Doo::loadModel ( 'staff' );
|
|
|
|
+ $staff = new staff ();
|
|
|
|
+ Doo::loadModel ( 'L_category' );
|
|
|
|
+ $L_category = new L_category ();
|
|
|
|
+ Doo::loadModel ( 'reentryManage' );
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ // 获得办事和部门
|
|
|
|
+ $categoryList = $L_category->getCategoryDepartment ();
|
|
|
|
+
|
|
|
|
+ $staffManageList = $staffManage->find ( array (
|
|
|
|
+ 'asArray' => true
|
|
|
|
+ ) );
|
|
|
|
+
|
|
|
|
+ foreach ( $staffManageList as $key => $value ) {
|
|
|
|
+ // 审批人员
|
|
|
|
+ $name = json_decode ( $value ['staff'] );
|
|
|
|
+ $employeeApprovals = array ();
|
|
|
|
+ if (count ( $name ) != 0) {
|
|
|
|
+ foreach ( $name as $ve ) {
|
|
|
|
+ array_push ( $employeeApprovals, $ve [1] );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $employeeApprovals = implode ( '->', $employeeApprovals );
|
|
|
|
+
|
|
|
|
+ // 抄送人员
|
|
|
|
+ $name = json_decode ( $value ['CC'] );
|
|
|
|
+ $CC = array ();
|
|
|
|
+ if (count ( $name ) != 0) {
|
|
|
|
+ foreach ( $name as $ve ) {
|
|
|
|
+ array_push ( $CC, $ve [1] );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $CC = implode ( ' ', $CC );
|
|
|
|
+
|
|
|
|
+ foreach ( $categoryList as $k => $v ) {
|
|
|
|
+ $cid = $v ['cid'];
|
|
|
|
+ if (isset ( $v ['did'] ))
|
|
|
|
+ $cid .= '_' . $v ['did'];
|
|
|
|
+ if ($cid == $value ['cid']) { // echo $cid.'//';echo $value['cid'].'<br/>';
|
|
|
|
+ $categoryList [$k] ['employeeApprovals'] = $employeeApprovals;
|
|
|
|
+ $categoryList [$k] ['CC'] = $CC;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ foreach ( $categoryList as $key => $value ) {
|
|
|
|
+ if (! isset ( $value ['employeeApprovals'] ))
|
|
|
|
+ $categoryList [$key] ['employeeApprovals'] = '';
|
|
|
|
+ if (! isset ( $value ['CC'] ))
|
|
|
|
+ $categoryList [$key] ['CC'] = '';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // print_r($categoryList);
|
|
|
|
+ $stafflist = $staff->getStaff ( true );
|
|
|
|
+
|
|
|
|
+ $this->data ['categoryList'] = $categoryList;
|
|
|
|
+ $this->data ['staffList'] = $stafflist;
|
|
|
|
+
|
|
|
|
+ $this->data ['memu'] = "HumanResource";
|
|
|
|
+ $this->data ['hrMemu'] = "employeeApprovals";
|
|
|
|
+
|
|
|
|
+ $this->render ( "/humanResource/reentryApprovals", $this->data );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 添加员工审批人员
|
|
|
|
+ */
|
|
|
|
+ function reentryApprovalsAdd() {
|
|
|
|
+ $cidKey = $this->get_args ( 'cidKey' ) ? $this->get_args ( 'cidKey' ) : "";
|
|
|
|
+ $uidlist = $this->get_args ( 'uidlist' ) ? $this->get_args ( 'uidlist' ) : "";
|
|
|
|
+ $uidlist = explode ( ",", $uidlist );
|
|
|
|
+
|
|
|
|
+ if (! empty ( $cidKey ) && ! empty ( $uidlist )) {
|
|
|
|
+ Doo::loadModel ( "reentryManage" );
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
|
+
|
|
|
|
+ // 获得抄送内容
|
|
|
|
+ $approvalKey = explode ( '_', $cidKey );
|
|
|
|
+ $cidMode = array ();
|
|
|
|
+ foreach ( $approvalKey as $value ) {
|
|
|
|
+ $cid = $XDeode->decode ( $value );
|
|
|
|
+ array_push ( $cidMode, $cid );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $cidMode = implode ( '_', $cidMode );
|
|
|
|
+ // echo $cidMode;die;
|
|
|
|
+ $staffManageInfo = $staffManage->getOne ( array (
|
|
|
|
+ 'where' => 'cid ="' . $cidMode . '" ',
|
|
|
|
+ 'asArray' => true
|
|
|
|
+ ) );
|
|
|
|
+
|
|
|
|
+ // 审批人员
|
|
|
|
+ $list = array ();
|
|
|
|
+ foreach ( $uidlist as $key => $value ) {
|
|
|
|
+ $info = explode ( ":", $value );
|
|
|
|
+ array_push ( $list, $info );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (empty ( $staffManageInfo )) {
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ $staffManage->cid = $cidMode;
|
|
|
|
+ $staffManage->staff = json_encode ( $list );
|
|
|
|
+
|
|
|
|
+ $staffManage->insert ();
|
|
|
|
+ } else {
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ $staffManage->staff = json_encode ( $list );
|
|
|
|
+ $staffManage->update ( array (
|
|
|
|
+ 'where' => 'icid = ' . $staffManageInfo ['icid']
|
|
|
|
+ ) );
|
|
|
|
+ }
|
|
|
|
+ return '/reentryApprovals';
|
|
|
|
+ }
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 添加抄送员工,微信通知
|
|
|
|
+ */
|
|
|
|
+ function reentryCCAdd() {
|
|
|
|
+ $cidKey = $this->get_args ( 'cidKey' ) ? $this->get_args ( 'cidKey' ) : "";
|
|
|
|
+ $staff = $this->get_args ( 'staff' ) ? $this->get_args ( 'staff' ) : "";
|
|
|
|
+ // && ! empty ( $staff )
|
|
|
|
+ if (! empty ( $cidKey )) {
|
|
|
|
+ Doo::loadModel ( "reentryManage" );
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
|
+
|
|
|
|
+ // 获得抄送内容
|
|
|
|
+ $approvalKey = explode ( '_', $cidKey );
|
|
|
|
+ $cidMode = array ();
|
|
|
|
+ foreach ( $approvalKey as $value ) {
|
|
|
|
+ $cid = $XDeode->decode ( $value );
|
|
|
|
+ array_push ( $cidMode, $cid );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $cidMode = implode ( '_', $cidMode );
|
|
|
|
+ $staffManageInfo = $staffManage->getOne ( array (
|
|
|
|
+ 'where' => 'cid ="' . $cidMode . '" ',
|
|
|
|
+ 'asArray' => true
|
|
|
|
+ ) );
|
|
|
|
+
|
|
|
|
+ $list = array ();
|
|
|
|
+ foreach ( $staff as $key => $value ) {
|
|
|
|
+ $info = explode ( ":", $value );
|
|
|
|
+ array_push ( $list, $info );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (empty ( $staffManageInfo )) {
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ $staffManage->cid = $cidMode;
|
|
|
|
+ $staffManage->CC = json_encode ( $list );
|
|
|
|
+
|
|
|
|
+ $staffManage->insert ();
|
|
|
|
+ } else {
|
|
|
|
+ $staffManage = new reentryManage ();
|
|
|
|
+
|
|
|
|
+ $staffManage->CC = json_encode ( $list );
|
|
|
|
+ $staffManage->update ( array (
|
|
|
|
+ 'where' => 'icid = ' . $staffManageInfo ['icid']
|
|
|
|
+ ) );
|
|
|
|
+ }
|
|
|
|
+ return '/reentryApprovals';
|
|
|
|
+ }
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 员工审批流程
|
|
* 员工审批流程
|
|
*/
|
|
*/
|
|
function employeeApprovals() {
|
|
function employeeApprovals() {
|
|
@@ -2133,7 +2519,7 @@ class HumanResourceController extends DooController {
|
|
|
|
|
|
$stafflist = $staff->getStaffByCondition ( $con );
|
|
$stafflist = $staff->getStaffByCondition ( $con );
|
|
|
|
|
|
- // print_r($stafflist);
|
|
|
|
|
|
+ //print_r($stafflist);
|
|
|
|
|
|
$monthstart = date ( 'Y-m-d 00:00:00', mktime ( 0, 0, 0, date ( 'm' ), 1, date ( 'Y' ) ) );
|
|
$monthstart = date ( 'Y-m-d 00:00:00', mktime ( 0, 0, 0, date ( 'm' ), 1, date ( 'Y' ) ) );
|
|
$monthend = date ( 'Y-m-d 23:59:59', mktime ( 0, 0, 0, date ( 'm' ) + 1, 0, date ( 'Y' ) ) );
|
|
$monthend = date ( 'Y-m-d 23:59:59', mktime ( 0, 0, 0, date ( 'm' ) + 1, 0, date ( 'Y' ) ) );
|
|
@@ -3220,7 +3606,7 @@ target="_blank">反面(照片)</a>
|
|
* @param unknown $rid
|
|
* @param unknown $rid
|
|
* @param string $typeMsg
|
|
* @param string $typeMsg
|
|
*/
|
|
*/
|
|
- function setWXMsg($sid, $msg = '',$msgtype='text') {
|
|
|
|
|
|
+ function setWXMsg($sid, $msg = '', $msgtype = 'text') {
|
|
Doo::loadModel ( 'staff' );
|
|
Doo::loadModel ( 'staff' );
|
|
$staff = new staff ();
|
|
$staff = new staff ();
|
|
$staffmsg = $staff->getOne ( array (
|
|
$staffmsg = $staff->getOne ( array (
|