oxygensuite/oxygen-ergani 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oxygensuite/oxygen-ergani

Composer 安装命令:

composer require oxygensuite/oxygen-ergani

包简介

A comprehensive package for seamlessly interacting with Greece’s Ergani system, enabling automated submissions for employee data such as check-ins, check-outs, and other employment-related information. This repository aims to simplify and streamline workforce management and ensure compliance with Gr

README 文档

README

A comprehensive PHP package for interacting with Greece's ERGANI II system, enabling automated submissions for employee data including work cards, hiring declarations, terminations, and more.

PHP Version License PHPStan

Features

  • Work Cards - Employee check-in/check-out submissions
  • Work Time Declarations - Daily and weekly work schedules
  • Hiring Forms (E3) - New hires, modifications, deletions, and lending arrangements
  • Internship Declarations (E3.5) - Internship and practical training submissions
  • Termination Forms (E5) - Voluntary resignations, retirements, and death terminations
  • Dismissal Forms (E6) - Employer-initiated terminations, transfers, and loan endings
  • Fixed-Term Terminations (E7) - Contract expirations and early terminations
  • Construction Forms (E12) - Construction work personnel declarations and censuses
  • Employment Modifications (MA/MAD) - Changes to employment terms
  • Overtime Declarations - Regular and retrospective overtime submissions
  • Sixth Day Declarations - Sixth day / extra shift submissions
  • Pre-Announcement Exemptions - Pre-announcement exemption declarations
  • Query Services - Employer info, branch details, parameter lookups, and employee status
  • PSR-16 Caching - Opt-in caching for service responses with bundled file-based and in-memory implementations
  • Model Factories - Laravel-inspired factories generating valid Greek test data (AFM, AMKA, names)
  • CLI Tools - enum:check and schema:check to verify local code stays in sync with the live API

Requirements

  • PHP ^8.2
  • Guzzle HTTP ^7.9
  • ERGANI credentials (username and password)

Installation

composer require oxygensuite/oxygen-ergani

Quick Start

1. Set Up Token Management

The package handles JWT authentication automatically. Configure it once at application boot:

use OxygenSuite\OxygenErgani\Storage\FileToken;
use OxygenSuite\OxygenErgani\Storage\Token;
use OxygenSuite\OxygenErgani\Enums\Environment;

Token::setCurrentTokenManager(
    new FileToken('your-username', 'your-password'),
    Environment::TEST // or Environment::PRODUCTION
);

2. Submit a Work Card

use OxygenSuite\OxygenErgani\Ergani;
use OxygenSuite\OxygenErgani\Models\WorkCard\Card;
use OxygenSuite\OxygenErgani\Models\WorkCard\CardDetail;
use OxygenSuite\OxygenErgani\Enums\CardDetailType;

$card = Card::make()
    ->setEmployerTin('999999999')
    ->setBranchCode(0)
    ->setComments('')
    ->addDetails(
        CardDetail::make()
            ->setTin('888888888')
            ->setLastName('DOE')
            ->setFirstName('JOHN')
            ->setType(CardDetailType::CHECK_IN)
            ->setReferenceDate(date('Y-m-d'))
            ->setDate(date('Y-m-d\TH:i:s.uP'))
    );

$ergani = new Ergani();
$response = $ergani->sendWorkCards($card);

echo $response[0]->protocol; // e.g., 'ΕΥΣ92'

3. Submit a Hiring Declaration (E3)

use OxygenSuite\OxygenErgani\Ergani;
use OxygenSuite\OxygenErgani\Models\Hiring\NewDeclaration;

$declaration = NewDeclaration::make()
    ->setEmployerTin('999999999')
    ->setBranchCode(0)
    ->setLastName('ΠΑΠΑΔΟΠΟΥΛΟΣ')
    ->setFirstName('ΙΩΑΝΝΗΣ')
    ->setTin('888888888')
    ->setAmka('01018012345')
    ->setHiringDate('15/01/2025')
    // ... additional fields
    ->withDefaults(); // Fill remaining fields with empty strings

$ergani = new Ergani();
$response = $ergani->sendHiringNew($declaration);

Documentation

Full documentation is available at oxygensuite.github.io/oxygen-ergani.

Guides

API Reference

Upgrading

If you're upgrading from v1.x, please see the UPGRADING.md guide for breaking changes and migration instructions.

Development

# Install dependencies
composer install

# Run tests
composer test

# Static analysis (PHPStan level 7)
composer analyse

# Code style (PER)
composer lint

# Mutation testing
composer infect

# Run all checks
composer check

Security

If you discover a security vulnerability, please send an email to security@oxygen.gr. All security vulnerabilities will be promptly addressed. Please see SECURITY.md for more details.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Changelog

Please see CHANGELOG.md for information about recent changes.

License

This package is open-source software licensed under the MIT License.

Copyright 2025 Oxygen Suite.

oxygensuite/oxygen-ergani 适用场景与选型建议

oxygensuite/oxygen-ergani 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 9, 最近一次更新时间为 2025 年 05 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「checkout」 「checkin」 「greece」 「ergani」 「ΕΡΓΑΝΗ」 「employee-card」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 oxygensuite/oxygen-ergani 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 oxygensuite/oxygen-ergani 我们能提供哪些服务?
定制开发 / 二次开发

基于 oxygensuite/oxygen-ergani 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 25
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-18