Built motion from commit 9efc8423.|2.6.31
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index ca1ab31..e6fcb40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f31=['client','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','create','body','CreateCmHopperHistory','AvgHandleTime','CmHopperHistory','findAll','options','raw','where','COUNT','col','predictiveIntervalTotalCalls','sequelize','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`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','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2012,\x201,\x20null','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x564256,_0x56e661){var _0x4ae919=function(_0x4dc826){while(--_0x4dc826){_0x564256['push'](_0x564256['shift']());}};_0x4ae919(++_0x56e661);}(_0x1f31,0xca));var _0x11f3=function(_0x57f100,_0xa53aca){_0x57f100=_0x57f100-0x0;var _0x4cac01=_0x1f31[_0x57f100];return _0x4cac01;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x11f3('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x11f3('0x1'));var logger=require(_0x11f3('0x2'))(_0x11f3('0x3'));var config=require(_0x11f3('0x4'));var jayson=require('jayson/promise');var client=jayson[_0x11f3('0x5')][_0x11f3('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x458ef4,_0x3293db,_0x1a4ffc){return new BPromise(function(_0x3c5042,_0x11d1c9){return client[_0x11f3('0x7')](_0x458ef4,_0x1a4ffc)[_0x11f3('0x8')](function(_0x3d235b){logger[_0x11f3('0x9')](_0x11f3('0xa'),_0x3293db,_0x11f3('0xb'));logger[_0x11f3('0xc')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x3293db,_0x11f3('0xb'),JSON[_0x11f3('0xd')](_0x3d235b));if(_0x3d235b[_0x11f3('0xe')]){if(_0x3d235b['error'][_0x11f3('0xf')]===0x1f4){logger[_0x11f3('0xe')](_0x11f3('0xa'),_0x3293db,_0x3d235b['error'][_0x11f3('0x10')]);return _0x11d1c9(_0x3d235b[_0x11f3('0xe')][_0x11f3('0x10')]);}logger[_0x11f3('0xe')](_0x11f3('0xa'),_0x3293db,_0x3d235b[_0x11f3('0xe')][_0x11f3('0x10')]);return _0x3c5042(_0x3d235b[_0x11f3('0xe')][_0x11f3('0x10')]);}else{logger['info'](_0x11f3('0xa'),_0x3293db,'request\x20sent');_0x3c5042(_0x3d235b[_0x11f3('0x11')]['message']);}})[_0x11f3('0x12')](function(_0x519098){logger[_0x11f3('0xe')](_0x11f3('0xa'),_0x3293db,_0x519098);_0x11d1c9(_0x519098);});});}exports['CreateCmHopperHistory']=function(_0x43b7dc){var _0x1ffa81=this;return new Promise(function(_0x2e3a02,_0x526d15){return db['CmHopperHistory'][_0x11f3('0x13')](_0x43b7dc[_0x11f3('0x14')],{'raw':_0x43b7dc['options']?_0x43b7dc['options']['raw']===undefined?!![]:![]:!![]})[_0x11f3('0x8')](function(_0x21b7be){logger[_0x11f3('0x9')](_0x11f3('0x15'),_0x43b7dc);logger[_0x11f3('0xc')](_0x11f3('0x15'),_0x43b7dc,JSON[_0x11f3('0xd')](_0x21b7be));_0x2e3a02(_0x21b7be);})[_0x11f3('0x12')](function(_0x58e3dd){logger[_0x11f3('0xe')](_0x11f3('0x15'),_0x58e3dd[_0x11f3('0x10')],_0x43b7dc);_0x526d15(_0x1ffa81[_0x11f3('0xe')](0x1f4,_0x58e3dd[_0x11f3('0x10')]));});});};exports[_0x11f3('0x16')]=function(_0x3a3aa8){var _0x33831f=this;return new Promise(function(_0x4a558d,_0x48d575){return db[_0x11f3('0x17')][_0x11f3('0x18')]({'raw':_0x3a3aa8[_0x11f3('0x19')]?_0x3a3aa8[_0x11f3('0x19')][_0x11f3('0x1a')]===undefined?!![]:![]:!![],'where':_0x3a3aa8['options']?_0x3a3aa8[_0x11f3('0x19')][_0x11f3('0x1b')]||null:null,'attributes':[[db['sequelize']['fn'](_0x11f3('0x1c'),db['sequelize'][_0x11f3('0x1d')]('id')),_0x11f3('0x1e')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x21')))),_0x11f3('0x22')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db['sequelize']['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x23')))),_0x11f3('0x24')],[db['sequelize']['fn'](_0x11f3('0x1c'),db['sequelize']['fn']('IF',db['sequelize'][_0x11f3('0x20')](_0x11f3('0x25')))),_0x11f3('0x26')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x27'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')]['literal'](_0x11f3('0x28')))),_0x11f3('0x29')],[db[_0x11f3('0x1f')]['fn']('AVG',db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')]['literal'](_0x11f3('0x2a')))),_0x11f3('0x2b')]]})[_0x11f3('0x8')](function(_0x544ab1){logger[_0x11f3('0x9')](_0x11f3('0x16'),_0x3a3aa8);logger[_0x11f3('0xc')](_0x11f3('0x16'),_0x3a3aa8,JSON[_0x11f3('0xd')](_0x544ab1));_0x4a558d(_0x544ab1);})[_0x11f3('0x12')](function(_0x24b960){logger[_0x11f3('0xe')]('AvgHandleTime',_0x24b960[_0x11f3('0x10')],_0x3a3aa8);_0x48d575(_0x33831f[_0x11f3('0xe')](0x1f4,_0x24b960[_0x11f3('0x10')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x16025b){var _0x2a7e1d=this;return new Promise(function(_0x3e3398,_0x16ef6e){return db[_0x11f3('0x17')]['findAll']({'raw':_0x16025b[_0x11f3('0x19')]?_0x16025b['options'][_0x11f3('0x1a')]===undefined?!![]:![]:!![],'where':_0x16025b[_0x11f3('0x19')]?_0x16025b[_0x11f3('0x19')][_0x11f3('0x1b')]||null:null,'attributes':[[_0x11f3('0x2c'),_0x11f3('0x2d')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db['sequelize'][_0x11f3('0x20')](_0x11f3('0x2e')))),_0x11f3('0x2f')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db['sequelize']['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x30')))),_0x11f3('0x31')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x21')))),'outboundAnswerCallsDay'],[db[_0x11f3('0x1f')]['fn']('COUNT',db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')]['literal']('`state`\x20=\x205,\x201,\x20null'))),_0x11f3('0x32')],[db['sequelize']['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db['sequelize'][_0x11f3('0x20')]('`state`\x20=\x208,\x201,\x20null'))),_0x11f3('0x33')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x34')))),_0x11f3('0x35')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')]['literal'](_0x11f3('0x36')))),'outboundDropCallsDayCallersExit'],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db['sequelize']['literal'](_0x11f3('0x37')))),'outboundUnknownCallsDay'],[db['sequelize']['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db['sequelize'][_0x11f3('0x20')](_0x11f3('0x38')))),_0x11f3('0x39')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db['sequelize']['fn']('IF',db['sequelize'][_0x11f3('0x20')]('`state`\x20=\x2014,\x201,\x20null'))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x3a')))),_0x11f3('0x3b')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x3c')))),_0x11f3('0x3d')],[db['sequelize']['fn'](_0x11f3('0x1c'),db['sequelize']['fn']('IF',db['sequelize'][_0x11f3('0x20')](_0x11f3('0x3e')))),'outboundRejectCallsDay'],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x3f')))),_0x11f3('0x40')]],'group':[_0x11f3('0x2c')]})[_0x11f3('0x8')](function(_0x154eeb){logger[_0x11f3('0x9')](_0x11f3('0x41'),_0x16025b);logger[_0x11f3('0xc')]('GetVoiceQueueHopperHistory',_0x16025b,JSON[_0x11f3('0xd')](_0x154eeb));_0x3e3398(_0x154eeb);})[_0x11f3('0x12')](function(_0x4f34b2){logger[_0x11f3('0xe')](_0x11f3('0x41'),_0x4f34b2[_0x11f3('0x10')],_0x16025b);_0x16ef6e(_0x2a7e1d['error'](0x1f4,_0x4f34b2['message']));});});};exports[_0x11f3('0x42')]=function(_0x30d16a){var _0x1ee536=this;return new Promise(function(_0x2c5f91,_0x5a6e49){return db[_0x11f3('0x17')][_0x11f3('0x18')]({'raw':_0x30d16a['options']?_0x30d16a[_0x11f3('0x19')][_0x11f3('0x1a')]===undefined?!![]:![]:!![],'where':_0x30d16a[_0x11f3('0x19')]?_0x30d16a[_0x11f3('0x19')][_0x11f3('0x1b')]||null:null,'attributes':[['campaign',_0x11f3('0x2d')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')][_0x11f3('0x1d')]('id')),_0x11f3('0x43')],[db[_0x11f3('0x1f')]['fn'](_0x11f3('0x1c'),db[_0x11f3('0x1f')]['fn']('IF',db[_0x11f3('0x1f')][_0x11f3('0x20')](_0x11f3('0x21')))),_0x11f3('0x44')]],'group':[_0x11f3('0x2c')]})[_0x11f3('0x8')](function(_0x28d5ed){logger['info'](_0x11f3('0x42'),_0x30d16a);logger['debug']('GetCampaignHopperHistory',_0x30d16a,JSON[_0x11f3('0xd')](_0x28d5ed));_0x2c5f91(_0x28d5ed);})[_0x11f3('0x12')](function(_0x476c56){logger[_0x11f3('0xe')](_0x11f3('0x42'),_0x476c56[_0x11f3('0x10')],_0x30d16a);_0x5a6e49(_0x1ee536[_0x11f3('0xe')](0x1f4,_0x476c56[_0x11f3('0x10')]));});});};
\ No newline at end of file
+var _0x6916=['`state`\x20=\x2018,\x201,\x20null','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetCampaignHopperHistory','name','ivrTotalCallsDays','ivrAnswerCallsDay','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','then','AvgHandleTime','where','sequelize','COUNT','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','catch','GetVoiceQueueHopperHistory','findAll','campaign','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay'];(function(_0x550d12,_0x5384bd){var _0x12103d=function(_0x2a9834){while(--_0x2a9834){_0x550d12['push'](_0x550d12['shift']());}};_0x12103d(++_0x5384bd);}(_0x6916,0x1ed));var _0x6691=function(_0x1340e6,_0x292ab0){_0x1340e6=_0x1340e6-0x0;var _0x39f395=_0x6916[_0x1340e6];return _0x39f395;};'use strict';var _=require('lodash');var util=require(_0x6691('0x0'));var moment=require(_0x6691('0x1'));var BPromise=require(_0x6691('0x2'));var rs=require(_0x6691('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6691('0x4'))['db'];var utils=require(_0x6691('0x5'));var logger=require(_0x6691('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6691('0x7'));var client=jayson[_0x6691('0x8')][_0x6691('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xf8ef8b,_0x37a4cf,_0x31335a){return new BPromise(function(_0xc39817,_0x2979ec){return client[_0x6691('0xa')](_0xf8ef8b,_0x31335a)['then'](function(_0x19cbd2){logger['info'](_0x6691('0xb'),_0x37a4cf,_0x6691('0xc'));logger[_0x6691('0xd')](_0x6691('0xe'),_0x37a4cf,'request\x20sent',JSON[_0x6691('0xf')](_0x19cbd2));if(_0x19cbd2[_0x6691('0x10')]){if(_0x19cbd2[_0x6691('0x10')][_0x6691('0x11')]===0x1f4){logger[_0x6691('0x10')](_0x6691('0xb'),_0x37a4cf,_0x19cbd2[_0x6691('0x10')]['message']);return _0x2979ec(_0x19cbd2[_0x6691('0x10')][_0x6691('0x12')]);}logger[_0x6691('0x10')](_0x6691('0xb'),_0x37a4cf,_0x19cbd2[_0x6691('0x10')][_0x6691('0x12')]);return _0xc39817(_0x19cbd2['error']['message']);}else{logger[_0x6691('0x13')](_0x6691('0xb'),_0x37a4cf,_0x6691('0xc'));_0xc39817(_0x19cbd2[_0x6691('0x14')][_0x6691('0x12')]);}})['catch'](function(_0x301c09){logger[_0x6691('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x37a4cf,_0x301c09);_0x2979ec(_0x301c09);});});}exports[_0x6691('0x15')]=function(_0x2d0bcb){var _0x56483c=this;return new Promise(function(_0x5f5651,_0x154c58){return db[_0x6691('0x16')][_0x6691('0x17')](_0x2d0bcb[_0x6691('0x18')],{'raw':_0x2d0bcb[_0x6691('0x19')]?_0x2d0bcb['options'][_0x6691('0x1a')]===undefined?!![]:![]:!![]})[_0x6691('0x1b')](function(_0x57620b){logger[_0x6691('0x13')](_0x6691('0x15'),_0x2d0bcb);logger[_0x6691('0xd')](_0x6691('0x15'),_0x2d0bcb,JSON[_0x6691('0xf')](_0x57620b));_0x5f5651(_0x57620b);})['catch'](function(_0x8080e4){logger[_0x6691('0x10')](_0x6691('0x15'),_0x8080e4[_0x6691('0x12')],_0x2d0bcb);_0x154c58(_0x56483c[_0x6691('0x10')](0x1f4,_0x8080e4[_0x6691('0x12')]));});});};exports[_0x6691('0x1c')]=function(_0x193b76){var _0x16d8f8=this;return new Promise(function(_0x54a4c3,_0x53120a){return db[_0x6691('0x16')]['findAll']({'raw':_0x193b76['options']?_0x193b76[_0x6691('0x19')][_0x6691('0x1a')]===undefined?!![]:![]:!![],'where':_0x193b76['options']?_0x193b76[_0x6691('0x19')][_0x6691('0x1d')]||null:null,'attributes':[[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')][_0x6691('0x20')]('id')),_0x6691('0x21')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x23')))),_0x6691('0x24')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x25')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')]('`state`\x20=\x2011,\x201,\x20null'))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x6691('0x1e')]['fn'](_0x6691('0x26'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x27')))),_0x6691('0x28')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x26'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x29')))),_0x6691('0x2a')]]})[_0x6691('0x1b')](function(_0x528282){logger[_0x6691('0x13')](_0x6691('0x1c'),_0x193b76);logger['debug']('AvgHandleTime',_0x193b76,JSON[_0x6691('0xf')](_0x528282));_0x54a4c3(_0x528282);})[_0x6691('0x2b')](function(_0x385c37){logger[_0x6691('0x10')](_0x6691('0x1c'),_0x385c37['message'],_0x193b76);_0x53120a(_0x16d8f8[_0x6691('0x10')](0x1f4,_0x385c37['message']));});});};exports[_0x6691('0x2c')]=function(_0x454641){var _0x57c0a7=this;return new Promise(function(_0x4d0b69,_0x5257e0){return db[_0x6691('0x16')][_0x6691('0x2d')]({'raw':_0x454641['options']?_0x454641[_0x6691('0x19')][_0x6691('0x1a')]===undefined?!![]:![]:!![],'where':_0x454641[_0x6691('0x19')]?_0x454641[_0x6691('0x19')]['where']||null:null,'attributes':[[_0x6691('0x2e'),'name'],[db['sequelize']['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x2f')))),_0x6691('0x30')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['fn']('IF',db['sequelize'][_0x6691('0x22')]('`state`\x20=\x203,\x201,\x20null'))),_0x6691('0x31')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db[_0x6691('0x1e')]['literal'](_0x6691('0x23')))),_0x6691('0x32')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x33')))),'outboundBusyCallsDay'],[db[_0x6691('0x1e')]['fn']('COUNT',db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')]['literal'](_0x6691('0x34')))),'outboundCongestionCallsDay'],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x6691('0x35')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x6691('0x36')],[db['sequelize']['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db['sequelize'][_0x6691('0x22')](_0x6691('0x37')))),'outboundUnknownCallsDay'],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db['sequelize'][_0x6691('0x22')](_0x6691('0x38')))),_0x6691('0x39')],[db['sequelize']['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')]('`state`\x20=\x2014,\x201,\x20null'))),_0x6691('0x3a')],[db['sequelize']['fn']('COUNT',db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x3b')))),'outboundRejectCallsDay'],[db['sequelize']['fn'](_0x6691('0x1f'),db['sequelize']['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x3c')))),_0x6691('0x3d')],[db[_0x6691('0x1e')]['fn']('COUNT',db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x3e')))),_0x6691('0x3f')],[db['sequelize']['fn']('COUNT',db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x40')))),'outboundReCallsDay']],'group':[_0x6691('0x2e')]})[_0x6691('0x1b')](function(_0x148c16){logger[_0x6691('0x13')]('GetVoiceQueueHopperHistory',_0x454641);logger[_0x6691('0xd')](_0x6691('0x2c'),_0x454641,JSON[_0x6691('0xf')](_0x148c16));_0x4d0b69(_0x148c16);})['catch'](function(_0x168d86){logger[_0x6691('0x10')]('GetVoiceQueueHopperHistory',_0x168d86[_0x6691('0x12')],_0x454641);_0x5257e0(_0x57c0a7['error'](0x1f4,_0x168d86['message']));});});};exports[_0x6691('0x41')]=function(_0x2c7bb9){var _0x5d3069=this;return new Promise(function(_0x173658,_0x1c0b5a){return db['CmHopperHistory']['findAll']({'raw':_0x2c7bb9[_0x6691('0x19')]?_0x2c7bb9[_0x6691('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x2c7bb9[_0x6691('0x19')]?_0x2c7bb9[_0x6691('0x19')]['where']||null:null,'attributes':[[_0x6691('0x2e'),_0x6691('0x42')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['col']('id')),_0x6691('0x43')],[db[_0x6691('0x1e')]['fn'](_0x6691('0x1f'),db[_0x6691('0x1e')]['fn']('IF',db[_0x6691('0x1e')][_0x6691('0x22')](_0x6691('0x23')))),_0x6691('0x44')]],'group':[_0x6691('0x2e')]})[_0x6691('0x1b')](function(_0x2f2342){logger['info'](_0x6691('0x41'),_0x2c7bb9);logger[_0x6691('0xd')](_0x6691('0x41'),_0x2c7bb9,JSON[_0x6691('0xf')](_0x2f2342));_0x173658(_0x2f2342);})['catch'](function(_0x55c5f1){logger['error']('GetCampaignHopperHistory',_0x55c5f1[_0x6691('0x12')],_0x2c7bb9);_0x1c0b5a(_0x5d3069[_0x6691('0x10')](0x1f4,_0x55c5f1[_0x6691('0x12')]));});});};
\ No newline at end of file