Se añadió un API de TA a partir de BioStar 2 (2.8.13)
NOTA:
Para “Cómo usar la GUI Swagger para el API de TA”, consulte el siguiente enlace:
[BioStar 2 API para TA] Como usar e iniciar con el API de BioStar 2 para TA
Cómo crear reglas
Las reglas de TA de BioStar 2 se pueden crear mediante la API de TA.
Puede encontrar la API /tna/Rule en su TA Swagger.
Parte 1. Crear reglas
[POST]: /tna/rules
[Parámetros]
Nombre | Tipo | *M/O | Explicación | Valor |
Daily_overtime.double_overtime.overtime_minutes | Int | M |
| Ej) 0 |
Daily_overtime.double_overtime.pay_code_after_overtime_minutes.id | Int | M |
|
|
Daily_overtime.double_overtime.pay_code_after_overtime_minutes.name | Cuerda | M |
|
|
Daily_overtime.max_minutos | Int | M |
|
|
Daily_overtime.overtime.pay_code_after_regular_minutes.id | Int | M |
|
|
Daily_overtime.overtime.pay_code_after_regular_minutes.name | Cuerda | M |
|
|
Daily_overtime.overtime.regular_minutes | Int | M |
|
|
Daily_overtime.use | Verdadero o falso | M |
|
|
Descripción | Cuerda | M |
|
|
Holiday_overtime.day_start_time | Int | M |
|
|
Holiday_overtime.pay_code.id | Int | M |
|
|
Holiday_overtime.pay_code.name | Cuerda | M |
|
|
Holiday_overtime.first_in_last_out | Verdadero/falso | M |
|
|
Holiday_overtime.use | Verdadero/falso | M |
|
|
Monthly_overtime.double_overtime.overtime_minutes | Int | M |
|
|
Monthly_overtime.double_overtime.pay_code_after_overtime_minutes.id | Int | M |
|
|
Monthly_overtime.double_overtime.pay_code_after_overtime_minutes.name | Cuerda | M |
|
|
Monthly_overtime.max_minutos | Int | M |
|
|
Monthly_overtime.overtime.pay_code_after_regular_minutes.id | Int | M |
|
|
Monthly_overtime.overtime.pay_code_after_regular_minutes.name | Cuerda | M |
|
|
Monthly_overtime.overtime.regular_minutes | Int | M |
|
|
Monthly_overtime.use | Verdadero/falso | M |
|
|
Nombre | Cuerda | M |
|
|
Weekend_overtime.day_start_time | Int | M |
|
|
Weekend_overtime.pay_code.id | Int | M |
|
|
Weekend_overtime.pay_code.name | Cuerda | M |
|
|
Weekend_overtime.first_in_last_out | Verdadero/falso | M |
|
|
Weekend_overtime.use | Verdadero/falso | M |
|
|
Weekend_overtime.max_minutos | Int | M |
|
|
Weekend_overtime.overtime.pay_code_after_regular_minutes.id | Int | M |
|
|
Weekend_overtime.overtime.pay_code_after_regular_minutes.name | Cuerda | M |
|
|
Weekend_overtime.overtime.regular_minutes | Int | M |
|
|
Weekend_overtime.use | Verdadero/falso | M |
|
|
* M – Obligatorio, O – Opcional
[Ejemplo de modelo de valor/parámetros]
{ "daily_overtime": { "double_overtime": { "overtime_minutes": 0, "pay_code_after_overtime_minutes": { "id": 0, "name": "Ninguno" } }, "max_minutes": 0, "horas extraordinarias": { "pay_code_after_regular_minutes": { "id": 0, "name": "Ninguno" }, "regular_minutes": 0 }, "Uso": falso }, "descripción": "Regla 4", "holiday_overtime": { "day_start_time": 300, "pay_code": { "id": 0, "name": "Ninguno" }, "first_in_last_out": falso, "Uso": falso }, "monthly_overtime": { "double_overtime": { "overtime_minutes": 0, "pay_code_after_overtime_minutes": { "id": 0, "name": "Ninguno" } }, "max_minutes": 0, "horas extraordinarias": { "pay_code_after_regular_minutes": { "id": 0, "name": "Ninguno" }, "regular_minutes": 0 }, "Uso": falso }, "nombre": "Regla 4", "weekend_overtime": { "day_start_time": 300, "pay_code": { "id": 0, "name": "Ninguno" }, "first_in_last_out": falso, "Uso": falso }, "weekly_overtime": { "double_overtime": { "overtime_minutes": 0, "pay_code_after_overtime_minutes": { "id": 0, "name": "Ninguno" } }, "max_minutes": 0, "horas extraordinarias": { "pay_code_after_regular_minutes": { "id": 0, "name": "Ninguno" }, "regular_minutes": 0 }, "Uso": falso } } |
[Respuesta: exitosa]
{ "id": 5, "message": "Creado correctamente", "message_key": "CREADO", "idioma": "en", "status_code": "CREADO" } |
La respuesta anterior representa los mismos resultados que la captura de pantalla a continuación.
Parte 2. Crear reglas a través de POSTMAN