Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 598a38f..0e106b1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc10c=['`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','findAll','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateCmHopperHistory','CmHopperHistory','body','options','raw','AvgHandleTime','sequelize','col','predictiveIntervalTotalCalls','COUNT','literal','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','where','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','outboundRejectCallsDay','outboundAnswerAgiCallsDay'];(function(_0x237bf7,_0xb851fc){var _0x5928ba=function(_0x14c0d0){while(--_0x14c0d0){_0x237bf7['push'](_0x237bf7['shift']());}};_0x5928ba(++_0xb851fc);}(_0xc10c,0x8f));var _0xcc10=function(_0x5902dd,_0xcf5af){_0x5902dd=_0x5902dd-0x0;var _0x52ada1=_0xc10c[_0x5902dd];return _0x52ada1;};'use strict';var _=require(_0xcc10('0x0'));var util=require(_0xcc10('0x1'));var moment=require(_0xcc10('0x2'));var BPromise=require(_0xcc10('0x3'));var rs=require(_0xcc10('0x4'));var fs=require('fs');var Redis=require(_0xcc10('0x5'));var db=require(_0xcc10('0x6'))['db'];var utils=require(_0xcc10('0x7'));var logger=require(_0xcc10('0x8'))(_0xcc10('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xcc10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1152a6,_0x44e37c,_0x3fc9ce){return new BPromise(function(_0x1e91b5,_0x11dc9b){return client[_0xcc10('0xb')](_0x1152a6,_0x3fc9ce)[_0xcc10('0xc')](function(_0x44e16e){logger[_0xcc10('0xd')](_0xcc10('0xe'),_0x44e37c,_0xcc10('0xf'));logger[_0xcc10('0x10')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x44e37c,_0xcc10('0xf'),JSON[_0xcc10('0x11')](_0x44e16e));if(_0x44e16e[_0xcc10('0x12')]){if(_0x44e16e[_0xcc10('0x12')][_0xcc10('0x13')]===0x1f4){logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x44e37c,_0x44e16e[_0xcc10('0x12')][_0xcc10('0x14')]);return _0x11dc9b(_0x44e16e[_0xcc10('0x12')][_0xcc10('0x14')]);}logger[_0xcc10('0x12')](_0xcc10('0xe'),_0x44e37c,_0x44e16e[_0xcc10('0x12')]['message']);return _0x1e91b5(_0x44e16e[_0xcc10('0x12')][_0xcc10('0x14')]);}else{logger[_0xcc10('0xd')](_0xcc10('0xe'),_0x44e37c,_0xcc10('0xf'));_0x1e91b5(_0x44e16e[_0xcc10('0x15')][_0xcc10('0x14')]);}})[_0xcc10('0x16')](function(_0x26f6a5){logger[_0xcc10('0x12')](_0xcc10('0xe'),_0x44e37c,_0x26f6a5);_0x11dc9b(_0x26f6a5);});});}exports[_0xcc10('0x17')]=function(_0x1998c9){var _0x17bcc5=this;return new Promise(function(_0x1cbf67,_0x1e38e1){return db[_0xcc10('0x18')]['create'](_0x1998c9[_0xcc10('0x19')],{'raw':_0x1998c9[_0xcc10('0x1a')]?_0x1998c9[_0xcc10('0x1a')][_0xcc10('0x1b')]===undefined?!![]:![]:!![]})[_0xcc10('0xc')](function(_0x5133a5){logger[_0xcc10('0xd')](_0xcc10('0x17'),_0x1998c9);logger[_0xcc10('0x10')](_0xcc10('0x17'),_0x1998c9,JSON[_0xcc10('0x11')](_0x5133a5));_0x1cbf67(_0x5133a5);})[_0xcc10('0x16')](function(_0x2576ae){logger[_0xcc10('0x12')](_0xcc10('0x17'),_0x2576ae['message'],_0x1998c9);_0x1e38e1(_0x17bcc5[_0xcc10('0x12')](0x1f4,_0x2576ae[_0xcc10('0x14')]));});});};exports[_0xcc10('0x1c')]=function(_0x117a65){var _0x387a95=this;return new Promise(function(_0x57b722,_0x32d516){return db[_0xcc10('0x18')]['findAll']({'raw':_0x117a65[_0xcc10('0x1a')]?_0x117a65[_0xcc10('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x117a65[_0xcc10('0x1a')]?_0x117a65[_0xcc10('0x1a')]['where']||null:null,'attributes':[[db[_0xcc10('0x1d')]['fn']('COUNT',db[_0xcc10('0x1d')][_0xcc10('0x1e')]('id')),_0xcc10('0x1f')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')]['literal']('`state`\x20=\x204,\x201,\x20null'))),'predictiveIntervalAnsweredCalls'],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x22')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0xcc10('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xcc10('0x21')](_0xcc10('0x23')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x24'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x25')))),_0xcc10('0x26')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x24'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x27')))),_0xcc10('0x28')]]})[_0xcc10('0xc')](function(_0x572962){logger[_0xcc10('0xd')]('AvgHandleTime',_0x117a65);logger['debug'](_0xcc10('0x1c'),_0x117a65,JSON[_0xcc10('0x11')](_0x572962));_0x57b722(_0x572962);})[_0xcc10('0x16')](function(_0x17e3e2){logger[_0xcc10('0x12')](_0xcc10('0x1c'),_0x17e3e2[_0xcc10('0x14')],_0x117a65);_0x32d516(_0x387a95[_0xcc10('0x12')](0x1f4,_0x17e3e2[_0xcc10('0x14')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0xf5b8e5){var _0x34b551=this;return new Promise(function(_0x25b2d2,_0x384aa9){return db[_0xcc10('0x18')]['findAll']({'raw':_0xf5b8e5['options']?_0xf5b8e5[_0xcc10('0x1a')][_0xcc10('0x1b')]===undefined?!![]:![]:!![],'where':_0xf5b8e5[_0xcc10('0x1a')]?_0xf5b8e5[_0xcc10('0x1a')][_0xcc10('0x29')]||null:null,'attributes':[[_0xcc10('0x2a'),_0xcc10('0x2b')],[db[_0xcc10('0x1d')]['fn']('COUNT',db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x2c')))),_0xcc10('0x2d')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db['sequelize']['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x2e')))),_0xcc10('0x2f')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x30')))),_0xcc10('0x31')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')]('`state`\x20=\x205,\x201,\x20null'))),_0xcc10('0x32')],[db['sequelize']['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x33')))),'outboundCongestionCallsDay'],[db['sequelize']['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x34')))),_0xcc10('0x35')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0xcc10('0x36')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')]['literal'](_0xcc10('0x37')))),_0xcc10('0x38')],[db[_0xcc10('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x39')))),_0xcc10('0x3a')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')]('`state`\x20=\x2014,\x201,\x20null'))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn']('COUNT',db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')]('`state`\x20=\x2018,\x201,\x20null'))),_0xcc10('0x3b')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db['sequelize']['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')]('`state`\x20=\x2016,\x201,\x20null'))),_0xcc10('0x3c')],[db['sequelize']['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')]['literal'](_0xcc10('0x3d')))),_0xcc10('0x3b')],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db[_0xcc10('0x1d')]['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x3e')))),_0xcc10('0x3f')]],'group':[_0xcc10('0x2a')]})['then'](function(_0x5934b3){logger[_0xcc10('0xd')](_0xcc10('0x40'),_0xf5b8e5);logger[_0xcc10('0x10')]('GetVoiceQueueHopperHistory',_0xf5b8e5,JSON[_0xcc10('0x11')](_0x5934b3));_0x25b2d2(_0x5934b3);})[_0xcc10('0x16')](function(_0x99becf){logger['error'](_0xcc10('0x40'),_0x99becf['message'],_0xf5b8e5);_0x384aa9(_0x34b551[_0xcc10('0x12')](0x1f4,_0x99becf[_0xcc10('0x14')]));});});};exports[_0xcc10('0x41')]=function(_0x31c644){var _0x14e991=this;return new Promise(function(_0x4e1dcb,_0x8af22a){return db[_0xcc10('0x18')][_0xcc10('0x42')]({'raw':_0x31c644['options']?_0x31c644['options'][_0xcc10('0x1b')]===undefined?!![]:![]:!![],'where':_0x31c644[_0xcc10('0x1a')]?_0x31c644[_0xcc10('0x1a')][_0xcc10('0x29')]||null:null,'attributes':[[_0xcc10('0x2a'),'name'],[db[_0xcc10('0x1d')]['fn']('COUNT',db[_0xcc10('0x1d')][_0xcc10('0x1e')]('id')),'ivrTotalCallsDays'],[db[_0xcc10('0x1d')]['fn'](_0xcc10('0x20'),db['sequelize']['fn']('IF',db[_0xcc10('0x1d')][_0xcc10('0x21')](_0xcc10('0x30')))),_0xcc10('0x43')]],'group':[_0xcc10('0x2a')]})['then'](function(_0x27a2d5){logger[_0xcc10('0xd')]('GetCampaignHopperHistory',_0x31c644);logger[_0xcc10('0x10')](_0xcc10('0x41'),_0x31c644,JSON[_0xcc10('0x11')](_0x27a2d5));_0x4e1dcb(_0x27a2d5);})[_0xcc10('0x16')](function(_0xc923d7){logger[_0xcc10('0x12')](_0xcc10('0x41'),_0xc923d7['message'],_0x31c644);_0x8af22a(_0x14e991[_0xcc10('0x12')](0x1f4,_0xc923d7['message']));});});};
\ No newline at end of file
+var _0xf963=['`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','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetVoiceQueueHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','info','AvgHandleTime','findAll','where','sequelize','COUNT','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','literal','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay'];(function(_0x1123bb,_0x54472a){var _0xdeb602=function(_0x529467){while(--_0x529467){_0x1123bb['push'](_0x1123bb['shift']());}};_0xdeb602(++_0x54472a);}(_0xf963,0x1c9));var _0x3f96=function(_0xdea41a,_0x552987){_0xdea41a=_0xdea41a-0x0;var _0x15d0d8=_0xf963[_0xdea41a];return _0x15d0d8;};'use strict';var _=require(_0x3f96('0x0'));var util=require(_0x3f96('0x1'));var moment=require(_0x3f96('0x2'));var BPromise=require(_0x3f96('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3f96('0x4'));var db=require(_0x3f96('0x5'))['db'];var utils=require(_0x3f96('0x6'));var logger=require(_0x3f96('0x7'))('rpc');var config=require(_0x3f96('0x8'));var jayson=require(_0x3f96('0x9'));var client=jayson['client'][_0x3f96('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4c3526,_0x29bcd1,_0x57979d){return new BPromise(function(_0xcffb13,_0x1fa391){return client[_0x3f96('0xb')](_0x4c3526,_0x57979d)[_0x3f96('0xc')](function(_0x34263b){logger['info'](_0x3f96('0xd'),_0x29bcd1,_0x3f96('0xe'));logger[_0x3f96('0xf')](_0x3f96('0x10'),_0x29bcd1,_0x3f96('0xe'),JSON[_0x3f96('0x11')](_0x34263b));if(_0x34263b[_0x3f96('0x12')]){if(_0x34263b[_0x3f96('0x12')][_0x3f96('0x13')]===0x1f4){logger[_0x3f96('0x12')]('CmHopperHistory,\x20%s,\x20%s',_0x29bcd1,_0x34263b[_0x3f96('0x12')]['message']);return _0x1fa391(_0x34263b[_0x3f96('0x12')][_0x3f96('0x14')]);}logger['error'](_0x3f96('0xd'),_0x29bcd1,_0x34263b[_0x3f96('0x12')][_0x3f96('0x14')]);return _0xcffb13(_0x34263b[_0x3f96('0x12')][_0x3f96('0x14')]);}else{logger['info'](_0x3f96('0xd'),_0x29bcd1,_0x3f96('0xe'));_0xcffb13(_0x34263b[_0x3f96('0x15')][_0x3f96('0x14')]);}})[_0x3f96('0x16')](function(_0x139cd3){logger['error'](_0x3f96('0xd'),_0x29bcd1,_0x139cd3);_0x1fa391(_0x139cd3);});});}exports[_0x3f96('0x17')]=function(_0x2c2ab2){var _0x3e8379=this;return new Promise(function(_0x42babb,_0x4c17a0){return db[_0x3f96('0x18')][_0x3f96('0x19')](_0x2c2ab2[_0x3f96('0x1a')],{'raw':_0x2c2ab2[_0x3f96('0x1b')]?_0x2c2ab2['options'][_0x3f96('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x2284bc){logger[_0x3f96('0x1d')]('CreateCmHopperHistory',_0x2c2ab2);logger[_0x3f96('0xf')](_0x3f96('0x17'),_0x2c2ab2,JSON[_0x3f96('0x11')](_0x2284bc));_0x42babb(_0x2284bc);})[_0x3f96('0x16')](function(_0x157741){logger['error']('CreateCmHopperHistory',_0x157741[_0x3f96('0x14')],_0x2c2ab2);_0x4c17a0(_0x3e8379['error'](0x1f4,_0x157741['message']));});});};exports[_0x3f96('0x1e')]=function(_0x5e2e7a){var _0x5779da=this;return new Promise(function(_0x31f03b,_0xc40ab6){return db[_0x3f96('0x18')][_0x3f96('0x1f')]({'raw':_0x5e2e7a[_0x3f96('0x1b')]?_0x5e2e7a['options'][_0x3f96('0x1c')]===undefined?!![]:![]:!![],'where':_0x5e2e7a[_0x3f96('0x1b')]?_0x5e2e7a[_0x3f96('0x1b')][_0x3f96('0x20')]||null:null,'attributes':[[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db['sequelize']['col']('id')),_0x3f96('0x23')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x3f96('0x21')]['literal']('`state`\x20=\x204,\x201,\x20null'))),_0x3f96('0x24')],[db[_0x3f96('0x21')]['fn']('COUNT',db[_0x3f96('0x21')]['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x26')))),_0x3f96('0x27')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db['sequelize']['literal'](_0x3f96('0x28')))),_0x3f96('0x29')],[db['sequelize']['fn'](_0x3f96('0x2a'),db['sequelize']['fn']('IF',db[_0x3f96('0x21')]['literal']('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0x3f96('0x2b')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x2a'),db['sequelize']['fn']('IF',db[_0x3f96('0x21')]['literal']('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x3f96('0x2c')]]})[_0x3f96('0xc')](function(_0x5bc1e0){logger[_0x3f96('0x1d')](_0x3f96('0x1e'),_0x5e2e7a);logger[_0x3f96('0xf')](_0x3f96('0x1e'),_0x5e2e7a,JSON['stringify'](_0x5bc1e0));_0x31f03b(_0x5bc1e0);})['catch'](function(_0x50f4f5){logger[_0x3f96('0x12')](_0x3f96('0x1e'),_0x50f4f5[_0x3f96('0x14')],_0x5e2e7a);_0xc40ab6(_0x5779da['error'](0x1f4,_0x50f4f5[_0x3f96('0x14')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x42d051){var _0x36583a=this;return new Promise(function(_0x460578,_0x4bcb3d){return db[_0x3f96('0x18')][_0x3f96('0x1f')]({'raw':_0x42d051[_0x3f96('0x1b')]?_0x42d051[_0x3f96('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x42d051[_0x3f96('0x1b')]?_0x42d051[_0x3f96('0x1b')][_0x3f96('0x20')]||null:null,'attributes':[[_0x3f96('0x2d'),_0x3f96('0x2e')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x2f')))),_0x3f96('0x30')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db['sequelize'][_0x3f96('0x25')]('`state`\x20=\x203,\x201,\x20null'))),_0x3f96('0x31')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db['sequelize'][_0x3f96('0x25')](_0x3f96('0x32')))),_0x3f96('0x33')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db['sequelize']['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x34')))),_0x3f96('0x35')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db['sequelize']['literal'](_0x3f96('0x36')))),_0x3f96('0x37')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x38')))),_0x3f96('0x39')],[db['sequelize']['fn']('COUNT',db[_0x3f96('0x21')]['fn']('IF',db['sequelize']['literal'](_0x3f96('0x3a')))),'outboundDropCallsDayCallersExit'],[db['sequelize']['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db[_0x3f96('0x21')]['literal'](_0x3f96('0x3b')))),_0x3f96('0x3c')],[db[_0x3f96('0x21')]['fn']('COUNT',db[_0x3f96('0x21')]['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')]('`state`\x20=\x2013,\x201,\x20null'))),_0x3f96('0x3d')],[db[_0x3f96('0x21')]['fn'](_0x3f96('0x22'),db[_0x3f96('0x21')]['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x3e')))),_0x3f96('0x3f')],[db['sequelize']['fn'](_0x3f96('0x22'),db['sequelize']['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x40')))),'outboundRejectCallsDay'],[db['sequelize']['fn'](_0x3f96('0x22'),db['sequelize']['fn']('IF',db[_0x3f96('0x21')]['literal']('`state`\x20=\x2016,\x201,\x20null'))),_0x3f96('0x41')],[db[_0x3f96('0x21')]['fn']('COUNT',db[_0x3f96('0x21')]['fn']('IF',db['sequelize'][_0x3f96('0x25')](_0x3f96('0x42')))),_0x3f96('0x43')],[db['sequelize']['fn'](_0x3f96('0x22'),db['sequelize']['fn']('IF',db[_0x3f96('0x21')][_0x3f96('0x25')](_0x3f96('0x44')))),'outboundReCallsDay']],'group':[_0x3f96('0x2d')]})[_0x3f96('0xc')](function(_0x193996){logger[_0x3f96('0x1d')](_0x3f96('0x45'),_0x42d051);logger[_0x3f96('0xf')]('GetVoiceQueueHopperHistory',_0x42d051,JSON[_0x3f96('0x11')](_0x193996));_0x460578(_0x193996);})[_0x3f96('0x16')](function(_0x847351){logger[_0x3f96('0x12')]('GetVoiceQueueHopperHistory',_0x847351['message'],_0x42d051);_0x4bcb3d(_0x36583a[_0x3f96('0x12')](0x1f4,_0x847351[_0x3f96('0x14')]));});});};exports['GetCampaignHopperHistory']=function(_0x356997){var _0x34016e=this;return new Promise(function(_0xd2d411,_0x48b33e){return db['CmHopperHistory']['findAll']({'raw':_0x356997[_0x3f96('0x1b')]?_0x356997['options'][_0x3f96('0x1c')]===undefined?!![]:![]:!![],'where':_0x356997[_0x3f96('0x1b')]?_0x356997[_0x3f96('0x1b')]['where']||null:null,'attributes':[[_0x3f96('0x2d'),'name'],[db[_0x3f96('0x21')]['fn']('COUNT',db[_0x3f96('0x21')]['col']('id')),_0x3f96('0x46')],[db[_0x3f96('0x21')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x3f96('0x21')]['literal'](_0x3f96('0x32')))),_0x3f96('0x47')]],'group':[_0x3f96('0x2d')]})['then'](function(_0x257f47){logger[_0x3f96('0x1d')](_0x3f96('0x48'),_0x356997);logger[_0x3f96('0xf')]('GetCampaignHopperHistory',_0x356997,JSON[_0x3f96('0x11')](_0x257f47));_0xd2d411(_0x257f47);})['catch'](function(_0x500dcf){logger[_0x3f96('0x12')]('GetCampaignHopperHistory',_0x500dcf[_0x3f96('0x14')],_0x356997);_0x48b33e(_0x34016e['error'](0x1f4,_0x500dcf[_0x3f96('0x14')]));});});};
\ No newline at end of file