Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 5da163c..8025808 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x565c=['COUNT','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','AVG','`state`\x20=\x204,\x20`talktime`,\x20null','debug','GetVoiceQueueHopperHistory','CmHopperHistory','raw','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','outboundAnswerAgiCallsDay','outboundReCallsDay','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','request','then','CmHopperHistory,\x20%s,\x20%s','request\x20sent','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateCmHopperHistory','create','body','options','AvgHandleTime','findAll','where','sequelize'];(function(_0x24ad5f,_0x4fcf81){var _0xabb54e=function(_0x3b4e86){while(--_0x3b4e86){_0x24ad5f['push'](_0x24ad5f['shift']());}};_0xabb54e(++_0x4fcf81);}(_0x565c,0x73));var _0xc565=function(_0x17eda0,_0x369c7d){_0x17eda0=_0x17eda0-0x0;var _0x3a00e5=_0x565c[_0x17eda0];return _0x3a00e5;};'use strict';var _=require(_0xc565('0x0'));var util=require(_0xc565('0x1'));var moment=require(_0xc565('0x2'));var BPromise=require(_0xc565('0x3'));var rs=require(_0xc565('0x4'));var fs=require('fs');var Redis=require(_0xc565('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xc565('0x6'));var config=require(_0xc565('0x7'));var jayson=require(_0xc565('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x226477,_0x4959ff,_0x2d8278){return new BPromise(function(_0x228e36,_0x1c3147){return client[_0xc565('0x9')](_0x226477,_0x2d8278)[_0xc565('0xa')](function(_0x3841c7){logger['info'](_0xc565('0xb'),_0x4959ff,_0xc565('0xc'));logger['debug'](_0xc565('0xd'),_0x4959ff,_0xc565('0xc'),JSON[_0xc565('0xe')](_0x3841c7));if(_0x3841c7[_0xc565('0xf')]){if(_0x3841c7[_0xc565('0xf')][_0xc565('0x10')]===0x1f4){logger[_0xc565('0xf')](_0xc565('0xb'),_0x4959ff,_0x3841c7[_0xc565('0xf')]['message']);return _0x1c3147(_0x3841c7['error']['message']);}logger['error'](_0xc565('0xb'),_0x4959ff,_0x3841c7[_0xc565('0xf')]['message']);return _0x228e36(_0x3841c7[_0xc565('0xf')][_0xc565('0x11')]);}else{logger[_0xc565('0x12')](_0xc565('0xb'),_0x4959ff,_0xc565('0xc'));_0x228e36(_0x3841c7[_0xc565('0x13')][_0xc565('0x11')]);}})[_0xc565('0x14')](function(_0x2818bd){logger[_0xc565('0xf')](_0xc565('0xb'),_0x4959ff,_0x2818bd);_0x1c3147(_0x2818bd);});});}exports[_0xc565('0x15')]=function(_0x16cabe){var _0x368069=this;return new Promise(function(_0x275e7b,_0x4fbace){return db['CmHopperHistory'][_0xc565('0x16')](_0x16cabe[_0xc565('0x17')],{'raw':_0x16cabe[_0xc565('0x18')]?_0x16cabe[_0xc565('0x18')]['raw']===undefined?!![]:![]:!![]})[_0xc565('0xa')](function(_0x166fa7){logger[_0xc565('0x12')](_0xc565('0x15'),_0x16cabe);logger['debug'](_0xc565('0x15'),_0x16cabe,JSON[_0xc565('0xe')](_0x166fa7));_0x275e7b(_0x166fa7);})[_0xc565('0x14')](function(_0x43769e){logger[_0xc565('0xf')](_0xc565('0x15'),_0x43769e['message'],_0x16cabe);_0x4fbace(_0x368069['error'](0x1f4,_0x43769e[_0xc565('0x11')]));});});};exports[_0xc565('0x19')]=function(_0x2d91b0){var _0x1c8e94=this;return new Promise(function(_0x403811,_0x4eee02){return db['CmHopperHistory'][_0xc565('0x1a')]({'raw':_0x2d91b0[_0xc565('0x18')]?_0x2d91b0[_0xc565('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x2d91b0[_0xc565('0x18')]?_0x2d91b0[_0xc565('0x18')][_0xc565('0x1b')]||null:null,'attributes':[[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db['sequelize'][_0xc565('0x1e')]('id')),_0xc565('0x1f')],[db[_0xc565('0x1c')]['fn']('COUNT',db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')](_0xc565('0x21')))),_0xc565('0x22')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db['sequelize']['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')](_0xc565('0x23')))),_0xc565('0x24')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')]['literal']('`state`\x20=\x2011,\x201,\x20null'))),_0xc565('0x25')],[db[_0xc565('0x1c')]['fn']('AVG',db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')](_0xc565('0x26')))),_0xc565('0x27')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x28'),db['sequelize']['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')](_0xc565('0x29')))),'predictiveIntervalAvgTalktime']]})[_0xc565('0xa')](function(_0x4c82ca){logger[_0xc565('0x12')]('AvgHandleTime',_0x2d91b0);logger[_0xc565('0x2a')](_0xc565('0x19'),_0x2d91b0,JSON[_0xc565('0xe')](_0x4c82ca));_0x403811(_0x4c82ca);})[_0xc565('0x14')](function(_0x2eab11){logger[_0xc565('0xf')](_0xc565('0x19'),_0x2eab11[_0xc565('0x11')],_0x2d91b0);_0x4eee02(_0x1c8e94[_0xc565('0xf')](0x1f4,_0x2eab11['message']));});});};exports[_0xc565('0x2b')]=function(_0x2c5fbd){var _0x4254c1=this;return new Promise(function(_0x3f6536,_0x14f2f2){return db[_0xc565('0x2c')][_0xc565('0x1a')]({'raw':_0x2c5fbd['options']?_0x2c5fbd['options'][_0xc565('0x2d')]===undefined?!![]:![]:!![],'where':_0x2c5fbd[_0xc565('0x18')]?_0x2c5fbd[_0xc565('0x18')][_0xc565('0x1b')]||null:null,'attributes':[[_0xc565('0x2e'),_0xc565('0x2f')],[db[_0xc565('0x1c')]['fn']('COUNT',db[_0xc565('0x1c')]['fn']('IF',db['sequelize'][_0xc565('0x20')](_0xc565('0x30')))),_0xc565('0x31')],[db['sequelize']['fn']('COUNT',db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')](_0xc565('0x32')))),_0xc565('0x33')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db['sequelize'][_0xc565('0x20')](_0xc565('0x21')))),_0xc565('0x34')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')]['literal'](_0xc565('0x35')))),_0xc565('0x36')],[db['sequelize']['fn']('COUNT',db[_0xc565('0x1c')]['fn']('IF',db['sequelize'][_0xc565('0x20')](_0xc565('0x37')))),_0xc565('0x38')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')]['literal']('`state`\x20=\x2010\x20,\x201,\x20null'))),_0xc565('0x39')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db['sequelize'][_0xc565('0x20')](_0xc565('0x3a')))),_0xc565('0x3b')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')]['literal'](_0xc565('0x3c')))),_0xc565('0x3d')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db['sequelize']['literal'](_0xc565('0x3e')))),_0xc565('0x3f')],[db['sequelize']['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')](_0xc565('0x40')))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db['sequelize'][_0xc565('0x20')](_0xc565('0x41')))),_0xc565('0x42')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')]('`state`\x20=\x2016,\x201,\x20null'))),_0xc565('0x43')],[db['sequelize']['fn']('COUNT',db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')]('`state`\x20=\x2020,\x201,\x20null'))),_0xc565('0x42')],[db[_0xc565('0x1c')]['fn']('COUNT',db[_0xc565('0x1c')]['fn']('IF',db[_0xc565('0x1c')][_0xc565('0x20')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0xc565('0x44')]],'group':[_0xc565('0x2e')]})['then'](function(_0x39267f){logger[_0xc565('0x12')](_0xc565('0x2b'),_0x2c5fbd);logger['debug'](_0xc565('0x2b'),_0x2c5fbd,JSON[_0xc565('0xe')](_0x39267f));_0x3f6536(_0x39267f);})[_0xc565('0x14')](function(_0x315ee4){logger[_0xc565('0xf')](_0xc565('0x2b'),_0x315ee4['message'],_0x2c5fbd);_0x14f2f2(_0x4254c1[_0xc565('0xf')](0x1f4,_0x315ee4[_0xc565('0x11')]));});});};exports[_0xc565('0x45')]=function(_0x146950){var _0x3a76de=this;return new Promise(function(_0xde53f6,_0x8cff48){return db[_0xc565('0x2c')][_0xc565('0x1a')]({'raw':_0x146950[_0xc565('0x18')]?_0x146950[_0xc565('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x146950[_0xc565('0x18')]?_0x146950[_0xc565('0x18')][_0xc565('0x1b')]||null:null,'attributes':[[_0xc565('0x2e'),_0xc565('0x2f')],[db['sequelize']['fn'](_0xc565('0x1d'),db[_0xc565('0x1c')]['col']('id')),_0xc565('0x46')],[db[_0xc565('0x1c')]['fn'](_0xc565('0x1d'),db['sequelize']['fn']('IF',db['sequelize'][_0xc565('0x20')](_0xc565('0x21')))),_0xc565('0x47')]],'group':['campaign']})[_0xc565('0xa')](function(_0x20682e){logger[_0xc565('0x12')](_0xc565('0x45'),_0x146950);logger[_0xc565('0x2a')](_0xc565('0x45'),_0x146950,JSON[_0xc565('0xe')](_0x20682e));_0xde53f6(_0x20682e);})['catch'](function(_0x5d1f61){logger[_0xc565('0xf')](_0xc565('0x45'),_0x5d1f61[_0xc565('0x11')],_0x146950);_0x8cff48(_0x3a76de[_0xc565('0xf')](0x1f4,_0x5d1f61[_0xc565('0x11')]));});});};
\ No newline at end of file
+var _0x50a8=['`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','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','CmHopperHistory,\x20%s,\x20%s','message','catch','CreateCmHopperHistory','options','raw','AvgHandleTime','findAll','sequelize','COUNT','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','GetVoiceQueueHopperHistory','where','campaign','name','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x50a8,0x198));var _0x850a=function(_0x2c6120,_0x1f3e60){_0x2c6120=_0x2c6120-0x0;var _0x5fb114=_0x50a8[_0x2c6120];return _0x5fb114;};'use strict';var _=require(_0x850a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x850a('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x850a('0x2'))['db'];var utils=require(_0x850a('0x3'));var logger=require(_0x850a('0x4'))(_0x850a('0x5'));var config=require(_0x850a('0x6'));var jayson=require(_0x850a('0x7'));var client=jayson[_0x850a('0x8')][_0x850a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3fdb41,_0x543ef0,_0x488676){return new BPromise(function(_0x3c138a,_0xf4dcd1){return client[_0x850a('0xa')](_0x3fdb41,_0x488676)[_0x850a('0xb')](function(_0x5c197f){logger[_0x850a('0xc')]('CmHopperHistory,\x20%s,\x20%s',_0x543ef0,'request\x20sent');logger[_0x850a('0xd')](_0x850a('0xe'),_0x543ef0,_0x850a('0xf'),JSON[_0x850a('0x10')](_0x5c197f));if(_0x5c197f[_0x850a('0x11')]){if(_0x5c197f['error']['code']===0x1f4){logger['error'](_0x850a('0x12'),_0x543ef0,_0x5c197f['error'][_0x850a('0x13')]);return _0xf4dcd1(_0x5c197f[_0x850a('0x11')][_0x850a('0x13')]);}logger[_0x850a('0x11')](_0x850a('0x12'),_0x543ef0,_0x5c197f['error'][_0x850a('0x13')]);return _0x3c138a(_0x5c197f['error']['message']);}else{logger['info']('CmHopperHistory,\x20%s,\x20%s',_0x543ef0,_0x850a('0xf'));_0x3c138a(_0x5c197f['result'][_0x850a('0x13')]);}})[_0x850a('0x14')](function(_0x3c90e6){logger[_0x850a('0x11')](_0x850a('0x12'),_0x543ef0,_0x3c90e6);_0xf4dcd1(_0x3c90e6);});});}exports[_0x850a('0x15')]=function(_0x3e2715){var _0x419ae6=this;return new Promise(function(_0x57e789,_0x432a28){return db['CmHopperHistory']['create'](_0x3e2715['body'],{'raw':_0x3e2715['options']?_0x3e2715[_0x850a('0x16')][_0x850a('0x17')]===undefined?!![]:![]:!![]})[_0x850a('0xb')](function(_0x5b2917){logger[_0x850a('0xc')](_0x850a('0x15'),_0x3e2715);logger[_0x850a('0xd')]('CreateCmHopperHistory',_0x3e2715,JSON['stringify'](_0x5b2917));_0x57e789(_0x5b2917);})[_0x850a('0x14')](function(_0x285ef4){logger[_0x850a('0x11')](_0x850a('0x15'),_0x285ef4['message'],_0x3e2715);_0x432a28(_0x419ae6['error'](0x1f4,_0x285ef4['message']));});});};exports[_0x850a('0x18')]=function(_0x47d527){var _0x3ad545=this;return new Promise(function(_0x2d01fd,_0x2a5f9b){return db['CmHopperHistory'][_0x850a('0x19')]({'raw':_0x47d527[_0x850a('0x16')]?_0x47d527[_0x850a('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x47d527[_0x850a('0x16')]?_0x47d527[_0x850a('0x16')]['where']||null:null,'attributes':[[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')][_0x850a('0x1c')]('id')),_0x850a('0x1d')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')](_0x850a('0x1f')))),_0x850a('0x20')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db['sequelize'][_0x850a('0x1e')]('`state`\x20=\x2010,\x201,\x20null'))),_0x850a('0x21')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x850a('0x22')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x850a('0x1a')]['fn'](_0x850a('0x23'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')]['literal'](_0x850a('0x24')))),_0x850a('0x25')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x23'),db[_0x850a('0x1a')]['fn']('IF',db['sequelize']['literal'](_0x850a('0x26')))),'predictiveIntervalAvgTalktime']]})[_0x850a('0xb')](function(_0x1aa3b7){logger[_0x850a('0xc')](_0x850a('0x18'),_0x47d527);logger[_0x850a('0xd')](_0x850a('0x18'),_0x47d527,JSON[_0x850a('0x10')](_0x1aa3b7));_0x2d01fd(_0x1aa3b7);})[_0x850a('0x14')](function(_0x297fd3){logger[_0x850a('0x11')]('AvgHandleTime',_0x297fd3[_0x850a('0x13')],_0x47d527);_0x2a5f9b(_0x3ad545[_0x850a('0x11')](0x1f4,_0x297fd3[_0x850a('0x13')]));});});};exports[_0x850a('0x27')]=function(_0x450f1e){var _0x544507=this;return new Promise(function(_0x11c707,_0x376a12){return db['CmHopperHistory'][_0x850a('0x19')]({'raw':_0x450f1e[_0x850a('0x16')]?_0x450f1e[_0x850a('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x450f1e['options']?_0x450f1e[_0x850a('0x16')][_0x850a('0x28')]||null:null,'attributes':[[_0x850a('0x29'),_0x850a('0x2a')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db['sequelize']['fn']('IF',db['sequelize']['literal']('`state`\x20=\x200,\x201,\x20null'))),'outboundNoSuchCallsDay'],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')]('`state`\x20=\x203,\x201,\x20null'))),_0x850a('0x2b')],[db[_0x850a('0x1a')]['fn']('COUNT',db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')](_0x850a('0x1f')))),_0x850a('0x2c')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db['sequelize'][_0x850a('0x1e')](_0x850a('0x2d')))),_0x850a('0x2e')],[db['sequelize']['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')](_0x850a('0x2f')))),_0x850a('0x30')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')](_0x850a('0x31')))),_0x850a('0x32')],[db['sequelize']['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')](_0x850a('0x33')))),'outboundDropCallsDayCallersExit'],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db['sequelize']['fn']('IF',db[_0x850a('0x1a')][_0x850a('0x1e')](_0x850a('0x34')))),_0x850a('0x35')],[db[_0x850a('0x1a')]['fn']('COUNT',db[_0x850a('0x1a')]['fn']('IF',db['sequelize'][_0x850a('0x1e')](_0x850a('0x36')))),_0x850a('0x37')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')]['literal']('`state`\x20=\x2014,\x201,\x20null'))),_0x850a('0x38')],[db[_0x850a('0x1a')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x850a('0x1a')]['literal']('`state`\x20=\x2018,\x201,\x20null'))),'outboundRejectCallsDay'],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')]['literal'](_0x850a('0x39')))),_0x850a('0x3a')],[db['sequelize']['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')]['literal']('`state`\x20=\x2020,\x201,\x20null'))),_0x850a('0x3b')],[db['sequelize']['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['fn']('IF',db[_0x850a('0x1a')]['literal'](_0x850a('0x3c')))),_0x850a('0x3d')]],'group':['campaign']})['then'](function(_0x3247a8){logger[_0x850a('0xc')](_0x850a('0x27'),_0x450f1e);logger[_0x850a('0xd')]('GetVoiceQueueHopperHistory',_0x450f1e,JSON[_0x850a('0x10')](_0x3247a8));_0x11c707(_0x3247a8);})[_0x850a('0x14')](function(_0x27ee42){logger['error'](_0x850a('0x27'),_0x27ee42[_0x850a('0x13')],_0x450f1e);_0x376a12(_0x544507[_0x850a('0x11')](0x1f4,_0x27ee42['message']));});});};exports[_0x850a('0x3e')]=function(_0x5deeb9){var _0x3602e9=this;return new Promise(function(_0x3230cf,_0x562771){return db['CmHopperHistory']['findAll']({'raw':_0x5deeb9['options']?_0x5deeb9[_0x850a('0x16')][_0x850a('0x17')]===undefined?!![]:![]:!![],'where':_0x5deeb9[_0x850a('0x16')]?_0x5deeb9[_0x850a('0x16')]['where']||null:null,'attributes':[[_0x850a('0x29'),_0x850a('0x2a')],[db[_0x850a('0x1a')]['fn'](_0x850a('0x1b'),db[_0x850a('0x1a')]['col']('id')),_0x850a('0x3f')],[db['sequelize']['fn'](_0x850a('0x1b'),db['sequelize']['fn']('IF',db[_0x850a('0x1a')]['literal'](_0x850a('0x1f')))),_0x850a('0x40')]],'group':[_0x850a('0x29')]})[_0x850a('0xb')](function(_0x304c52){logger[_0x850a('0xc')](_0x850a('0x3e'),_0x5deeb9);logger[_0x850a('0xd')](_0x850a('0x3e'),_0x5deeb9,JSON[_0x850a('0x10')](_0x304c52));_0x3230cf(_0x304c52);})[_0x850a('0x14')](function(_0x4740bf){logger[_0x850a('0x11')](_0x850a('0x3e'),_0x4740bf[_0x850a('0x13')],_0x5deeb9);_0x562771(_0x3602e9[_0x850a('0x11')](0x1f4,_0x4740bf['message']));});});};
\ No newline at end of file