Gabinete digital offline complete

This commit is contained in:
Eudes Inácio
2021-09-29 16:47:58 +01:00
parent b59070f35e
commit 0b42dba6ca
25 changed files with 1324 additions and 746 deletions
+39 -1
View File
@@ -94,7 +94,8 @@ export class SqliteService {
workflowID INTERGER,
workflowInstanceDataFields Text,
workflowInstanceID INTERGER,
workflowName varchar(255)
workflowName varchar(255),
interveners Text
)`, [])
.then((res) => {
console.log("Sucess AllProcess Table created: ", res)
@@ -168,6 +169,13 @@ export class SqliteService {
console.log("process attachment updated")
})
}
//updateAttachment
updateProcessInterveners(id, interveners,) {
let data = [document];
return this.dbInstance.executeSql(`UPDATE ${this.allprocess} SET interveners = ? WHERE serialNumber = ${id}`, [interveners]).then(() => {
console.log("process interveners updated")
})
}
//getAllEvents
getAllEvents() {
var hashattachment = false;
@@ -264,6 +272,21 @@ export class SqliteService {
});
}
//getDespachosProcess
getDespachosProcess(process) {
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE activityInstanceName = ?`, [process]).then((res) => {
this.ALLPROCESS = [];
if (res.rows.length > 0) {
for (var i = 0; i < res.rows.length; i++) {
this.ALLPROCESS.push(res.rows.item(i));
}
return this.ALLPROCESS;
}
}, (e) => {
console.log(" Get all process error", JSON.stringify(e));
});
}
//getprocessByworkflow
getprocessByworkflow(process) {
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE workflowDisplayName = ? `, [process]).then((res) => {
@@ -279,6 +302,21 @@ export class SqliteService {
});
}
//getprocessByworkflowpedido
getprocessByworkflowpedido(process, process2) {
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE workflowDisplayName = ? OR workflowDisplayName = ? `, [process, process2]).then((res) => {
this.ALLPROCESS = [];
if (res.rows.length > 0) {
for (var i = 0; i < res.rows.length; i++) {
this.ALLPROCESS.push(res.rows.item(i));
}
return this.ALLPROCESS;
}
}, (e) => {
console.log(" Get all process error", JSON.stringify(e));
});
}
getProcessById(serial) {
return this.dbInstance.executeSql(`SELECT * FROM ${this.allprocess} WHERE serialNumber = ? `, [serial]).then((res) => {
this.PROCESS = [];