merge with branchBug

This commit is contained in:
Eudes Inácio
2021-09-29 17:10:18 +01:00
24 changed files with 1329 additions and 735 deletions
+7 -10
View File
@@ -85,21 +85,17 @@ class SynchroService {
//if(!this._connected) {
if(!this._connected === true) {
this.BackgroundService.online()
console.log('Online',this._connected)
this.callBacks.forEach((e)=>{
if(e.type == 'Online') {
e.funx()
}
})
//}
}
console.log('open ======================= welcome to socket server')
this.eventtrigger.publishSomeData({
internet: "online"
})
this._connected = true
@@ -182,17 +178,18 @@ class SynchroService {
// event.code is usually 1006 in this case
console.log('[close] Connection died');
console.log('Reconnect')
// if(this._connected){
if(this._connected === false){
this.BackgroundService.offline();
console.log('Offline',this._connected)
this.callBacks.forEach((e)=>{
if(e.type == 'Offline') {
e.funx()
}
})
//}
}
// status
+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 = [];