市场业绩离职功能提交导出修正

master
zhengyongxing 4 years ago
parent d3e9f113ba
commit c9ef39ada9

@ -67,6 +67,7 @@ class CompanyStatementOfflineController extends ThinkController
->alias("c")
->field("c.*,p.statement_num,p.verify_status")
->where($map)
->where(['p.verify_status'=>['neq',6]])
->join("tab_company_statement_pool as p ON c.pool_id = p.id")

@ -1,33 +1,29 @@
<?php
namespace base\Service;
namespace base\Factory;
class LeavePercentageService
class LeavePercentageFactory
{
// private $isLeave = [0=>''];
private $model;
static $arrUnSettlementList = [];
private function __construct()
public function __construct()
{
$this->model = M("ucenter_member");
}
static function getInstance() {
}
/**
* 不结算的管理员列表
* @return array
*/
public function unSettlementList() {
if (isset(self::$arrUnSettlementList)) {
if (self::$arrUnSettlementList) {
return;
}
$data = $this->model ->where(['work_status'=>0])->select();
$data = $this->model ->where(['work_status'=>1])->select();
$returnData = [];
@ -41,6 +37,12 @@ class LeavePercentageService
}
/**
* 判断是否结算绩效
* @param string $date
* @param int $admin_id
* @return bool
*/
public function isSettlement($date = '',$admin_id= 0) {
//未离职结算
@ -66,9 +68,27 @@ class LeavePercentageService
}
/**
* 离职定时器方法
*/
public function leaveTiming() {
$memberData = $this->model->where(['leave_time'=>['gt',0],"work_status"=>0])->select();
$where = [];
foreach ($memberData as $key => $value) {
//判断离职时间是否已经达到
if (time() >= $value['leave_time']) {
array_push($where,$value['id']);
}
}
//离职时间达到列表
if($where) {
$this->model
->where(['id'=>['in',$where]])
->save(['work_status'=>1]);
}
}
Loading…
Cancel
Save