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) { 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\` let query = `SELECT em.id, CASE em.surname WHEN NULL THEN em.name ELSE concat(em.name, " ", em.surname) END \`name\`
FROM Employee em FROM salix.Employee em
JOIN Account ac ON em.userFk = ac.id JOIN salix.Account ac ON em.userFk = ac.id
JOIN RoleMapping rm on ac.id=rm.principalId JOIN salix.RoleMapping rm on ac.id=rm.principalId
JOIN Role rl on rm.roleId = rl.id JOIN salix.Role rl on rm.roleId = rl.id
WHERE ac.active WHERE ac.active
and rl.\`name\`='employee' and rl.\`name\`='employee'
ORDER BY em.name ASC`; ORDER BY em.name ASC`;

View File

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