|
|
|
@ -7,6 +7,7 @@ class LeavePercentageFactory
|
|
|
|
|
// private $isLeave = [0=>''];
|
|
|
|
|
private $model;
|
|
|
|
|
static $arrUnSettlementList = [];
|
|
|
|
|
static $arrUnSettlementApplyList = [];
|
|
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
@ -19,22 +20,26 @@ class LeavePercentageFactory
|
|
|
|
|
*/
|
|
|
|
|
public function unSettlementList() {
|
|
|
|
|
|
|
|
|
|
if (self::$arrUnSettlementList) {
|
|
|
|
|
if (self::$arrUnSettlementList||self::$arrUnSettlementApplyList) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = $this->model ->where(['work_status'=>1])->select();
|
|
|
|
|
|
|
|
|
|
$returnData = [];
|
|
|
|
|
$returnApplyData = [];
|
|
|
|
|
|
|
|
|
|
foreach ($data as $key => $value) {
|
|
|
|
|
|
|
|
|
|
$returnData[$value['id']] = $value['leave_time'];
|
|
|
|
|
$returnApplyData[$value['id']] = $value['apply_leave_time'];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
self::$arrUnSettlementApplyList = $returnApplyData;
|
|
|
|
|
self::$arrUnSettlementList = $returnData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function returnUnSettlementList() {
|
|
|
|
@ -69,7 +74,7 @@ class LeavePercentageFactory
|
|
|
|
|
//当月离职时间,在职时间小于30天不结算
|
|
|
|
|
if (self::$arrUnSettlementList[$admin_id]
|
|
|
|
|
&&date("Y-m",self::$arrUnSettlementList[$admin_id])==$date
|
|
|
|
|
&&(strtotime(date("Y-m-t",strtotime($date)))-self::$arrUnSettlementList[$admin_id])<86400*30) {
|
|
|
|
|
&&(self::$arrUnSettlementList[$admin_id]-self::$arrUnSettlementApplyList[$admin_id])<86400*30) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|