Built motion from commit 9d5c653a.|2.5.44
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index f53e6c8..abe24d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9b4=['`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetVoiceQueueHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','util','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','then','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','CmHopperHistory','create','body','options','raw','CreateCmHopperHistory','AvgHandleTime','findAll','where','sequelize','COUNT','col','predictiveIntervalTotalCalls','literal','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay'];(function(_0xd0b415,_0x149675){var _0x2bdf2c=function(_0x59fbfa){while(--_0x59fbfa){_0xd0b415['push'](_0xd0b415['shift']());}};_0x2bdf2c(++_0x149675);}(_0xd9b4,0x1f0));var _0x4d9b=function(_0x5d71b0,_0x2f8911){_0x5d71b0=_0x5d71b0-0x0;var _0x483033=_0xd9b4[_0x5d71b0];return _0x483033;};'use strict';var _=require(_0x4d9b('0x0'));var util=require(_0x4d9b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4d9b('0x2'));var db=require(_0x4d9b('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x4d9b('0x4'))(_0x4d9b('0x5'));var config=require(_0x4d9b('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x4d9b('0x7')][_0x4d9b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x472c89,_0x2afeb9,_0x57b437){return new BPromise(function(_0x436af7,_0x3b05cc){return client['request'](_0x472c89,_0x57b437)[_0x4d9b('0x9')](function(_0x2a0c39){logger['info'](_0x4d9b('0xa'),_0x2afeb9,_0x4d9b('0xb'));logger[_0x4d9b('0xc')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x2afeb9,'request\x20sent',JSON[_0x4d9b('0xd')](_0x2a0c39));if(_0x2a0c39[_0x4d9b('0xe')]){if(_0x2a0c39['error']['code']===0x1f4){logger[_0x4d9b('0xe')]('CmHopperHistory,\x20%s,\x20%s',_0x2afeb9,_0x2a0c39[_0x4d9b('0xe')][_0x4d9b('0xf')]);return _0x3b05cc(_0x2a0c39[_0x4d9b('0xe')][_0x4d9b('0xf')]);}logger[_0x4d9b('0xe')]('CmHopperHistory,\x20%s,\x20%s',_0x2afeb9,_0x2a0c39[_0x4d9b('0xe')]['message']);return _0x436af7(_0x2a0c39['error']['message']);}else{logger[_0x4d9b('0x10')](_0x4d9b('0xa'),_0x2afeb9,'request\x20sent');_0x436af7(_0x2a0c39[_0x4d9b('0x11')][_0x4d9b('0xf')]);}})[_0x4d9b('0x12')](function(_0x5e9caf){logger[_0x4d9b('0xe')](_0x4d9b('0xa'),_0x2afeb9,_0x5e9caf);_0x3b05cc(_0x5e9caf);});});}exports['CreateCmHopperHistory']=function(_0x194648){var _0x5d4bd7=this;return new Promise(function(_0x445083,_0x31c3f7){return db[_0x4d9b('0x13')][_0x4d9b('0x14')](_0x194648[_0x4d9b('0x15')],{'raw':_0x194648[_0x4d9b('0x16')]?_0x194648['options'][_0x4d9b('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x3a1da6){logger[_0x4d9b('0x10')]('CreateCmHopperHistory',_0x194648);logger[_0x4d9b('0xc')]('CreateCmHopperHistory',_0x194648,JSON[_0x4d9b('0xd')](_0x3a1da6));_0x445083(_0x3a1da6);})[_0x4d9b('0x12')](function(_0x114e4e){logger[_0x4d9b('0xe')](_0x4d9b('0x18'),_0x114e4e[_0x4d9b('0xf')],_0x194648);_0x31c3f7(_0x5d4bd7[_0x4d9b('0xe')](0x1f4,_0x114e4e['message']));});});};exports[_0x4d9b('0x19')]=function(_0x5528c2){var _0x3e897a=this;return new Promise(function(_0x579bf2,_0x3ec599){return db[_0x4d9b('0x13')][_0x4d9b('0x1a')]({'raw':_0x5528c2[_0x4d9b('0x16')]?_0x5528c2['options'][_0x4d9b('0x17')]===undefined?!![]:![]:!![],'where':_0x5528c2[_0x4d9b('0x16')]?_0x5528c2['options'][_0x4d9b('0x1b')]||null:null,'attributes':[[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')][_0x4d9b('0x1e')]('id')),_0x4d9b('0x1f')],[db['sequelize']['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')]['fn']('IF',db['sequelize'][_0x4d9b('0x20')]('`state`\x20=\x204,\x201,\x20null'))),_0x4d9b('0x21')],[db[_0x4d9b('0x1c')]['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db['sequelize']['literal'](_0x4d9b('0x22')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db['sequelize']['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x23')))),_0x4d9b('0x24')],[db['sequelize']['fn'](_0x4d9b('0x25'),db['sequelize']['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x26')))),_0x4d9b('0x27')],[db['sequelize']['fn']('AVG',db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')]['literal'](_0x4d9b('0x28')))),_0x4d9b('0x29')]]})['then'](function(_0x13647c){logger['info'](_0x4d9b('0x19'),_0x5528c2);logger[_0x4d9b('0xc')](_0x4d9b('0x19'),_0x5528c2,JSON[_0x4d9b('0xd')](_0x13647c));_0x579bf2(_0x13647c);})['catch'](function(_0x2aeeac){logger[_0x4d9b('0xe')](_0x4d9b('0x19'),_0x2aeeac[_0x4d9b('0xf')],_0x5528c2);_0x3ec599(_0x3e897a['error'](0x1f4,_0x2aeeac[_0x4d9b('0xf')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x434c65){var _0x58b09c=this;return new Promise(function(_0x4ec3a,_0x318cb7){return db[_0x4d9b('0x13')][_0x4d9b('0x1a')]({'raw':_0x434c65[_0x4d9b('0x16')]?_0x434c65[_0x4d9b('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x434c65['options']?_0x434c65[_0x4d9b('0x16')]['where']||null:null,'attributes':[[_0x4d9b('0x2a'),_0x4d9b('0x2b')],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')]['literal'](_0x4d9b('0x2c')))),'outboundNoSuchCallsDay'],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')]('`state`\x20=\x203,\x201,\x20null'))),_0x4d9b('0x2d')],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db['sequelize']['fn']('IF',db[_0x4d9b('0x1c')]['literal'](_0x4d9b('0x2e')))),_0x4d9b('0x2f')],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db['sequelize']['fn']('IF',db['sequelize'][_0x4d9b('0x20')](_0x4d9b('0x30')))),'outboundBusyCallsDay'],[db['sequelize']['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x31')))),_0x4d9b('0x32')],[db[_0x4d9b('0x1c')]['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x33')))),_0x4d9b('0x34')],[db[_0x4d9b('0x1c')]['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db['sequelize'][_0x4d9b('0x20')](_0x4d9b('0x35')))),'outboundDropCallsDayCallersExit'],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x36')))),_0x4d9b('0x37')],[db['sequelize']['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')]['fn']('IF',db['sequelize'][_0x4d9b('0x20')](_0x4d9b('0x38')))),'outboundBlacklistCallsDay'],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x39')))),_0x4d9b('0x3a')],[db['sequelize']['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')]('`state`\x20=\x2018,\x201,\x20null'))),_0x4d9b('0x3b')],[db[_0x4d9b('0x1c')]['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db['sequelize'][_0x4d9b('0x20')](_0x4d9b('0x3c')))),_0x4d9b('0x3d')],[db[_0x4d9b('0x1c')]['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x3e')))),'outboundRejectCallsDay'],[db[_0x4d9b('0x1c')]['fn'](_0x4d9b('0x1d'),db['sequelize']['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x3f')))),'outboundReCallsDay']],'group':[_0x4d9b('0x2a')]})[_0x4d9b('0x9')](function(_0x479ac6){logger[_0x4d9b('0x10')]('GetVoiceQueueHopperHistory',_0x434c65);logger[_0x4d9b('0xc')](_0x4d9b('0x40'),_0x434c65,JSON['stringify'](_0x479ac6));_0x4ec3a(_0x479ac6);})['catch'](function(_0x2e3615){logger[_0x4d9b('0xe')](_0x4d9b('0x40'),_0x2e3615[_0x4d9b('0xf')],_0x434c65);_0x318cb7(_0x58b09c[_0x4d9b('0xe')](0x1f4,_0x2e3615['message']));});});};exports['GetCampaignHopperHistory']=function(_0x3e5d95){var _0x344ee9=this;return new Promise(function(_0x5f04e6,_0x10b1e6){return db[_0x4d9b('0x13')][_0x4d9b('0x1a')]({'raw':_0x3e5d95[_0x4d9b('0x16')]?_0x3e5d95[_0x4d9b('0x16')][_0x4d9b('0x17')]===undefined?!![]:![]:!![],'where':_0x3e5d95[_0x4d9b('0x16')]?_0x3e5d95[_0x4d9b('0x16')]['where']||null:null,'attributes':[[_0x4d9b('0x2a'),_0x4d9b('0x2b')],[db['sequelize']['fn']('COUNT',db[_0x4d9b('0x1c')]['col']('id')),_0x4d9b('0x41')],[db[_0x4d9b('0x1c')]['fn']('COUNT',db[_0x4d9b('0x1c')]['fn']('IF',db[_0x4d9b('0x1c')][_0x4d9b('0x20')](_0x4d9b('0x2e')))),_0x4d9b('0x42')]],'group':[_0x4d9b('0x2a')]})['then'](function(_0x21b3fb){logger['info'](_0x4d9b('0x43'),_0x3e5d95);logger[_0x4d9b('0xc')](_0x4d9b('0x43'),_0x3e5d95,JSON[_0x4d9b('0xd')](_0x21b3fb));_0x5f04e6(_0x21b3fb);})[_0x4d9b('0x12')](function(_0x58bc0a){logger['error'](_0x4d9b('0x43'),_0x58bc0a[_0x4d9b('0xf')],_0x3e5d95);_0x10b1e6(_0x344ee9[_0x4d9b('0xe')](0x1f4,_0x58bc0a[_0x4d9b('0xf')]));});});};
\ No newline at end of file
+var _0xd404=['name','ivrAnswerCallsDay','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CmHopperHistory','body','options','raw','CreateCmHopperHistory','AvgHandleTime','findAll','where','sequelize','COUNT','col','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','literal','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','`state`\x20=\x204,\x20`holdtime`,\x20null','AVG','predictiveIntervalAvgTalktime','campaign','`state`\x20=\x200,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','then','GetVoiceQueueHopperHistory','GetCampaignHopperHistory'];(function(_0x975e61,_0x4815e2){var _0x4295c0=function(_0x58584b){while(--_0x58584b){_0x975e61['push'](_0x975e61['shift']());}};_0x4295c0(++_0x4815e2);}(_0xd404,0x15b));var _0x4d40=function(_0x4d3c3b,_0xd4e4ee){_0x4d3c3b=_0x4d3c3b-0x0;var _0x3983aa=_0xd404[_0x4d3c3b];return _0x3983aa;};'use strict';var _=require(_0x4d40('0x0'));var util=require(_0x4d40('0x1'));var moment=require('moment');var BPromise=require(_0x4d40('0x2'));var rs=require(_0x4d40('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4d40('0x4'))['db'];var utils=require(_0x4d40('0x5'));var logger=require(_0x4d40('0x6'))(_0x4d40('0x7'));var config=require(_0x4d40('0x8'));var jayson=require(_0x4d40('0x9'));var client=jayson[_0x4d40('0xa')][_0x4d40('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2e4bd8,_0x4a635e,_0x292180){return new BPromise(function(_0x116941,_0x5a23a2){return client[_0x4d40('0xc')](_0x2e4bd8,_0x292180)['then'](function(_0x5aeb91){logger[_0x4d40('0xd')](_0x4d40('0xe'),_0x4a635e,_0x4d40('0xf'));logger[_0x4d40('0x10')](_0x4d40('0x11'),_0x4a635e,_0x4d40('0xf'),JSON[_0x4d40('0x12')](_0x5aeb91));if(_0x5aeb91[_0x4d40('0x13')]){if(_0x5aeb91[_0x4d40('0x13')][_0x4d40('0x14')]===0x1f4){logger[_0x4d40('0x13')](_0x4d40('0xe'),_0x4a635e,_0x5aeb91[_0x4d40('0x13')][_0x4d40('0x15')]);return _0x5a23a2(_0x5aeb91['error'][_0x4d40('0x15')]);}logger[_0x4d40('0x13')](_0x4d40('0xe'),_0x4a635e,_0x5aeb91[_0x4d40('0x13')][_0x4d40('0x15')]);return _0x116941(_0x5aeb91['error'][_0x4d40('0x15')]);}else{logger[_0x4d40('0xd')](_0x4d40('0xe'),_0x4a635e,_0x4d40('0xf'));_0x116941(_0x5aeb91[_0x4d40('0x16')][_0x4d40('0x15')]);}})[_0x4d40('0x17')](function(_0x43c902){logger[_0x4d40('0x13')]('CmHopperHistory,\x20%s,\x20%s',_0x4a635e,_0x43c902);_0x5a23a2(_0x43c902);});});}exports['CreateCmHopperHistory']=function(_0x1ae5c7){var _0x1c0cd8=this;return new Promise(function(_0x4e505f,_0x23b8fd){return db[_0x4d40('0x18')]['create'](_0x1ae5c7[_0x4d40('0x19')],{'raw':_0x1ae5c7['options']?_0x1ae5c7[_0x4d40('0x1a')][_0x4d40('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x57c997){logger[_0x4d40('0xd')](_0x4d40('0x1c'),_0x1ae5c7);logger['debug'](_0x4d40('0x1c'),_0x1ae5c7,JSON[_0x4d40('0x12')](_0x57c997));_0x4e505f(_0x57c997);})[_0x4d40('0x17')](function(_0x5d4c24){logger[_0x4d40('0x13')](_0x4d40('0x1c'),_0x5d4c24[_0x4d40('0x15')],_0x1ae5c7);_0x23b8fd(_0x1c0cd8['error'](0x1f4,_0x5d4c24['message']));});});};exports[_0x4d40('0x1d')]=function(_0x90b652){var _0x1285f6=this;return new Promise(function(_0x470411,_0x4677c9){return db['CmHopperHistory'][_0x4d40('0x1e')]({'raw':_0x90b652[_0x4d40('0x1a')]?_0x90b652['options']['raw']===undefined?!![]:![]:!![],'where':_0x90b652[_0x4d40('0x1a')]?_0x90b652[_0x4d40('0x1a')][_0x4d40('0x1f')]||null:null,'attributes':[[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')][_0x4d40('0x22')]('id')),_0x4d40('0x23')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x204,\x201,\x20null'))),_0x4d40('0x24')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db['sequelize'][_0x4d40('0x25')](_0x4d40('0x26')))),_0x4d40('0x27')],[db['sequelize']['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')](_0x4d40('0x28')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x4d40('0x20')]['fn']('AVG',db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')](_0x4d40('0x29')))),'predictiveIntervalAvgHoldtime'],[db['sequelize']['fn'](_0x4d40('0x2a'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x4d40('0x2b')]]})['then'](function(_0x2fde16){logger[_0x4d40('0xd')](_0x4d40('0x1d'),_0x90b652);logger[_0x4d40('0x10')](_0x4d40('0x1d'),_0x90b652,JSON[_0x4d40('0x12')](_0x2fde16));_0x470411(_0x2fde16);})[_0x4d40('0x17')](function(_0x10306b){logger[_0x4d40('0x13')](_0x4d40('0x1d'),_0x10306b['message'],_0x90b652);_0x4677c9(_0x1285f6[_0x4d40('0x13')](0x1f4,_0x10306b[_0x4d40('0x15')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x5bad1c){var _0x5087e1=this;return new Promise(function(_0x246b9f,_0xcb42f6){return db['CmHopperHistory'][_0x4d40('0x1e')]({'raw':_0x5bad1c[_0x4d40('0x1a')]?_0x5bad1c[_0x4d40('0x1a')][_0x4d40('0x1b')]===undefined?!![]:![]:!![],'where':_0x5bad1c[_0x4d40('0x1a')]?_0x5bad1c['options'][_0x4d40('0x1f')]||null:null,'attributes':[[_0x4d40('0x2c'),'name'],[db['sequelize']['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db['sequelize'][_0x4d40('0x25')](_0x4d40('0x2d')))),'outboundNoSuchCallsDay'],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db['sequelize']['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')]('`state`\x20=\x203,\x201,\x20null'))),_0x4d40('0x2e')],[db['sequelize']['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')](_0x4d40('0x2f')))),_0x4d40('0x30')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db['sequelize'][_0x4d40('0x25')](_0x4d40('0x31')))),_0x4d40('0x32')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db['sequelize']['fn']('IF',db[_0x4d40('0x20')]['literal'](_0x4d40('0x33')))),_0x4d40('0x34')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db['sequelize']['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x4d40('0x35')],[db['sequelize']['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x4d40('0x36')],[db['sequelize']['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')]('`state`\x20=\x2012,\x201,\x20null'))),_0x4d40('0x37')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db['sequelize'][_0x4d40('0x25')](_0x4d40('0x38')))),'outboundBlacklistCallsDay'],[db[_0x4d40('0x20')]['fn']('COUNT',db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')](_0x4d40('0x39')))),_0x4d40('0x3a')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')]['literal'](_0x4d40('0x3b')))),_0x4d40('0x3c')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db['sequelize'][_0x4d40('0x25')](_0x4d40('0x3d')))),'outboundAnswerAgiCallsDay'],[db[_0x4d40('0x20')]['fn']('COUNT',db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')][_0x4d40('0x25')]('`state`\x20=\x2020,\x201,\x20null'))),_0x4d40('0x3c')],[db[_0x4d40('0x20')]['fn'](_0x4d40('0x21'),db[_0x4d40('0x20')]['fn']('IF',db[_0x4d40('0x20')]['literal'](_0x4d40('0x3e')))),_0x4d40('0x3f')]],'group':['campaign']})[_0x4d40('0x40')](function(_0x584552){logger[_0x4d40('0xd')]('GetVoiceQueueHopperHistory',_0x5bad1c);logger[_0x4d40('0x10')](_0x4d40('0x41'),_0x5bad1c,JSON['stringify'](_0x584552));_0x246b9f(_0x584552);})[_0x4d40('0x17')](function(_0x1c930d){logger[_0x4d40('0x13')](_0x4d40('0x41'),_0x1c930d[_0x4d40('0x15')],_0x5bad1c);_0xcb42f6(_0x5087e1[_0x4d40('0x13')](0x1f4,_0x1c930d[_0x4d40('0x15')]));});});};exports[_0x4d40('0x42')]=function(_0x25e42e){var _0x217a94=this;return new Promise(function(_0x36ed10,_0x15636a){return db[_0x4d40('0x18')][_0x4d40('0x1e')]({'raw':_0x25e42e[_0x4d40('0x1a')]?_0x25e42e[_0x4d40('0x1a')][_0x4d40('0x1b')]===undefined?!![]:![]:!![],'where':_0x25e42e[_0x4d40('0x1a')]?_0x25e42e[_0x4d40('0x1a')]['where']||null:null,'attributes':[[_0x4d40('0x2c'),_0x4d40('0x43')],[db['sequelize']['fn']('COUNT',db[_0x4d40('0x20')][_0x4d40('0x22')]('id')),'ivrTotalCallsDays'],[db['sequelize']['fn'](_0x4d40('0x21'),db['sequelize']['fn']('IF',db[_0x4d40('0x20')]['literal'](_0x4d40('0x2f')))),_0x4d40('0x44')]],'group':[_0x4d40('0x2c')]})[_0x4d40('0x40')](function(_0x3fdd8d){logger['info']('GetCampaignHopperHistory',_0x25e42e);logger['debug'](_0x4d40('0x42'),_0x25e42e,JSON[_0x4d40('0x12')](_0x3fdd8d));_0x36ed10(_0x3fdd8d);})[_0x4d40('0x17')](function(_0x21a798){logger[_0x4d40('0x13')]('GetCampaignHopperHistory',_0x21a798[_0x4d40('0x15')],_0x25e42e);_0x15636a(_0x217a94['error'](0x1f4,_0x21a798[_0x4d40('0x15')]));});});};
\ No newline at end of file