Se añadió un API para 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 plantillas de Horarios

Las plantillas de Horarios de TA de BioStar 2 se pueden hacer utilizando la API de TA.

 

Interfaz gráfica de usuario, aplicación, Teams

Descripción generada automáticamente

테이블이(가) 표시된 사진

자동 생성된 설명


 
Graphical user interface, application

Description automatically generated
 Puede encontrar la API de plantilla /tna/Schedule en su TA Swagger.

 

 

Parte 1. Crear plantillas de Horarios

 

[PUBLICACIÓN]: /tna/schedule_templates

[Encabezados]

[Parámetros]

Nombre

Tipo

*M/O

Explicación

Valor

Cycle_in_days

Entero

O

Duración del ciclo en días. Se usa solo para el tipo diario

7

Descripción

Cuerda

O

Descripción

 

Nombre

Cuerda

M

Nombre

 

Shift_list

Array[SimpleStringId]

O

Lista de turnos (solo se permiten 7 elementos para el tipo semanal)

Información de turnos

Tipo

Cuerda

M

'SEMANAL' o 'DIARIO'

 

* M – Obligatorio, O – Opcional

[Ejemplo de modelo de valor/parámetros]

{

"cycle_in_days": 7,

"weekend_index": "0,6",

"description": "Plantilla de Horarios 3",

"name": "Plantilla de Horarios 3",

"shift_list": [

{

"nombre": "Turno 1",

"description": "Shift 1",

"id": 1,

"tipo": "FIJO",

"day_start_time": 300,

"first_in_last_out": verdadero,

"created_perm_id": 1,

"fixed_option": {

"regular_pay_time_segment_option": {

"gracia": {

"uso": verdadero,

"en": 1,

"fuera": 1

},

"punch_in_time_range": {}

},

"punch_in_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"punch_out_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"time_segment_list": [

{

"pay_code": {

"id": 1,

"color": "#ff0000",

"count_as_attendance": verdadero,

"nombre": "Regular"

},

"punch_in_rounding": {},

"punch_out_rounding": {},

"start_time": 480,

"end_time": 1020,

"min_minutes": 240,

"timeInfo": {

"timeStartPosition": 33.333333333333,

"timeBar": 37.5,

"nextDayTimeStartPosition": 0,

"nextDayTimeBar": 0,

"timeDuration": "9 horas 0 minutos",

"timeDurationMinutes": 540

}

}

],

"break_time": {

"tipo": "NINGUNO",

"max_minutes": 0,

"start_time": 1260,

"end_time": 1290

},

"use_exception_handle": falso,

"meal_deduction_option": {

"lista": [

{

"uso": verdadero,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 240

},

"fixed_deduction": {

"start_time": 720,

"end_time": 780

}

},

{

"uso": false,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 480

},

"fixed_deduction": {

"start_time": 1080,

"end_time": 1140

}

}

],

"tipo": "BY_PUNCH"

},

"day_start_time_excess_time": {

"uso": false,

"prev_allowed_minutes": 0,

"next_allowed_minutes": 0

},

"start_time": 480,

"end_time": 1020

}

},

{

"nombre": "Turno 1",

"description": "Shift 1",

"id": 1,

"tipo": "FIJO",

"day_start_time": 300,

"first_in_last_out": verdadero,

"created_perm_id": 1,

"fixed_option": {

"regular_pay_time_segment_option": {

"gracia": {

"uso": verdadero,

"en": 1,

"fuera": 1

},

"punch_in_time_range": {}

},

"punch_in_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"punch_out_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"time_segment_list": [

{

"pay_code": {

"id": 1,

"color": "#ff0000",

"count_as_attendance": verdadero,

"nombre": "Regular"

},

"punch_in_rounding": {},

"punch_out_rounding": {},

"start_time": 480,

"end_time": 1020,

"min_minutes": 240,

"timeInfo": {

"timeStartPosition": 33.333333333333,

"timeBar": 37.5,

"nextDayTimeStartPosition": 0,

"nextDayTimeBar": 0,

"timeDuration": "9 horas 0 minutos",

"timeDurationMinutes": 540

}

}

],

"break_time": {

"tipo": "NINGUNO",

"max_minutes": 0,

"start_time": 1260,

"end_time": 1290

},

"use_exception_handle": falso,

"meal_deduction_option": {

"lista": [

{

"uso": verdadero,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 240

},

"fixed_deduction": {

"start_time": 720,

"end_time": 780

}

},

{

"uso": false,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 480

},

"fixed_deduction": {

"start_time": 1080,

"end_time": 1140

}

}

],

"tipo": "BY_PUNCH"

},

"day_start_time_excess_time": {

"uso": false,

"prev_allowed_minutes": 0,

"next_allowed_minutes": 0

},

"start_time": 480,

"end_time": 1020

}

},

{

"nombre": "Turno 1",

"description": "Shift 1",

"id": 1,

"tipo": "FIJO",

"day_start_time": 300,

"first_in_last_out": verdadero,

"created_perm_id": 1,

"fixed_option": {

"regular_pay_time_segment_option": {

"gracia": {

"uso": verdadero,

"en": 1,

"fuera": 1

},

"punch_in_time_range": {}

},

"punch_in_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"punch_out_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"time_segment_list": [

{

"pay_code": {

"id": 1,

"color": "#ff0000",

"count_as_attendance": verdadero,

"nombre": "Regular"

},

"punch_in_rounding": {},

"punch_out_rounding": {},

"start_time": 480,

"end_time": 1020,

"min_minutes": 240,

"timeInfo": {

"timeStartPosition": 33.333333333333,

"timeBar": 37.5,

"nextDayTimeStartPosition": 0,

"nextDayTimeBar": 0,

"timeDuration": "9 horas 0 minutos",

"timeDurationMinutes": 540

}

}

],

"break_time": {

"tipo": "NINGUNO",

"max_minutes": 0,

"start_time": 1260,

"end_time": 1290

},

"use_exception_handle": falso,

"meal_deduction_option": {

"lista": [

{

"uso": verdadero,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 240

},

"fixed_deduction": {

"start_time": 720,

"end_time": 780

}

},

{

"uso": false,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 480

},

"fixed_deduction": {

"start_time": 1080,

"end_time": 1140

}

}

],

"tipo": "BY_PUNCH"

},

"day_start_time_excess_time": {

"uso": false,

"prev_allowed_minutes": 0,

"next_allowed_minutes": 0

},

"start_time": 480,

"end_time": 1020

}

},

{

"nombre": "Turno 1",

"description": "Shift 1",

"id": 1,

"tipo": "FIJO",

"day_start_time": 300,

"first_in_last_out": verdadero,

"created_perm_id": 1,

"fixed_option": {

"regular_pay_time_segment_option": {

"gracia": {

"uso": verdadero,

"en": 1,

"fuera": 1

},

"punch_in_time_range": {}

},

"punch_in_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"punch_out_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"time_segment_list": [

{

"pay_code": {

"id": 1,

"color": "#ff0000",

"count_as_attendance": verdadero,

"nombre": "Regular"

},

"punch_in_rounding": {},

"punch_out_rounding": {},

"start_time": 480,

"end_time": 1020,

"min_minutes": 240,

"timeInfo": {

"timeStartPosition": 33.333333333333,

"timeBar": 37.5,

"nextDayTimeStartPosition": 0,

"nextDayTimeBar": 0,

"timeDuration": "9 horas 0 minutos",

"timeDurationMinutes": 540

}

}

],

"break_time": {

"tipo": "NINGUNO",

"max_minutes": 0,

"start_time": 1260,

"end_time": 1290

},

"use_exception_handle": falso,

"meal_deduction_option": {

"lista": [

{

"uso": verdadero,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 240

},

"fixed_deduction": {

"start_time": 720,

"end_time": 780

}

},

{

"uso": false,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 480

},

"fixed_deduction": {

"start_time": 1080,

"end_time": 1140

}

}

],

"tipo": "BY_PUNCH"

},

"day_start_time_excess_time": {

"uso": false,

"prev_allowed_minutes": 0,

"next_allowed_minutes": 0

},

"start_time": 480,

"end_time": 1020

}

},

{

"nombre": "Turno 1",

"description": "Shift 1",

"id": 1,

"tipo": "FIJO",

"day_start_time": 300,

"first_in_last_out": verdadero,

"created_perm_id": 1,

"fixed_option": {

"regular_pay_time_segment_option": {

"gracia": {

"uso": verdadero,

"en": 1,

"fuera": 1

},

"punch_in_time_range": {}

},

"punch_in_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"punch_out_rounding": {

"uso": false,

"unidad": 0,

"punto": 0

},

"time_segment_list": [

{

"pay_code": {

"id": 1,

"color": "#ff0000",

"count_as_attendance": verdadero,

"nombre": "Regular"

},

"punch_in_rounding": {},

"punch_out_rounding": {},

"start_time": 480,

"end_time": 1020,

"min_minutes": 240,

"timeInfo": {

"timeStartPosition": 33.333333333333,

"timeBar": 37.5,

"nextDayTimeStartPosition": 0,

"nextDayTimeBar": 0,

"timeDuration": "9 horas 0 minutos",

"timeDurationMinutes": 540

}

}

],

"break_time": {

"tipo": "NINGUNO",

"max_minutes": 0,

"start_time": 1260,

"end_time": 1290

},

"use_exception_handle": falso,

"meal_deduction_option": {

"lista": [

{

"uso": verdadero,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 240

},

"fixed_deduction": {

"start_time": 720,

"end_time": 780

}

},

{

"uso": false,

"auto_deduction": {

"deduction_time": 60,

"min_time_before_deduction": 480

},

"fixed_deduction": {

"start_time": 1080,

"end_time": 1140

}

}

],

"tipo": "BY_PUNCH"

},

"day_start_time_excess_time": {

"uso": false,

"prev_allowed_minutes": 0,

"next_allowed_minutes": 0

},

"start_time": 480,

"end_time": 1020

}

},

{},

{}

],

"tipo": "SEMANAL"

}

 

[Respuesta: exitosa]

{

"id": 3,

"message": "Creado correctamente",

"message_key": "CREADO",

"idioma": "en",

"status_code": "CREADO"

}

 

Interfaz gráfica de usuario, aplicación

Descripción generada automáticamente

 

 

 

Parte 2. Crear plantillas de Horarios a través de POSTMAN

텍스트, 스크린샷, 모니터, 실내이(가) 표시된 사진

자동 생성된 설명

텍스트, 스크린샷, 모니터, 화면이(가) 표시된 사진

자동 생성된 설명