@ -3,6 +3,7 @@
namespace Admin\Controller;
namespace Admin\Controller;
use User\Api\UserApi as UserApi;
use User\Api\UserApi as UserApi;
use Base\Service\LeavePercentageService;
/**
/**
* 后台首页控制器
* 后台首页控制器
@ -12,6 +13,7 @@ class MarketPercentageController extends ThinkController
{
{
protected $coefficient = [];
protected $coefficient = [];
private $leavePercentage ;
protected function _initialize()
protected function _initialize()
{
{
@ -23,6 +25,8 @@ class MarketPercentageController extends ThinkController
$this->coefficient[$value['pay_time']][$value['admin_id']] = $value['coefficient'] / 100;
$this->coefficient[$value['pay_time']][$value['admin_id']] = $value['coefficient'] / 100;
}
}
LeavePercentageService::unSettlementList();
parent::_initialize();
parent::_initialize();
}
}
@ -582,28 +586,28 @@ class MarketPercentageController extends ThinkController
if (is_administrator() || session('user_group_id') == 15 || session('user_group_id') == 14 || session('user_group_id') == 19 || session('user_group_id') == 23) {
if (is_administrator() || session('user_group_id') == 15 || session('user_group_id') == 14 || session('user_group_id') == 19 || session('user_group_id') == 23) {
unset($map['admin_id']);
unset($map['admin_id']);
$markerData = M("ucenter_member")->field("id")->where(['work_status' => 1])->select();
// $markerData = M("ucenter_member")->field("id")->where(['work_status' => 1])->select();
//
if ($markerData) {
// if ($markerData) {
$admin_map['sys_member.uid'] = ['not in', array_column($markerData, 'id')];
// $admin_map['sys_member.uid'] = ['not in', array_column($markerData, 'id')];
}
// }
$admin_data = M("member")
$admin_data = M("member")
->field("access.uid admin_id")
->field("access.uid admin_id")
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
->join("left join sys_auth_group auth on access.group_id=auth.id")
->join("left join sys_auth_group auth on access.group_id=auth.id")
->where(['group_id' => ['in', '11,12,21']])
->where(['group_id' => ['in', '11,12,21']])
->where($admin_map)
// ->where($admin_map)
->select();
->select();
if ($admin_data) {
if ($admin_data) {
$map['admin_id'] = ['in', array_column($admin_data, 'admin_id')];
$map['admin_id'] = ['in', array_column($admin_data, 'admin_id')];
}
}
if (!in_array($_REQUEST['admin_id'], array_column($markerData, 'id'))) {
// if (!in_array($_REQUEST['admin_id'], array_column($markerData, 'id'))) {
$_REQUEST['admin_id'] ? ($map['admin_id'] = $_REQUEST['admin_id']) : '';
$_REQUEST['admin_id'] ? ($map['admin_id'] = $_REQUEST['admin_id']) : '';
} else {
// } else {
$this->display("marketstaffsettle");
// $this->display("marketstaffsettle");
die();
// die();
}
// }
}
}