changed datasource in employeeList service

This commit is contained in:
Daniel Herrero 2017-11-22 13:35:05 +01:00
parent ba73869fd3
commit aae137d35e
2 changed files with 15 additions and 15 deletions

View File

@ -23,10 +23,10 @@ module.exports = function(Client) {
Client.employeeList = function(callback) {
let query = `SELECT em.id, CASE em.surname WHEN NULL THEN em.name ELSE concat(em.name, " ", em.surname) END \`name\`
FROM Employee em
JOIN Account ac ON em.userFk = ac.id
JOIN RoleMapping rm on ac.id=rm.principalId
JOIN Role rl on rm.roleId = rl.id
FROM salix.Employee em
JOIN salix.Account ac ON em.userFk = ac.id
JOIN salix.RoleMapping rm on ac.id=rm.principalId
JOIN salix.Role rl on rm.roleId = rl.id
WHERE ac.active
and rl.\`name\`='employee'
ORDER BY em.name ASC`;

View File

@ -25,40 +25,40 @@
"dataSource": "salix"
},
"Ticket": {
"dataSource": "vn"
"dataSource": "salix"
},
"State":{
"dataSource": "vn"
"dataSource": "salix"
},
"TicketState":{
"dataSource": "vn"
"dataSource": "salix"
},
"Warehouse":{
"dataSource": "vn"
"dataSource": "salix"
},
"Employee":{
"dataSource": "vn"
"dataSource": "salix"
},
"Client":{
"dataSource": "client"
},
"Province":{
"dataSource": "vn"
"dataSource": "salix"
},
"Agency": {
"dataSource": "vn"
"dataSource": "salix"
},
"FakeProduction": {
"dataSource": "vn"
"dataSource": "salix"
},
"Message": {
"dataSource": "vn"
"dataSource": "salix"
},
"MessageInbox": {
"dataSource": "vn"
"dataSource": "salix"
},
"Route": {
"dataSource": "vn"
"dataSource": "salix"
}
}