[éCow] Correctifs taureaux lignées

This commit is contained in:
2026-08-07 11:24:30 +02:00
parent 46f7294fc0
commit 108562c69b
4 changed files with 54 additions and 68 deletions
+10 -42
View File
@@ -61,6 +61,15 @@ get_cheptels_by_tech <- function(tech){
)
}
#' Suppression des données du jour
#' @param cheptel Numéro du cheptel
#' @param table Nom de la table dont on veut supprimer les données : VACHES, CAMPAGNES, TAUREAUX, LIGNEES
#' @return Nombre de lignes supprimées
delete_data_today <- function(cheptel, table){
url_delete_data <- paste0(server_path,"webresources/ecow/delete/",cheptel,"/",table)
delete_data <- http_get( url = url_delete_data)
}
#' Renvoie la liste des certificats zoo totaux (Vivants + semences + embryons)
#' @return Liste de cz
get_cztotaux <- function(){
@@ -132,49 +141,8 @@ get_params_ponderation <- function(num_cheptel){
dbDisconnect(con)
return(format_ponderation(data))
}
#######################################################################################################
###################### Rien a voir avec ecow - WS pedigree de Pauline #################################
fake <- function(){
library(httr)
library(jsonlite)
animalIds <- c("FR7122418163","FR7122406165", "FR7122363258", "FR7122234414", "FR0311285868", "FR7122363239", "FR7122363251", "FR7122380260", "FR7122380284", "FR7122363268")
body <- list(
animalsIds = animalIds,
#nbGenerations = 5,
voieFemelle = TRUE,
cheptel = "FR71499477"
)
response <- POST(
#url = "https://tomcat.herdbookcharolais.com/HbcSchedulerAndServices-2.0-SNAPSHOT/webresources/animals/getpedigreebyanimlist/",
url = "http://localhost:8080/HbcSchedulerAndServices/webresources/animals/getpedigreebyanimlist",
body = toJSON(body, auto_unbox = TRUE, null = "null"),
encode = "json"
)
animalIds <- c("FR0800761491","FR0800761869")
body <- list(
animalsIds = animalIds,
voieFemelle = TRUE,
cheptel = "FR08021009"
)
response <- POST(
#url = "https://tomcat.herdbookcharolais.com/HbcSchedulerAndServices-2.0-SNAPSHOT/webresources/animals/getfondatrices/",
url = "http://localhost:8080/HbcSchedulerAndServices/webresources/animals/getfondatrices",
body = toJSON(body, auto_unbox = TRUE, null = "null"),
encode = "json"
)
result <- content(response, "parsed", encoding = "UTF-8")
print(result)
}
########################################################################################################
########################################################################################################