Añadir notificación de sincronización y backup de nitrógeno.
This commit is contained in:
@@ -754,6 +754,7 @@ server <- function(input, output) {
|
|||||||
sqlFetch(dta, "NITROGEN"),
|
sqlFetch(dta, "NITROGEN"),
|
||||||
file=paste0(NitroRoute, format(Sys.time(), format="%Y%m%d"),"-","UM-Nitrogen.xlsx")
|
file=paste0(NitroRoute, format(Sys.time(), format="%Y%m%d"),"-","UM-Nitrogen.xlsx")
|
||||||
)
|
)
|
||||||
|
print("Backup Creado.")
|
||||||
|
|
||||||
table<-read.xlsx(paste0(gsub("/BU_NITRO/", "", NitroRoute),"/Nitrogen_ICO.xlsx"))
|
table<-read.xlsx(paste0(gsub("/BU_NITRO/", "", NitroRoute),"/Nitrogen_ICO.xlsx"))
|
||||||
|
|
||||||
@@ -784,6 +785,7 @@ server <- function(input, output) {
|
|||||||
|
|
||||||
sqlDrop(dta, "NITROGEN")
|
sqlDrop(dta, "NITROGEN")
|
||||||
sqlSave(dta, table.um %>% select(-FECHA) %>% filter(!is.na(CODIGO)), tablename="NITROGEN", rownames=F)
|
sqlSave(dta, table.um %>% select(-FECHA) %>% filter(!is.na(CODIGO)), tablename="NITROGEN", rownames=F)
|
||||||
|
print("Tabla Actualizada.")
|
||||||
}
|
}
|
||||||
if (input$dbtype == "OV"){
|
if (input$dbtype == "OV"){
|
||||||
## Copia de backup
|
## Copia de backup
|
||||||
@@ -797,6 +799,7 @@ server <- function(input, output) {
|
|||||||
sqlFetch(dta, "NITROGEN"),
|
sqlFetch(dta, "NITROGEN"),
|
||||||
file=paste0(NitroRoute, format(Sys.time(), format="%Y%m%d"),"-","OV-Nitrogen.xlsx")
|
file=paste0(NitroRoute, format(Sys.time(), format="%Y%m%d"),"-","OV-Nitrogen.xlsx")
|
||||||
)
|
)
|
||||||
|
print("Backup Creado.")
|
||||||
|
|
||||||
## Lectura del excel
|
## Lectura del excel
|
||||||
table<-read.xlsx(paste0(gsub("/BU_NITRO/", "", NitroRoute),"/Nitrogen_ICO.xlsx"))
|
table<-read.xlsx(paste0(gsub("/BU_NITRO/", "", NitroRoute),"/Nitrogen_ICO.xlsx"))
|
||||||
@@ -822,6 +825,7 @@ server <- function(input, output) {
|
|||||||
|
|
||||||
sqlDrop(dta, "NITROGEN")
|
sqlDrop(dta, "NITROGEN")
|
||||||
sqlSave(dta, table.ov, tablename="NITROGEN", rownames=F)
|
sqlSave(dta, table.ov, tablename="NITROGEN", rownames=F)
|
||||||
|
print("Tabla Actualizada.")
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user