Built motion from commit 3a7e82ea.|2.6.29
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 5f6f639..938c091 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa204=['CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','message','result','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','AvgHandleTime','where','sequelize','COUNT','col','literal','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','catch','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`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','then','GetCampaignHopperHistory','findAll','ivrAnswerCallsDay','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug'];(function(_0xb875ee,_0x583042){var _0x4c7f3a=function(_0x1f6661){while(--_0x1f6661){_0xb875ee['push'](_0xb875ee['shift']());}};_0x4c7f3a(++_0x583042);}(_0xa204,0x152));var _0x4a20=function(_0x280875,_0x137bcb){_0x280875=_0x280875-0x0;var _0x74acfe=_0xa204[_0x280875];return _0x74acfe;};'use strict';var _=require(_0x4a20('0x0'));var util=require(_0x4a20('0x1'));var moment=require('moment');var BPromise=require(_0x4a20('0x2'));var rs=require(_0x4a20('0x3'));var fs=require('fs');var Redis=require(_0x4a20('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4a20('0x5'));var logger=require(_0x4a20('0x6'))(_0x4a20('0x7'));var config=require(_0x4a20('0x8'));var jayson=require(_0x4a20('0x9'));var client=jayson[_0x4a20('0xa')][_0x4a20('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2a549b,_0x57ce07,_0x27e3ec){return new BPromise(function(_0x31a214,_0x2d5107){return client[_0x4a20('0xc')](_0x2a549b,_0x27e3ec)['then'](function(_0x4fa4d6){logger[_0x4a20('0xd')](_0x4a20('0xe'),_0x57ce07,_0x4a20('0xf'));logger[_0x4a20('0x10')](_0x4a20('0x11'),_0x57ce07,_0x4a20('0xf'),JSON[_0x4a20('0x12')](_0x4fa4d6));if(_0x4fa4d6[_0x4a20('0x13')]){if(_0x4fa4d6[_0x4a20('0x13')]['code']===0x1f4){logger[_0x4a20('0x13')](_0x4a20('0xe'),_0x57ce07,_0x4fa4d6['error'][_0x4a20('0x14')]);return _0x2d5107(_0x4fa4d6[_0x4a20('0x13')][_0x4a20('0x14')]);}logger['error'](_0x4a20('0xe'),_0x57ce07,_0x4fa4d6['error']['message']);return _0x31a214(_0x4fa4d6['error'][_0x4a20('0x14')]);}else{logger['info'](_0x4a20('0xe'),_0x57ce07,'request\x20sent');_0x31a214(_0x4fa4d6[_0x4a20('0x15')][_0x4a20('0x14')]);}})['catch'](function(_0x3bd783){logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x57ce07,_0x3bd783);_0x2d5107(_0x3bd783);});});}exports[_0x4a20('0x16')]=function(_0x8a23f1){var _0x296156=this;return new Promise(function(_0x557e7d,_0x57f0f7){return db[_0x4a20('0x17')][_0x4a20('0x18')](_0x8a23f1[_0x4a20('0x19')],{'raw':_0x8a23f1[_0x4a20('0x1a')]?_0x8a23f1[_0x4a20('0x1a')][_0x4a20('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x2dfa58){logger[_0x4a20('0xd')](_0x4a20('0x16'),_0x8a23f1);logger[_0x4a20('0x10')]('CreateCmHopperHistory',_0x8a23f1,JSON['stringify'](_0x2dfa58));_0x557e7d(_0x2dfa58);})['catch'](function(_0x425ace){logger['error'](_0x4a20('0x16'),_0x425ace[_0x4a20('0x14')],_0x8a23f1);_0x57f0f7(_0x296156[_0x4a20('0x13')](0x1f4,_0x425ace['message']));});});};exports[_0x4a20('0x1c')]=function(_0x368dad){var _0x14f788=this;return new Promise(function(_0xd24d0e,_0x63a154){return db[_0x4a20('0x17')]['findAll']({'raw':_0x368dad['options']?_0x368dad[_0x4a20('0x1a')][_0x4a20('0x1b')]===undefined?!![]:![]:!![],'where':_0x368dad[_0x4a20('0x1a')]?_0x368dad[_0x4a20('0x1a')][_0x4a20('0x1d')]||null:null,'attributes':[[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db['sequelize'][_0x4a20('0x20')]('id')),'predictiveIntervalTotalCalls'],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db['sequelize']['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')]('`state`\x20=\x204,\x201,\x20null'))),_0x4a20('0x22')],[db[_0x4a20('0x1e')]['fn']('COUNT',db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x23')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db['sequelize']['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x24')))),_0x4a20('0x25')],[db['sequelize']['fn'](_0x4a20('0x26'),db['sequelize']['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x27')))),'predictiveIntervalAvgHoldtime'],[db[_0x4a20('0x1e')]['fn']('AVG',db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')]['literal']('`state`\x20=\x204,\x20`talktime`,\x20null'))),'predictiveIntervalAvgTalktime']]})['then'](function(_0x387da0){logger[_0x4a20('0xd')](_0x4a20('0x1c'),_0x368dad);logger[_0x4a20('0x10')](_0x4a20('0x1c'),_0x368dad,JSON['stringify'](_0x387da0));_0xd24d0e(_0x387da0);})[_0x4a20('0x28')](function(_0x51752e){logger['error'](_0x4a20('0x1c'),_0x51752e['message'],_0x368dad);_0x63a154(_0x14f788[_0x4a20('0x13')](0x1f4,_0x51752e[_0x4a20('0x14')]));});});};exports[_0x4a20('0x29')]=function(_0x1ffbfd){var _0x15f754=this;return new Promise(function(_0x89baeb,_0x4009b8){return db[_0x4a20('0x17')]['findAll']({'raw':_0x1ffbfd[_0x4a20('0x1a')]?_0x1ffbfd[_0x4a20('0x1a')][_0x4a20('0x1b')]===undefined?!![]:![]:!![],'where':_0x1ffbfd[_0x4a20('0x1a')]?_0x1ffbfd['options'][_0x4a20('0x1d')]||null:null,'attributes':[[_0x4a20('0x2a'),_0x4a20('0x2b')],[db[_0x4a20('0x1e')]['fn']('COUNT',db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')]['literal'](_0x4a20('0x2c')))),_0x4a20('0x2d')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db['sequelize'][_0x4a20('0x21')](_0x4a20('0x2e')))),_0x4a20('0x2f')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x30')))),_0x4a20('0x31')],[db['sequelize']['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x32')))),_0x4a20('0x33')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')]['literal'](_0x4a20('0x34')))),'outboundCongestionCallsDay'],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x4a20('0x35')],[db['sequelize']['fn']('COUNT',db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x4a20('0x36')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db['sequelize']['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x37')))),_0x4a20('0x38')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db['sequelize'][_0x4a20('0x21')](_0x4a20('0x39')))),_0x4a20('0x3a')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x3b')))),'outboundOriginateFailureCallsDay'],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db['sequelize']['fn']('IF',db['sequelize'][_0x4a20('0x21')](_0x4a20('0x3c')))),_0x4a20('0x3d')],[db[_0x4a20('0x1e')]['fn']('COUNT',db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x3e')))),_0x4a20('0x3f')],[db[_0x4a20('0x1e')]['fn']('COUNT',db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x40')))),_0x4a20('0x3d')],[db[_0x4a20('0x1e')]['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x4a20('0x41')))),_0x4a20('0x42')]],'group':[_0x4a20('0x2a')]})[_0x4a20('0x43')](function(_0x5a9d7a){logger[_0x4a20('0xd')](_0x4a20('0x29'),_0x1ffbfd);logger['debug'](_0x4a20('0x29'),_0x1ffbfd,JSON['stringify'](_0x5a9d7a));_0x89baeb(_0x5a9d7a);})[_0x4a20('0x28')](function(_0x46bbd2){logger[_0x4a20('0x13')](_0x4a20('0x29'),_0x46bbd2[_0x4a20('0x14')],_0x1ffbfd);_0x4009b8(_0x15f754['error'](0x1f4,_0x46bbd2[_0x4a20('0x14')]));});});};exports[_0x4a20('0x44')]=function(_0x2c941b){var _0xffceac=this;return new Promise(function(_0x2f95d3,_0x2460bf){return db[_0x4a20('0x17')][_0x4a20('0x45')]({'raw':_0x2c941b['options']?_0x2c941b[_0x4a20('0x1a')][_0x4a20('0x1b')]===undefined?!![]:![]:!![],'where':_0x2c941b[_0x4a20('0x1a')]?_0x2c941b[_0x4a20('0x1a')]['where']||null:null,'attributes':[[_0x4a20('0x2a'),_0x4a20('0x2b')],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db['sequelize'][_0x4a20('0x20')]('id')),'ivrTotalCallsDays'],[db[_0x4a20('0x1e')]['fn'](_0x4a20('0x1f'),db[_0x4a20('0x1e')]['fn']('IF',db[_0x4a20('0x1e')][_0x4a20('0x21')](_0x4a20('0x30')))),_0x4a20('0x46')]],'group':[_0x4a20('0x2a')]})[_0x4a20('0x43')](function(_0x10d462){logger[_0x4a20('0xd')](_0x4a20('0x44'),_0x2c941b);logger['debug'](_0x4a20('0x44'),_0x2c941b,JSON[_0x4a20('0x12')](_0x10d462));_0x2f95d3(_0x10d462);})[_0x4a20('0x28')](function(_0x23346d){logger[_0x4a20('0x13')](_0x4a20('0x44'),_0x23346d[_0x4a20('0x14')],_0x2c941b);_0x2460bf(_0xffceac[_0x4a20('0x13')](0x1f4,_0x23346d[_0x4a20('0x14')]));});});};
\ No newline at end of file
+var _0x296f=['options','raw','stringify','AvgHandleTime','findAll','where','sequelize','COUNT','col','predictiveIntervalTotalCalls','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','literal','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','then','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','ivrTotalCallsDays','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','http','request','info','CmHopperHistory,\x20%s,\x20%s','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create','body'];(function(_0x3960a3,_0x5e59b8){var _0x2e103b=function(_0x1255a1){while(--_0x1255a1){_0x3960a3['push'](_0x3960a3['shift']());}};_0x2e103b(++_0x5e59b8);}(_0x296f,0xf0));var _0xf296=function(_0x184759,_0x1cc38a){_0x184759=_0x184759-0x0;var _0xf26d5f=_0x296f[_0x184759];return _0xf26d5f;};'use strict';var _=require(_0xf296('0x0'));var util=require(_0xf296('0x1'));var moment=require(_0xf296('0x2'));var BPromise=require(_0xf296('0x3'));var rs=require(_0xf296('0x4'));var fs=require('fs');var Redis=require(_0xf296('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf296('0x6'))(_0xf296('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xf296('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x325b39,_0x5123d3,_0x300f99){return new BPromise(function(_0x3197bc,_0x4b05c5){return client[_0xf296('0x9')](_0x325b39,_0x300f99)['then'](function(_0x1ec8cc){logger[_0xf296('0xa')](_0xf296('0xb'),_0x5123d3,'request\x20sent');logger[_0xf296('0xc')](_0xf296('0xd'),_0x5123d3,_0xf296('0xe'),JSON['stringify'](_0x1ec8cc));if(_0x1ec8cc[_0xf296('0xf')]){if(_0x1ec8cc[_0xf296('0xf')][_0xf296('0x10')]===0x1f4){logger[_0xf296('0xf')](_0xf296('0xb'),_0x5123d3,_0x1ec8cc['error']['message']);return _0x4b05c5(_0x1ec8cc[_0xf296('0xf')][_0xf296('0x11')]);}logger['error'](_0xf296('0xb'),_0x5123d3,_0x1ec8cc[_0xf296('0xf')]['message']);return _0x3197bc(_0x1ec8cc[_0xf296('0xf')][_0xf296('0x11')]);}else{logger['info']('CmHopperHistory,\x20%s,\x20%s',_0x5123d3,'request\x20sent');_0x3197bc(_0x1ec8cc[_0xf296('0x12')][_0xf296('0x11')]);}})[_0xf296('0x13')](function(_0x3d3225){logger[_0xf296('0xf')](_0xf296('0xb'),_0x5123d3,_0x3d3225);_0x4b05c5(_0x3d3225);});});}exports[_0xf296('0x14')]=function(_0x2ea567){var _0x5ab6b0=this;return new Promise(function(_0xe0c845,_0x2a931c){return db[_0xf296('0x15')][_0xf296('0x16')](_0x2ea567[_0xf296('0x17')],{'raw':_0x2ea567[_0xf296('0x18')]?_0x2ea567['options'][_0xf296('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x15744d){logger[_0xf296('0xa')]('CreateCmHopperHistory',_0x2ea567);logger[_0xf296('0xc')](_0xf296('0x14'),_0x2ea567,JSON[_0xf296('0x1a')](_0x15744d));_0xe0c845(_0x15744d);})['catch'](function(_0x3f8a9e){logger[_0xf296('0xf')]('CreateCmHopperHistory',_0x3f8a9e[_0xf296('0x11')],_0x2ea567);_0x2a931c(_0x5ab6b0[_0xf296('0xf')](0x1f4,_0x3f8a9e[_0xf296('0x11')]));});});};exports[_0xf296('0x1b')]=function(_0x130993){var _0x15d49c=this;return new Promise(function(_0x520415,_0xbf51bb){return db[_0xf296('0x15')][_0xf296('0x1c')]({'raw':_0x130993[_0xf296('0x18')]?_0x130993[_0xf296('0x18')][_0xf296('0x19')]===undefined?!![]:![]:!![],'where':_0x130993['options']?_0x130993[_0xf296('0x18')][_0xf296('0x1d')]||null:null,'attributes':[[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')][_0xf296('0x20')]('id')),_0xf296('0x21')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0xf296('0x22')))),_0xf296('0x23')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')]('`state`\x20=\x2010,\x201,\x20null'))),_0xf296('0x25')],[db['sequelize']['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')](_0xf296('0x26')))),_0xf296('0x27')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x28'),db['sequelize']['fn']('IF',db[_0xf296('0x1e')]['literal'](_0xf296('0x29')))),_0xf296('0x2a')],[db['sequelize']['fn'](_0xf296('0x28'),db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),'predictiveIntervalAvgTalktime']]})[_0xf296('0x2b')](function(_0x551c06){logger[_0xf296('0xa')]('AvgHandleTime',_0x130993);logger[_0xf296('0xc')](_0xf296('0x1b'),_0x130993,JSON[_0xf296('0x1a')](_0x551c06));_0x520415(_0x551c06);})[_0xf296('0x13')](function(_0x2c0938){logger['error']('AvgHandleTime',_0x2c0938[_0xf296('0x11')],_0x130993);_0xbf51bb(_0x15d49c[_0xf296('0xf')](0x1f4,_0x2c0938[_0xf296('0x11')]));});});};exports[_0xf296('0x2c')]=function(_0x12cc29){var _0x106268=this;return new Promise(function(_0x5cbf00,_0xd9d055){return db[_0xf296('0x15')][_0xf296('0x1c')]({'raw':_0x12cc29[_0xf296('0x18')]?_0x12cc29[_0xf296('0x18')][_0xf296('0x19')]===undefined?!![]:![]:!![],'where':_0x12cc29['options']?_0x12cc29['options'][_0xf296('0x1d')]||null:null,'attributes':[[_0xf296('0x2d'),_0xf296('0x2e')],[db[_0xf296('0x1e')]['fn']('COUNT',db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')](_0xf296('0x2f')))),_0xf296('0x30')],[db['sequelize']['fn']('COUNT',db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')]('`state`\x20=\x203,\x201,\x20null'))),'outboundNoAnswerCallsDay'],[db[_0xf296('0x1e')]['fn']('COUNT',db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')](_0xf296('0x22')))),_0xf296('0x31')],[db['sequelize']['fn']('COUNT',db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')](_0xf296('0x32')))),_0xf296('0x33')],[db['sequelize']['fn']('COUNT',db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')](_0xf296('0x34')))),_0xf296('0x35')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0xf296('0x36')],[db[_0xf296('0x1e')]['fn']('COUNT',db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')](_0xf296('0x37')))),'outboundDropCallsDayCallersExit'],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')](_0xf296('0x38')))),_0xf296('0x39')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')](_0xf296('0x3a')))),'outboundBlacklistCallsDay'],[db['sequelize']['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')]('`state`\x20=\x2014,\x201,\x20null'))),'outboundOriginateFailureCallsDay'],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db['sequelize'][_0xf296('0x24')](_0xf296('0x3b')))),_0xf296('0x3c')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')]['literal'](_0xf296('0x3d')))),'outboundAnswerAgiCallsDay'],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')]('`state`\x20=\x2020,\x201,\x20null'))),_0xf296('0x3c')],[db[_0xf296('0x1e')]['fn'](_0xf296('0x1f'),db[_0xf296('0x1e')]['fn']('IF',db[_0xf296('0x1e')][_0xf296('0x24')](_0xf296('0x3e')))),_0xf296('0x3f')]],'group':['campaign']})[_0xf296('0x2b')](function(_0x20d3ce){logger[_0xf296('0xa')](_0xf296('0x2c'),_0x12cc29);logger[_0xf296('0xc')](_0xf296('0x2c'),_0x12cc29,JSON[_0xf296('0x1a')](_0x20d3ce));_0x5cbf00(_0x20d3ce);})['catch'](function(_0x44e23c){logger['error'](_0xf296('0x2c'),_0x44e23c[_0xf296('0x11')],_0x12cc29);_0xd9d055(_0x106268['error'](0x1f4,_0x44e23c[_0xf296('0x11')]));});});};exports[_0xf296('0x40')]=function(_0x3dac07){var _0xf6d81=this;return new Promise(function(_0x1478a2,_0x453f13){return db['CmHopperHistory'][_0xf296('0x1c')]({'raw':_0x3dac07[_0xf296('0x18')]?_0x3dac07[_0xf296('0x18')][_0xf296('0x19')]===undefined?!![]:![]:!![],'where':_0x3dac07['options']?_0x3dac07[_0xf296('0x18')][_0xf296('0x1d')]||null:null,'attributes':[[_0xf296('0x2d'),'name'],[db[_0xf296('0x1e')]['fn']('COUNT',db['sequelize']['col']('id')),_0xf296('0x41')],[db[_0xf296('0x1e')]['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xf296('0x24')](_0xf296('0x22')))),'ivrAnswerCallsDay']],'group':[_0xf296('0x2d')]})['then'](function(_0x4a29ed){logger[_0xf296('0xa')](_0xf296('0x40'),_0x3dac07);logger[_0xf296('0xc')]('GetCampaignHopperHistory',_0x3dac07,JSON['stringify'](_0x4a29ed));_0x1478a2(_0x4a29ed);})[_0xf296('0x13')](function(_0x1d3529){logger[_0xf296('0xf')](_0xf296('0x40'),_0x1d3529[_0xf296('0x11')],_0x3dac07);_0x453f13(_0xf6d81['error'](0x1f4,_0x1d3529[_0xf296('0x11')]));});});};
\ No newline at end of file