Built motion from commit (unavailable).|2.4.16
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 3cbc6e6..05a4fb0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1eba=['predictiveIntervalDroppedCallsCallersExit','AVG','GetVoiceQueueHopperHistory','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','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`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','col','ivrTotalCallsDays','`state`\x20=\x204,\x201,\x20null','GetCampaignHopperHistory','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','CmHopperHistory,\x20%s,\x20%s','message','result','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','debug','catch','AvgHandleTime','findAll','where','sequelize','predictiveIntervalTotalCalls','literal','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','COUNT','`state`\x20=\x2011,\x201,\x20null'];(function(_0x53f505,_0x37c629){var _0x56143d=function(_0x230559){while(--_0x230559){_0x53f505['push'](_0x53f505['shift']());}};_0x56143d(++_0x37c629);}(_0x1eba,0x1d7));var _0xa1eb=function(_0x4ed32d,_0x327695){_0x4ed32d=_0x4ed32d-0x0;var _0xf624df=_0x1eba[_0x4ed32d];return _0xf624df;};'use strict';var _=require(_0xa1eb('0x0'));var util=require(_0xa1eb('0x1'));var moment=require(_0xa1eb('0x2'));var BPromise=require(_0xa1eb('0x3'));var rs=require(_0xa1eb('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xa1eb('0x5'));var logger=require(_0xa1eb('0x6'))(_0xa1eb('0x7'));var config=require(_0xa1eb('0x8'));var jayson=require(_0xa1eb('0x9'));var client=jayson[_0xa1eb('0xa')][_0xa1eb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2bfbb0,_0x39a5a3,_0x7d2982){return new BPromise(function(_0x2aebb6,_0x9d7113){return client['request'](_0x2bfbb0,_0x7d2982)[_0xa1eb('0xc')](function(_0x4d4aaf){logger[_0xa1eb('0xd')]('CmHopperHistory,\x20%s,\x20%s',_0x39a5a3,_0xa1eb('0xe'));logger['debug'](_0xa1eb('0xf'),_0x39a5a3,'request\x20sent',JSON[_0xa1eb('0x10')](_0x4d4aaf));if(_0x4d4aaf[_0xa1eb('0x11')]){if(_0x4d4aaf[_0xa1eb('0x11')]['code']===0x1f4){logger[_0xa1eb('0x11')](_0xa1eb('0x12'),_0x39a5a3,_0x4d4aaf['error'][_0xa1eb('0x13')]);return _0x9d7113(_0x4d4aaf['error']['message']);}logger[_0xa1eb('0x11')]('CmHopperHistory,\x20%s,\x20%s',_0x39a5a3,_0x4d4aaf[_0xa1eb('0x11')][_0xa1eb('0x13')]);return _0x2aebb6(_0x4d4aaf[_0xa1eb('0x11')][_0xa1eb('0x13')]);}else{logger[_0xa1eb('0xd')](_0xa1eb('0x12'),_0x39a5a3,_0xa1eb('0xe'));_0x2aebb6(_0x4d4aaf[_0xa1eb('0x14')][_0xa1eb('0x13')]);}})['catch'](function(_0xbd6a6b){logger['error'](_0xa1eb('0x12'),_0x39a5a3,_0xbd6a6b);_0x9d7113(_0xbd6a6b);});});}exports[_0xa1eb('0x15')]=function(_0x33c4e3){var _0x1a5d2c=this;return new Promise(function(_0x49bfaa,_0x1dd621){return db[_0xa1eb('0x16')][_0xa1eb('0x17')](_0x33c4e3[_0xa1eb('0x18')],{'raw':_0x33c4e3[_0xa1eb('0x19')]?_0x33c4e3[_0xa1eb('0x19')][_0xa1eb('0x1a')]===undefined?!![]:![]:!![]})[_0xa1eb('0xc')](function(_0x4fc14a){logger[_0xa1eb('0xd')]('CreateCmHopperHistory',_0x33c4e3);logger[_0xa1eb('0x1b')](_0xa1eb('0x15'),_0x33c4e3,JSON[_0xa1eb('0x10')](_0x4fc14a));_0x49bfaa(_0x4fc14a);})[_0xa1eb('0x1c')](function(_0x5e7a34){logger['error'](_0xa1eb('0x15'),_0x5e7a34[_0xa1eb('0x13')],_0x33c4e3);_0x1dd621(_0x1a5d2c['error'](0x1f4,_0x5e7a34[_0xa1eb('0x13')]));});});};exports[_0xa1eb('0x1d')]=function(_0x258d3a){var _0xa6b20c=this;return new Promise(function(_0x23b49e,_0x1c59e1){return db[_0xa1eb('0x16')][_0xa1eb('0x1e')]({'raw':_0x258d3a[_0xa1eb('0x19')]?_0x258d3a[_0xa1eb('0x19')][_0xa1eb('0x1a')]===undefined?!![]:![]:!![],'where':_0x258d3a[_0xa1eb('0x19')]?_0x258d3a['options'][_0xa1eb('0x1f')]||null:null,'attributes':[[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['col']('id')),_0xa1eb('0x21')],[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')]('`state`\x20=\x204,\x201,\x20null'))),_0xa1eb('0x23')],[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x24')))),_0xa1eb('0x25')],[db['sequelize']['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x27')))),_0xa1eb('0x28')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x29'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')]('`state`\x20=\x204,\x20`holdtime`,\x20null'))),'predictiveIntervalAvgHoldtime'],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x29'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),'predictiveIntervalAvgTalktime']]})[_0xa1eb('0xc')](function(_0x2d2890){logger['info']('AvgHandleTime',_0x258d3a);logger[_0xa1eb('0x1b')]('AvgHandleTime',_0x258d3a,JSON[_0xa1eb('0x10')](_0x2d2890));_0x23b49e(_0x2d2890);})['catch'](function(_0x47737d){logger[_0xa1eb('0x11')](_0xa1eb('0x1d'),_0x47737d['message'],_0x258d3a);_0x1c59e1(_0xa6b20c[_0xa1eb('0x11')](0x1f4,_0x47737d[_0xa1eb('0x13')]));});});};exports[_0xa1eb('0x2a')]=function(_0x481405){var _0x140f1e=this;return new Promise(function(_0x27273a,_0x430ffe){return db[_0xa1eb('0x16')][_0xa1eb('0x1e')]({'raw':_0x481405['options']?_0x481405[_0xa1eb('0x19')][_0xa1eb('0x1a')]===undefined?!![]:![]:!![],'where':_0x481405[_0xa1eb('0x19')]?_0x481405[_0xa1eb('0x19')][_0xa1eb('0x1f')]||null:null,'attributes':[[_0xa1eb('0x2b'),_0xa1eb('0x2c')],[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x2d')))),_0xa1eb('0x2e')],[db['sequelize']['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')]['literal'](_0xa1eb('0x2f')))),_0xa1eb('0x30')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')]('`state`\x20=\x204,\x201,\x20null'))),_0xa1eb('0x31')],[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['fn']('IF',db['sequelize'][_0xa1eb('0x22')](_0xa1eb('0x32')))),_0xa1eb('0x33')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x34')))),_0xa1eb('0x35')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x36')))),'outboundDropCallsDayTimeout'],[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')]['literal']('`state`\x20=\x2011\x20,\x201,\x20null'))),_0xa1eb('0x37')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db['sequelize']['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x38')))),_0xa1eb('0x39')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x3a')))),_0xa1eb('0x3b')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db['sequelize'][_0xa1eb('0x22')](_0xa1eb('0x3c')))),_0xa1eb('0x3d')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')]['literal'](_0xa1eb('0x3e')))),_0xa1eb('0x3f')],[db[_0xa1eb('0x20')]['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')][_0xa1eb('0x22')](_0xa1eb('0x40')))),_0xa1eb('0x41')],[db['sequelize']['fn'](_0xa1eb('0x26'),db['sequelize']['fn']('IF',db[_0xa1eb('0x20')]['literal'](_0xa1eb('0x42')))),_0xa1eb('0x3f')],[db[_0xa1eb('0x20')]['fn']('COUNT',db[_0xa1eb('0x20')]['fn']('IF',db[_0xa1eb('0x20')]['literal'](_0xa1eb('0x43')))),_0xa1eb('0x44')]],'group':[_0xa1eb('0x2b')]})[_0xa1eb('0xc')](function(_0x11cc84){logger[_0xa1eb('0xd')](_0xa1eb('0x2a'),_0x481405);logger[_0xa1eb('0x1b')](_0xa1eb('0x2a'),_0x481405,JSON[_0xa1eb('0x10')](_0x11cc84));_0x27273a(_0x11cc84);})[_0xa1eb('0x1c')](function(_0x4391be){logger[_0xa1eb('0x11')](_0xa1eb('0x2a'),_0x4391be[_0xa1eb('0x13')],_0x481405);_0x430ffe(_0x140f1e[_0xa1eb('0x11')](0x1f4,_0x4391be[_0xa1eb('0x13')]));});});};exports['GetCampaignHopperHistory']=function(_0xc059db){var _0x51ce91=this;return new Promise(function(_0x2161ed,_0x1085ca){return db[_0xa1eb('0x16')][_0xa1eb('0x1e')]({'raw':_0xc059db['options']?_0xc059db[_0xa1eb('0x19')][_0xa1eb('0x1a')]===undefined?!![]:![]:!![],'where':_0xc059db[_0xa1eb('0x19')]?_0xc059db[_0xa1eb('0x19')][_0xa1eb('0x1f')]||null:null,'attributes':[[_0xa1eb('0x2b'),_0xa1eb('0x2c')],[db['sequelize']['fn'](_0xa1eb('0x26'),db[_0xa1eb('0x20')][_0xa1eb('0x45')]('id')),_0xa1eb('0x46')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xa1eb('0x22')](_0xa1eb('0x47')))),'ivrAnswerCallsDay']],'group':[_0xa1eb('0x2b')]})[_0xa1eb('0xc')](function(_0x262b22){logger[_0xa1eb('0xd')]('GetCampaignHopperHistory',_0xc059db);logger['debug'](_0xa1eb('0x48'),_0xc059db,JSON[_0xa1eb('0x10')](_0x262b22));_0x2161ed(_0x262b22);})[_0xa1eb('0x1c')](function(_0x23cb1b){logger[_0xa1eb('0x11')](_0xa1eb('0x48'),_0x23cb1b['message'],_0xc059db);_0x1085ca(_0x51ce91['error'](0x1f4,_0x23cb1b[_0xa1eb('0x13')]));});});};
\ No newline at end of file
+var _0x7916=['body','options','raw','sequelize','COUNT','col','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','literal','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','predictiveIntervalAvgHoldtime','AvgHandleTime','campaign','name','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','`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=\x2018,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','findAll','ivrAnswerCallsDay','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','then','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','CreateCmHopperHistory','CmHopperHistory','create'];(function(_0x32b30c,_0x2d5ec8){var _0xcfc212=function(_0x42e668){while(--_0x42e668){_0x32b30c['push'](_0x32b30c['shift']());}};_0xcfc212(++_0x2d5ec8);}(_0x7916,0x128));var _0x6791=function(_0x20a6bd,_0xaeb074){_0x20a6bd=_0x20a6bd-0x0;var _0x318a91=_0x7916[_0x20a6bd];return _0x318a91;};'use strict';var _=require(_0x6791('0x0'));var util=require('util');var moment=require(_0x6791('0x1'));var BPromise=require(_0x6791('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6791('0x3'));var db=require(_0x6791('0x4'))['db'];var utils=require(_0x6791('0x5'));var logger=require(_0x6791('0x6'))('rpc');var config=require(_0x6791('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6791('0x8')][_0x6791('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5ad8c0,_0x8b85ff,_0x5d2118){return new BPromise(function(_0x2b240c,_0x50c563){return client['request'](_0x5ad8c0,_0x5d2118)[_0x6791('0xa')](function(_0x198a64){logger['info'](_0x6791('0xb'),_0x8b85ff,_0x6791('0xc'));logger[_0x6791('0xd')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x8b85ff,_0x6791('0xc'),JSON[_0x6791('0xe')](_0x198a64));if(_0x198a64[_0x6791('0xf')]){if(_0x198a64[_0x6791('0xf')][_0x6791('0x10')]===0x1f4){logger[_0x6791('0xf')](_0x6791('0xb'),_0x8b85ff,_0x198a64[_0x6791('0xf')][_0x6791('0x11')]);return _0x50c563(_0x198a64[_0x6791('0xf')][_0x6791('0x11')]);}logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x8b85ff,_0x198a64[_0x6791('0xf')]['message']);return _0x2b240c(_0x198a64[_0x6791('0xf')]['message']);}else{logger[_0x6791('0x12')](_0x6791('0xb'),_0x8b85ff,'request\x20sent');_0x2b240c(_0x198a64[_0x6791('0x13')]['message']);}})[_0x6791('0x14')](function(_0x150d1f){logger['error'](_0x6791('0xb'),_0x8b85ff,_0x150d1f);_0x50c563(_0x150d1f);});});}exports[_0x6791('0x15')]=function(_0x5bec14){var _0x1872f5=this;return new Promise(function(_0x4d8a79,_0xe55dba){return db[_0x6791('0x16')][_0x6791('0x17')](_0x5bec14[_0x6791('0x18')],{'raw':_0x5bec14[_0x6791('0x19')]?_0x5bec14[_0x6791('0x19')][_0x6791('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x4a2922){logger[_0x6791('0x12')]('CreateCmHopperHistory',_0x5bec14);logger[_0x6791('0xd')](_0x6791('0x15'),_0x5bec14,JSON['stringify'](_0x4a2922));_0x4d8a79(_0x4a2922);})[_0x6791('0x14')](function(_0x309610){logger[_0x6791('0xf')](_0x6791('0x15'),_0x309610['message'],_0x5bec14);_0xe55dba(_0x1872f5[_0x6791('0xf')](0x1f4,_0x309610[_0x6791('0x11')]));});});};exports['AvgHandleTime']=function(_0x53bb44){var _0x4b23bc=this;return new Promise(function(_0x372dae,_0x502043){return db[_0x6791('0x16')]['findAll']({'raw':_0x53bb44['options']?_0x53bb44['options'][_0x6791('0x1a')]===undefined?!![]:![]:!![],'where':_0x53bb44[_0x6791('0x19')]?_0x53bb44[_0x6791('0x19')]['where']||null:null,'attributes':[[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db['sequelize'][_0x6791('0x1d')]('id')),'predictiveIntervalTotalCalls'],[db[_0x6791('0x1b')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6791('0x1b')]['literal'](_0x6791('0x1e')))),_0x6791('0x1f')],[db['sequelize']['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')]('`state`\x20=\x2010,\x201,\x20null'))),'predictiveIntervalDroppedCallsTimeout'],[db[_0x6791('0x1b')]['fn']('COUNT',db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')](_0x6791('0x21')))),_0x6791('0x22')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x23'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')]('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0x6791('0x24')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x23'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')]('`state`\x20=\x204,\x20`talktime`,\x20null'))),'predictiveIntervalAvgTalktime']]})['then'](function(_0x1de770){logger[_0x6791('0x12')](_0x6791('0x25'),_0x53bb44);logger['debug']('AvgHandleTime',_0x53bb44,JSON[_0x6791('0xe')](_0x1de770));_0x372dae(_0x1de770);})[_0x6791('0x14')](function(_0x31a525){logger[_0x6791('0xf')]('AvgHandleTime',_0x31a525[_0x6791('0x11')],_0x53bb44);_0x502043(_0x4b23bc[_0x6791('0xf')](0x1f4,_0x31a525[_0x6791('0x11')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x31217d){var _0x567e36=this;return new Promise(function(_0x4ee010,_0x256c02){return db[_0x6791('0x16')]['findAll']({'raw':_0x31217d[_0x6791('0x19')]?_0x31217d[_0x6791('0x19')][_0x6791('0x1a')]===undefined?!![]:![]:!![],'where':_0x31217d[_0x6791('0x19')]?_0x31217d[_0x6791('0x19')]['where']||null:null,'attributes':[[_0x6791('0x26'),_0x6791('0x27')],[db[_0x6791('0x1b')]['fn']('COUNT',db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')]('`state`\x20=\x200,\x201,\x20null'))),_0x6791('0x28')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db['sequelize'][_0x6791('0x20')](_0x6791('0x29')))),_0x6791('0x2a')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')](_0x6791('0x1e')))),'outboundAnswerCallsDay'],[db['sequelize']['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db['sequelize'][_0x6791('0x20')](_0x6791('0x2b')))),_0x6791('0x2c')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')]['literal'](_0x6791('0x2d')))),'outboundCongestionCallsDay'],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')]['literal'](_0x6791('0x2e')))),_0x6791('0x2f')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')](_0x6791('0x30')))),'outboundDropCallsDayCallersExit'],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')]['literal'](_0x6791('0x31')))),_0x6791('0x32')],[db['sequelize']['fn'](_0x6791('0x1c'),db['sequelize']['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')](_0x6791('0x33')))),_0x6791('0x34')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')]('`state`\x20=\x2014,\x201,\x20null'))),_0x6791('0x35')],[db['sequelize']['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')](_0x6791('0x36')))),'outboundRejectCallsDay'],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')][_0x6791('0x20')]('`state`\x20=\x2016,\x201,\x20null'))),_0x6791('0x37')],[db[_0x6791('0x1b')]['fn']('COUNT',db[_0x6791('0x1b')]['fn']('IF',db['sequelize'][_0x6791('0x20')](_0x6791('0x38')))),_0x6791('0x39')],[db[_0x6791('0x1b')]['fn']('COUNT',db[_0x6791('0x1b')]['fn']('IF',db[_0x6791('0x1b')]['literal'](_0x6791('0x3a')))),_0x6791('0x3b')]],'group':[_0x6791('0x26')]})['then'](function(_0x355e97){logger[_0x6791('0x12')]('GetVoiceQueueHopperHistory',_0x31217d);logger[_0x6791('0xd')](_0x6791('0x3c'),_0x31217d,JSON['stringify'](_0x355e97));_0x4ee010(_0x355e97);})[_0x6791('0x14')](function(_0x216498){logger[_0x6791('0xf')](_0x6791('0x3c'),_0x216498['message'],_0x31217d);_0x256c02(_0x567e36[_0x6791('0xf')](0x1f4,_0x216498[_0x6791('0x11')]));});});};exports[_0x6791('0x3d')]=function(_0x5b534b){var _0x5a7a88=this;return new Promise(function(_0x1d6bec,_0x6b8acd){return db[_0x6791('0x16')][_0x6791('0x3e')]({'raw':_0x5b534b[_0x6791('0x19')]?_0x5b534b['options']['raw']===undefined?!![]:![]:!![],'where':_0x5b534b[_0x6791('0x19')]?_0x5b534b['options']['where']||null:null,'attributes':[[_0x6791('0x26'),_0x6791('0x27')],[db[_0x6791('0x1b')]['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')][_0x6791('0x1d')]('id')),'ivrTotalCallsDays'],[db['sequelize']['fn'](_0x6791('0x1c'),db[_0x6791('0x1b')]['fn']('IF',db['sequelize'][_0x6791('0x20')]('`state`\x20=\x204,\x201,\x20null'))),_0x6791('0x3f')]],'group':[_0x6791('0x26')]})['then'](function(_0x1ebfb6){logger[_0x6791('0x12')](_0x6791('0x3d'),_0x5b534b);logger['debug'](_0x6791('0x3d'),_0x5b534b,JSON[_0x6791('0xe')](_0x1ebfb6));_0x1d6bec(_0x1ebfb6);})[_0x6791('0x14')](function(_0x383853){logger[_0x6791('0xf')]('GetCampaignHopperHistory',_0x383853['message'],_0x5b534b);_0x6b8acd(_0x5a7a88[_0x6791('0xf')](0x1f4,_0x383853[_0x6791('0x11')]));});});};
\ No newline at end of file