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 modificar plantillas de Horarios

Las plantillas de Horarios de TA de BioStar 2 se pueden modificar mediante 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. Modificar plantillas de Horarios

 

[PUT]: /tna/schedule_templates/{schedule_template_ID}

[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'

 

*Puede utilizar los valores recuperados de GET /shifts en el 'Shift_list' de los parámetros.

* M – Obligatorio, O – Opcional

[Ejemplo de modelo de valor/parámetros]

{

"cycle_in_days": 7,

"weekend_index": "0,6",

"description": "Plantilla de Horarios 35",

"name": "Plantilla de Horarios 35",

"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]

{

"message": "Procesado correctamente",

"message_key": "EXITOSO",

"idioma": "en",

"status_code": "EXITOSO"

}

 

Antes de modificar el nombre y la descripción de la plantilla de Horarios

Interfaz gráfica de usuario, aplicación

Descripción generada automáticamente

Después de modificar el nombre y la descripción de la plantilla de Horarios

Interfaz gráfica de usuario, aplicación

Descripción generada automáticamente

 

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

Interfaz gráfica de usuario, aplicación

Descripción generada automáticamente