29 lines
		
	
	
		
			577 B
		
	
	
	
		
			PHP
		
	
	
		
		
			
		
	
	
			29 lines
		
	
	
		
			577 B
		
	
	
	
		
			PHP
		
	
	
| 
								 | 
							
								<?php
							 | 
						|||
| 
								 | 
							
								declare (strict_types=1);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								namespace app\subscribe;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								use think\facade\Db;
							 | 
						|||
| 
								 | 
							
								use think\facade\Log;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								class Pay
							 | 
						|||
| 
								 | 
							
								{
							 | 
						|||
| 
								 | 
							
								    /**
							 | 
						|||
| 
								 | 
							
								     *  基本工资在员工入职就要填入
							 | 
						|||
| 
								 | 
							
								        基本工资按天计算,打卡确认一天算一天
							 | 
						|||
| 
								 | 
							
								        加班工资按6小时为一天:天工资÷6小时=每小时工资
							 | 
						|||
| 
								 | 
							
								     */
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								    // 统计上月工资
							 | 
						|||
| 
								 | 
							
								    public function onGenerateLastMonth(): bool
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
								        Log::info('触发事件:计算上月工资');
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        // 根据打卡记录与加班记录
							 | 
						|||
| 
								 | 
							
								        $a = \app\service\Pay::statistic();
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        return true;
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |