fix: 周生辰退出日志扣分统计

This commit is contained in:
renshen 2026-11-06 10:23:38 +08:00
parent bd00184f93
commit 46dab2c95c
2 changed files with 10 additions and 2 deletions

View File

@ -57,9 +57,13 @@ return [
))),
'display_name' => env('DINGTALK_WORKLOG_DISPLAY_NAME', '财务日报 / 日志'),
'penalty_start_date' => env('DINGTALK_WORKLOG_PENALTY_START_DATE', '2026-11-04'),
// 江陵不参与扣分;周生辰待离职,按负责人要求从扣分明细移除。
'penalty_excluded_user_ids' => array_values(array_filter(array_map(
'trim',
explode(',', (string) env('DINGTALK_WORKLOG_PENALTY_EXCLUDED_USER_IDS', '02591267217229')),
explode(',', (string) env(
'DINGTALK_WORKLOG_PENALTY_EXCLUDED_USER_IDS',
'02591267217229,17097754648162977',
)),
))),
'userid' => env('DINGTALK_WORKLOG_USERID'),
'lookback_days' => (int) env('DINGTALK_WORKLOG_LOOKBACK_DAYS', 35),

View File

@ -105,7 +105,10 @@ class DingWorklogPenaltyCalculatorTest extends TestCase
{
config([
'dingtalk.worklog.penalty_start_date' => '2026-11-04',
'dingtalk.worklog.penalty_excluded_user_ids' => ['02591267217229'],
'dingtalk.worklog.penalty_excluded_user_ids' => [
'02591267217229',
'17097754648162977',
],
'app.timezone' => 'Asia/Shanghai',
]);
$repository = Mockery::mock(DingWorklogMirrorRepository::class);
@ -115,6 +118,7 @@ class DingWorklogPenaltyCalculatorTest extends TestCase
$roster = Mockery::mock(FinanceRoster::class);
$roster->shouldReceive('cachedFinanceMembers')->once()->andReturn([
['userid' => '02591267217229', 'name' => '江陵'],
['userid' => '17097754648162977', 'name' => '周生辰'],
['userid' => 'qiuxiang', 'name' => '秋香'],
]);
$attendance = Mockery::mock(DingAttendanceMirrorRepository::class);