Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / cmHopperHistory / cmHopperHistory.rpc.js
index 5049987..6a7674c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1fc4=['`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','AvgHandleTime','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundUnknownCallsDay','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','`state`\x20=\x2016,\x201,\x20null','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','col','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','error','code','message','info','create','options','raw','CreateCmHopperHistory','stringify','catch','CmHopperHistory','findAll','where','sequelize','predictiveIntervalTotalCalls','COUNT','literal','`state`\x20=\x204,\x201,\x20null','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','AVG'];(function(_0x32ed80,_0x3db315){var _0x212659=function(_0x29ff29){while(--_0x29ff29){_0x32ed80['push'](_0x32ed80['shift']());}};_0x212659(++_0x3db315);}(_0x1fc4,0x1e1));var _0x41fc=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x1fc4[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x41fc('0x0'));var util=require(_0x41fc('0x1'));var moment=require('moment');var BPromise=require(_0x41fc('0x2'));var rs=require(_0x41fc('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x41fc('0x4'))['db'];var utils=require(_0x41fc('0x5'));var logger=require(_0x41fc('0x6'))(_0x41fc('0x7'));var config=require(_0x41fc('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4a28a6,_0x3ae8e8,_0x6d80c4){return new BPromise(function(_0x13d96d,_0x2cae9c){return client[_0x41fc('0x9')](_0x4a28a6,_0x6d80c4)[_0x41fc('0xa')](function(_0x37160c){logger['info'](_0x41fc('0xb'),_0x3ae8e8,_0x41fc('0xc'));logger[_0x41fc('0xd')](_0x41fc('0xe'),_0x3ae8e8,_0x41fc('0xc'),JSON['stringify'](_0x37160c));if(_0x37160c[_0x41fc('0xf')]){if(_0x37160c[_0x41fc('0xf')][_0x41fc('0x10')]===0x1f4){logger[_0x41fc('0xf')](_0x41fc('0xb'),_0x3ae8e8,_0x37160c[_0x41fc('0xf')][_0x41fc('0x11')]);return _0x2cae9c(_0x37160c['error'][_0x41fc('0x11')]);}logger['error'](_0x41fc('0xb'),_0x3ae8e8,_0x37160c['error'][_0x41fc('0x11')]);return _0x13d96d(_0x37160c[_0x41fc('0xf')][_0x41fc('0x11')]);}else{logger[_0x41fc('0x12')](_0x41fc('0xb'),_0x3ae8e8,_0x41fc('0xc'));_0x13d96d(_0x37160c['result']['message']);}})['catch'](function(_0x49eca0){logger[_0x41fc('0xf')](_0x41fc('0xb'),_0x3ae8e8,_0x49eca0);_0x2cae9c(_0x49eca0);});});}exports['CreateCmHopperHistory']=function(_0x1a43f6){var _0x10bca5=this;return new Promise(function(_0x1a0e87,_0x17b2d6){return db['CmHopperHistory'][_0x41fc('0x13')](_0x1a43f6['body'],{'raw':_0x1a43f6[_0x41fc('0x14')]?_0x1a43f6[_0x41fc('0x14')][_0x41fc('0x15')]===undefined?!![]:![]:!![]})[_0x41fc('0xa')](function(_0x30b45f){logger['info']('CreateCmHopperHistory',_0x1a43f6);logger[_0x41fc('0xd')](_0x41fc('0x16'),_0x1a43f6,JSON[_0x41fc('0x17')](_0x30b45f));_0x1a0e87(_0x30b45f);})[_0x41fc('0x18')](function(_0x3b9f8c){logger[_0x41fc('0xf')]('CreateCmHopperHistory',_0x3b9f8c[_0x41fc('0x11')],_0x1a43f6);_0x17b2d6(_0x10bca5[_0x41fc('0xf')](0x1f4,_0x3b9f8c['message']));});});};exports['AvgHandleTime']=function(_0x10bde3){var _0x210080=this;return new Promise(function(_0x1fb5aa,_0x3919eb){return db[_0x41fc('0x19')][_0x41fc('0x1a')]({'raw':_0x10bde3[_0x41fc('0x14')]?_0x10bde3[_0x41fc('0x14')][_0x41fc('0x15')]===undefined?!![]:![]:!![],'where':_0x10bde3[_0x41fc('0x14')]?_0x10bde3[_0x41fc('0x14')][_0x41fc('0x1b')]||null:null,'attributes':[[db[_0x41fc('0x1c')]['fn']('COUNT',db['sequelize']['col']('id')),_0x41fc('0x1d')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db['sequelize']['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x20')))),'predictiveIntervalAnsweredCalls'],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x21')))),_0x41fc('0x22')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db['sequelize']['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x23')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x41fc('0x1c')]['fn']('AVG',db[_0x41fc('0x1c')]['fn']('IF',db['sequelize']['literal'](_0x41fc('0x24')))),_0x41fc('0x25')],[db['sequelize']['fn'](_0x41fc('0x26'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x27')))),_0x41fc('0x28')]]})[_0x41fc('0xa')](function(_0x4c6b0d){logger[_0x41fc('0x12')](_0x41fc('0x29'),_0x10bde3);logger[_0x41fc('0xd')](_0x41fc('0x29'),_0x10bde3,JSON[_0x41fc('0x17')](_0x4c6b0d));_0x1fb5aa(_0x4c6b0d);})[_0x41fc('0x18')](function(_0x481c2e){logger['error'](_0x41fc('0x29'),_0x481c2e[_0x41fc('0x11')],_0x10bde3);_0x3919eb(_0x210080['error'](0x1f4,_0x481c2e[_0x41fc('0x11')]));});});};exports[_0x41fc('0x2a')]=function(_0x3762e8){var _0x166a4c=this;return new Promise(function(_0x7205f9,_0x5a7689){return db[_0x41fc('0x19')][_0x41fc('0x1a')]({'raw':_0x3762e8[_0x41fc('0x14')]?_0x3762e8[_0x41fc('0x14')][_0x41fc('0x15')]===undefined?!![]:![]:!![],'where':_0x3762e8[_0x41fc('0x14')]?_0x3762e8[_0x41fc('0x14')][_0x41fc('0x1b')]||null:null,'attributes':[[_0x41fc('0x2b'),_0x41fc('0x2c')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db['sequelize'][_0x41fc('0x1f')]('`state`\x20=\x200,\x201,\x20null'))),'outboundNoSuchCallsDay'],[db[_0x41fc('0x1c')]['fn']('COUNT',db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')]['literal'](_0x41fc('0x2d')))),_0x41fc('0x2e')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x20')))),_0x41fc('0x2f')],[db['sequelize']['fn']('COUNT',db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')]('`state`\x20=\x205,\x201,\x20null'))),_0x41fc('0x30')],[db[_0x41fc('0x1c')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')]('`state`\x20=\x208,\x201,\x20null'))),_0x41fc('0x31')],[db[_0x41fc('0x1c')]['fn']('COUNT',db[_0x41fc('0x1c')]['fn']('IF',db['sequelize'][_0x41fc('0x1f')](_0x41fc('0x32')))),_0x41fc('0x33')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x34')))),'outboundDropCallsDayCallersExit'],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')]['literal']('`state`\x20=\x2012,\x201,\x20null'))),_0x41fc('0x35')],[db[_0x41fc('0x1c')]['fn']('COUNT',db[_0x41fc('0x1c')]['fn']('IF',db['sequelize'][_0x41fc('0x1f')]('`state`\x20=\x2013,\x201,\x20null'))),'outboundBlacklistCallsDay'],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db['sequelize']['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')]('`state`\x20=\x2014,\x201,\x20null'))),_0x41fc('0x36')],[db[_0x41fc('0x1c')]['fn']('COUNT',db[_0x41fc('0x1c')]['fn']('IF',db['sequelize'][_0x41fc('0x1f')](_0x41fc('0x37')))),'outboundRejectCallsDay'],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')][_0x41fc('0x1f')](_0x41fc('0x38')))),'outboundAnswerAgiCallsDay'],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db['sequelize']['literal'](_0x41fc('0x39')))),_0x41fc('0x3a')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db['sequelize']['fn']('IF',db['sequelize'][_0x41fc('0x1f')](_0x41fc('0x3b')))),_0x41fc('0x3c')]],'group':[_0x41fc('0x2b')]})[_0x41fc('0xa')](function(_0x1ee41e){logger[_0x41fc('0x12')](_0x41fc('0x2a'),_0x3762e8);logger[_0x41fc('0xd')](_0x41fc('0x2a'),_0x3762e8,JSON[_0x41fc('0x17')](_0x1ee41e));_0x7205f9(_0x1ee41e);})[_0x41fc('0x18')](function(_0x1c3b1b){logger['error'](_0x41fc('0x2a'),_0x1c3b1b['message'],_0x3762e8);_0x5a7689(_0x166a4c[_0x41fc('0xf')](0x1f4,_0x1c3b1b['message']));});});};exports[_0x41fc('0x3d')]=function(_0x275e62){var _0x39fc03=this;return new Promise(function(_0x45353a,_0x4e6e28){return db['CmHopperHistory'][_0x41fc('0x1a')]({'raw':_0x275e62['options']?_0x275e62[_0x41fc('0x14')][_0x41fc('0x15')]===undefined?!![]:![]:!![],'where':_0x275e62[_0x41fc('0x14')]?_0x275e62[_0x41fc('0x14')][_0x41fc('0x1b')]||null:null,'attributes':[[_0x41fc('0x2b'),'name'],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')][_0x41fc('0x3e')]('id')),_0x41fc('0x3f')],[db[_0x41fc('0x1c')]['fn'](_0x41fc('0x1e'),db[_0x41fc('0x1c')]['fn']('IF',db[_0x41fc('0x1c')]['literal'](_0x41fc('0x20')))),_0x41fc('0x40')]],'group':[_0x41fc('0x2b')]})[_0x41fc('0xa')](function(_0x376dfa){logger[_0x41fc('0x12')]('GetCampaignHopperHistory',_0x275e62);logger['debug'](_0x41fc('0x3d'),_0x275e62,JSON[_0x41fc('0x17')](_0x376dfa));_0x45353a(_0x376dfa);})['catch'](function(_0x642c3a){logger['error'](_0x41fc('0x3d'),_0x642c3a[_0x41fc('0x11')],_0x275e62);_0x4e6e28(_0x39fc03[_0x41fc('0xf')](0x1f4,_0x642c3a[_0x41fc('0x11')]));});});};
\ No newline at end of file
+var _0x2446=['outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','`state`\x20=\x204,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','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','campaign','GetCampaignHopperHistory','name','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','request\x20sent','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','CmHopperHistory,\x20%s,\x20%s','message','catch','CreateCmHopperHistory','create','body','options','raw','debug','AvgHandleTime','where','sequelize','COUNT','col','literal','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','GetVoiceQueueHopperHistory','findAll','`state`\x20=\x200,\x201,\x20null'];(function(_0x304c90,_0x4eb184){var _0x15e363=function(_0x383f72){while(--_0x383f72){_0x304c90['push'](_0x304c90['shift']());}};_0x15e363(++_0x4eb184);}(_0x2446,0xa6));var _0x6244=function(_0x51dd46,_0x3953c4){_0x51dd46=_0x51dd46-0x0;var _0x35c2ab=_0x2446[_0x51dd46];return _0x35c2ab;};'use strict';var _=require(_0x6244('0x0'));var util=require(_0x6244('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x6244('0x2'));var fs=require('fs');var Redis=require(_0x6244('0x3'));var db=require(_0x6244('0x4'))['db'];var utils=require(_0x6244('0x5'));var logger=require(_0x6244('0x6'))(_0x6244('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6244('0x8')][_0x6244('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x14e294,_0x5450a5,_0x3f5fb7){return new BPromise(function(_0x22992a,_0x41965d){return client[_0x6244('0xa')](_0x14e294,_0x3f5fb7)[_0x6244('0xb')](function(_0x539f94){logger[_0x6244('0xc')]('CmHopperHistory,\x20%s,\x20%s',_0x5450a5,_0x6244('0xd'));logger['debug'](_0x6244('0xe'),_0x5450a5,'request\x20sent',JSON[_0x6244('0xf')](_0x539f94));if(_0x539f94[_0x6244('0x10')]){if(_0x539f94['error']['code']===0x1f4){logger['error'](_0x6244('0x11'),_0x5450a5,_0x539f94[_0x6244('0x10')][_0x6244('0x12')]);return _0x41965d(_0x539f94[_0x6244('0x10')][_0x6244('0x12')]);}logger[_0x6244('0x10')](_0x6244('0x11'),_0x5450a5,_0x539f94[_0x6244('0x10')][_0x6244('0x12')]);return _0x22992a(_0x539f94[_0x6244('0x10')]['message']);}else{logger[_0x6244('0xc')](_0x6244('0x11'),_0x5450a5,_0x6244('0xd'));_0x22992a(_0x539f94['result'][_0x6244('0x12')]);}})[_0x6244('0x13')](function(_0x29527b){logger[_0x6244('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x5450a5,_0x29527b);_0x41965d(_0x29527b);});});}exports[_0x6244('0x14')]=function(_0x166a15){var _0x789bb9=this;return new Promise(function(_0x1135e3,_0x5f5da8){return db['CmHopperHistory'][_0x6244('0x15')](_0x166a15[_0x6244('0x16')],{'raw':_0x166a15[_0x6244('0x17')]?_0x166a15[_0x6244('0x17')][_0x6244('0x18')]===undefined?!![]:![]:!![]})[_0x6244('0xb')](function(_0x4b94e4){logger[_0x6244('0xc')](_0x6244('0x14'),_0x166a15);logger[_0x6244('0x19')](_0x6244('0x14'),_0x166a15,JSON['stringify'](_0x4b94e4));_0x1135e3(_0x4b94e4);})[_0x6244('0x13')](function(_0x541e3a){logger[_0x6244('0x10')]('CreateCmHopperHistory',_0x541e3a[_0x6244('0x12')],_0x166a15);_0x5f5da8(_0x789bb9['error'](0x1f4,_0x541e3a[_0x6244('0x12')]));});});};exports[_0x6244('0x1a')]=function(_0x3eac56){var _0xb1ad84=this;return new Promise(function(_0x39e63d,_0x3c54d8){return db['CmHopperHistory']['findAll']({'raw':_0x3eac56[_0x6244('0x17')]?_0x3eac56['options'][_0x6244('0x18')]===undefined?!![]:![]:!![],'where':_0x3eac56[_0x6244('0x17')]?_0x3eac56['options'][_0x6244('0x1b')]||null:null,'attributes':[[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db['sequelize'][_0x6244('0x1e')]('id')),'predictiveIntervalTotalCalls'],[db[_0x6244('0x1c')]['fn']('COUNT',db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')]('`state`\x20=\x204,\x201,\x20null'))),_0x6244('0x20')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x21')))),_0x6244('0x22')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db['sequelize']['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x23')))),_0x6244('0x24')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x25'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x26')))),_0x6244('0x27')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x25'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')]['literal'](_0x6244('0x28')))),'predictiveIntervalAvgTalktime']]})[_0x6244('0xb')](function(_0xdfc1d6){logger['info'](_0x6244('0x1a'),_0x3eac56);logger[_0x6244('0x19')](_0x6244('0x1a'),_0x3eac56,JSON['stringify'](_0xdfc1d6));_0x39e63d(_0xdfc1d6);})[_0x6244('0x13')](function(_0x1d5e35){logger[_0x6244('0x10')]('AvgHandleTime',_0x1d5e35['message'],_0x3eac56);_0x3c54d8(_0xb1ad84[_0x6244('0x10')](0x1f4,_0x1d5e35[_0x6244('0x12')]));});});};exports[_0x6244('0x29')]=function(_0x4437ff){var _0x59cc34=this;return new Promise(function(_0x183036,_0x1407dd){return db['CmHopperHistory'][_0x6244('0x2a')]({'raw':_0x4437ff[_0x6244('0x17')]?_0x4437ff[_0x6244('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x4437ff[_0x6244('0x17')]?_0x4437ff[_0x6244('0x17')][_0x6244('0x1b')]||null:null,'attributes':[['campaign','name'],[db[_0x6244('0x1c')]['fn']('COUNT',db[_0x6244('0x1c')]['fn']('IF',db['sequelize'][_0x6244('0x1f')](_0x6244('0x2b')))),_0x6244('0x2c')],[db[_0x6244('0x1c')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x2d')))),_0x6244('0x2e')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x2f')))),'outboundAnswerCallsDay'],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x30')))),_0x6244('0x31')],[db[_0x6244('0x1c')]['fn']('COUNT',db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')](_0x6244('0x32')))),'outboundCongestionCallsDay'],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db['sequelize']['literal'](_0x6244('0x33')))),_0x6244('0x34')],[db[_0x6244('0x1c')]['fn']('COUNT',db[_0x6244('0x1c')]['fn']('IF',db['sequelize'][_0x6244('0x1f')](_0x6244('0x35')))),_0x6244('0x36')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x6244('0x37')))),_0x6244('0x38')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')][_0x6244('0x1f')]('`state`\x20=\x2013,\x201,\x20null'))),_0x6244('0x39')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db['sequelize']['fn']('IF',db[_0x6244('0x1c')]['literal'](_0x6244('0x3a')))),_0x6244('0x3b')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x6244('0x3c')))),_0x6244('0x3d')],[db['sequelize']['fn']('COUNT',db[_0x6244('0x1c')]['fn']('IF',db['sequelize']['literal'](_0x6244('0x3e')))),_0x6244('0x3f')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db['sequelize'][_0x6244('0x1f')](_0x6244('0x40')))),_0x6244('0x3d')],[db[_0x6244('0x1c')]['fn'](_0x6244('0x1d'),db['sequelize']['fn']('IF',db[_0x6244('0x1c')]['literal'](_0x6244('0x41')))),_0x6244('0x42')]],'group':[_0x6244('0x43')]})[_0x6244('0xb')](function(_0x5e87f9){logger[_0x6244('0xc')]('GetVoiceQueueHopperHistory',_0x4437ff);logger[_0x6244('0x19')](_0x6244('0x29'),_0x4437ff,JSON[_0x6244('0xf')](_0x5e87f9));_0x183036(_0x5e87f9);})[_0x6244('0x13')](function(_0x3035b7){logger[_0x6244('0x10')]('GetVoiceQueueHopperHistory',_0x3035b7[_0x6244('0x12')],_0x4437ff);_0x1407dd(_0x59cc34[_0x6244('0x10')](0x1f4,_0x3035b7[_0x6244('0x12')]));});});};exports[_0x6244('0x44')]=function(_0xe14c1b){var _0x10ec67=this;return new Promise(function(_0x19bf73,_0x72e14b){return db['CmHopperHistory'][_0x6244('0x2a')]({'raw':_0xe14c1b[_0x6244('0x17')]?_0xe14c1b[_0x6244('0x17')][_0x6244('0x18')]===undefined?!![]:![]:!![],'where':_0xe14c1b[_0x6244('0x17')]?_0xe14c1b[_0x6244('0x17')][_0x6244('0x1b')]||null:null,'attributes':[[_0x6244('0x43'),_0x6244('0x45')],[db['sequelize']['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['col']('id')),'ivrTotalCallsDays'],[db['sequelize']['fn'](_0x6244('0x1d'),db[_0x6244('0x1c')]['fn']('IF',db[_0x6244('0x1c')]['literal'](_0x6244('0x2f')))),'ivrAnswerCallsDay']],'group':[_0x6244('0x43')]})[_0x6244('0xb')](function(_0x5a5507){logger['info'](_0x6244('0x44'),_0xe14c1b);logger['debug'](_0x6244('0x44'),_0xe14c1b,JSON[_0x6244('0xf')](_0x5a5507));_0x19bf73(_0x5a5507);})[_0x6244('0x13')](function(_0x7037c8){logger['error']('GetCampaignHopperHistory',_0x7037c8['message'],_0xe14c1b);_0x72e14b(_0x10ec67[_0x6244('0x10')](0x1f4,_0x7037c8[_0x6244('0x12')]));});});};
\ No newline at end of file