Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / api / voiceTransferReport / voiceTransferReport.controller.js
index 5e66bb9..f0c5c94 100644 (file)
@@ -1 +1 @@
-const a776_0x9b24=['length','sequelize','stack','end','fields','findOne','../../components/parsers/qs','filter','params','create','rows','../../config/logger','limit','sort','intersection','includeAll','api','map','order','VIRTUAL','status','like','error','where','merge','query','undefined','VoiceTransferReport','model','pick','key','set','keys','index','include','findAll','catch','destroy','body','json','attributes','rawAttributes','send','sendStatus','filters','type','nolimit','then','offset','name','count','options'];(function(_0x310e08,_0x9b2460){const _0x428c8e=function(_0x16be15){while(--_0x16be15){_0x310e08['push'](_0x310e08['shift']());}};_0x428c8e(++_0x9b2460);}(a776_0x9b24,0x162));const a776_0x428c=function(_0x310e08,_0x9b2460){_0x310e08=_0x310e08-0x0;let _0x428c8e=a776_0x9b24[_0x310e08];return _0x428c8e;};const _0x2a8bfa=a776_0x428c;'use strict';const _=require('lodash'),qs=require(_0x2a8bfa('0x10')),logger=require(_0x2a8bfa('0x15'))(_0x2a8bfa('0x1a')),db=require('../../mysqldb')['db'],{Op}=require(_0x2a8bfa('0xb'));function respondWithResult(_0x16be15,_0x385322){return _0x385322=_0x385322||0xc8,function(_0x3bf4d7){const _0x1c84a7=a776_0x428c;if(_0x3bf4d7)return _0x16be15[_0x1c84a7('0x1e')](_0x385322)[_0x1c84a7('0x31')](_0x3bf4d7);};}function respondWithFilteredResult(_0x518cab,_0x1ad00b){return function(_0x24236b){const _0x1306b6=a776_0x428c;if(_0x24236b){const _0x1ab759=_0x24236b['count'],_0x588131=_0x1ad00b[_0x1306b6('0x6')];let _0xaa2962=_0x1ad00b[_0x1306b6('0x6')]+_0x1ad00b[_0x1306b6('0x16')],_0x2f34e4;return _0xaa2962>=_0x1ab759?(_0xaa2962=_0x1ab759,_0x2f34e4=0xc8):_0x2f34e4=0xce,_0x518cab[_0x1306b6('0x1e')](_0x2f34e4),_0x518cab[_0x1306b6('0x29')]('Content-Range',_0x588131+'-'+_0xaa2962+'/'+_0x1ab759)[_0x1306b6('0x31')](_0x24236b);}return null;};}function saveUpdates(_0xd2a4f){return function(_0x43a7a8){const _0x280091=a776_0x428c;if(_0x43a7a8)return _0x43a7a8['update'](_0xd2a4f)[_0x280091('0x5')](function(_0x260595){return _0x260595;});return null;};}function removeEntity(_0x2409e0){return function(_0x2ef408){const _0x18327b=a776_0x428c;if(_0x2ef408)return _0x2ef408[_0x18327b('0x2f')]()[_0x18327b('0x5')](function(){const _0x355615=_0x18327b;_0x2409e0['status'](0xcc)[_0x355615('0xd')]();});};}function handleEntityNotFound(_0xe3bfbc){return function(_0x6d895b){const _0x558ea0=a776_0x428c;return!_0x6d895b&&_0xe3bfbc[_0x558ea0('0x1')](0x194),_0x6d895b;};}function handleError(_0x5885a4,_0x2ce2a9){return _0x2ce2a9=_0x2ce2a9||0x1f4,function(_0x212716){const _0x3e8975=a776_0x428c;logger[_0x3e8975('0x20')](_0x212716[_0x3e8975('0xc')]),_0x212716[_0x3e8975('0x7')]&&delete _0x212716[_0x3e8975('0x7')],_0x5885a4[_0x3e8975('0x1e')](_0x2ce2a9)[_0x3e8975('0x0')](_0x212716);};}exports[_0x2a8bfa('0x2b')]=function(_0x3f4dbe,_0x348e9a){const _0x11ef4f=_0x2a8bfa;let _0x2ee24d={};const _0x31315b={},_0x1fe8ba={'count':0x0,'rows':[]},_0x404010=_[_0x11ef4f('0x1b')](db[_0x11ef4f('0x25')][_0x11ef4f('0x33')],function(_0x2b23ae){const _0x3b6584=_0x11ef4f;return{'name':_0x2b23ae['fieldName'],'type':_0x2b23ae[_0x3b6584('0x3')][_0x3b6584('0x28')]};});_0x31315b[_0x11ef4f('0x26')]=_[_0x11ef4f('0x1b')](_0x404010,'name'),_0x31315b[_0x11ef4f('0x23')]=_[_0x11ef4f('0x2a')](_0x3f4dbe['query']),_0x31315b[_0x11ef4f('0x2')]=_[_0x11ef4f('0x18')](_0x31315b[_0x11ef4f('0x26')],_0x31315b[_0x11ef4f('0x23')]),_0x2ee24d[_0x11ef4f('0x32')]=_['intersection'](_0x31315b['model'],qs[_0x11ef4f('0xe')](_0x3f4dbe[_0x11ef4f('0x23')][_0x11ef4f('0xe')])),_0x2ee24d[_0x11ef4f('0x32')]=_0x2ee24d['attributes'][_0x11ef4f('0xa')]?_0x2ee24d['attributes']:_0x31315b[_0x11ef4f('0x26')];typeof _0x3f4dbe[_0x11ef4f('0x23')][_0x11ef4f('0x4')]===_0x11ef4f('0x24')&&(_0x2ee24d[_0x11ef4f('0x16')]=qs['limit'](_0x3f4dbe[_0x11ef4f('0x23')][_0x11ef4f('0x16')]),_0x2ee24d[_0x11ef4f('0x6')]=qs['offset'](_0x3f4dbe[_0x11ef4f('0x23')][_0x11ef4f('0x6')]));_0x2ee24d[_0x11ef4f('0x1c')]=qs[_0x11ef4f('0x17')](_0x3f4dbe[_0x11ef4f('0x23')][_0x11ef4f('0x17')]),_0x2ee24d[_0x11ef4f('0x21')]=qs[_0x11ef4f('0x2')](_[_0x11ef4f('0x27')](_0x3f4dbe[_0x11ef4f('0x23')],_0x31315b[_0x11ef4f('0x2')]),_0x404010);_0x3f4dbe['query'][_0x11ef4f('0x11')]&&(_0x2ee24d[_0x11ef4f('0x21')]=_[_0x11ef4f('0x22')](_0x2ee24d[_0x11ef4f('0x21')],{[Op['or']]:_[_0x11ef4f('0x1b')](_0x404010,function(_0xabc302){const _0x1b364f=_0x11ef4f;if(_0xabc302[_0x1b364f('0x3')]!==_0x1b364f('0x1d')){const _0x145633={};return _0x145633[_0xabc302[_0x1b364f('0x7')]]={[Op[_0x1b364f('0x1f')]]:'%'+_0x3f4dbe[_0x1b364f('0x23')][_0x1b364f('0x11')]+'%'},_0x145633;}})}));_0x2ee24d=_[_0x11ef4f('0x22')]({},_0x2ee24d,_0x3f4dbe[_0x11ef4f('0x9')]);const _0x3f9521={'where':_0x2ee24d[_0x11ef4f('0x21')]};return db['VoiceTransferReport'][_0x11ef4f('0x8')](_0x3f9521)[_0x11ef4f('0x5')](function(_0x1639fb){const _0x201ee5=_0x11ef4f;return _0x1fe8ba[_0x201ee5('0x8')]=_0x1639fb,_0x3f4dbe['query'][_0x201ee5('0x19')]&&(_0x2ee24d[_0x201ee5('0x2c')]=[{'all':!![]}]),db[_0x201ee5('0x25')][_0x201ee5('0x2d')](_0x2ee24d);})['then'](function(_0x40cfd2){const _0x329f0d=_0x11ef4f;return _0x1fe8ba[_0x329f0d('0x14')]=_0x40cfd2,_0x1fe8ba;})[_0x11ef4f('0x5')](respondWithFilteredResult(_0x348e9a,_0x2ee24d))[_0x11ef4f('0x2e')](handleError(_0x348e9a,null));},exports['show']=function(_0x4b8312,_0x26ae90){const _0x240d13=_0x2a8bfa;let _0x4dfc76={'raw':!![],'where':{'id':_0x4b8312['params']['id']}};const _0x2e64cf={};return _0x2e64cf[_0x240d13('0x26')]=_[_0x240d13('0x2a')](db[_0x240d13('0x25')]['rawAttributes']),_0x2e64cf[_0x240d13('0x23')]=_[_0x240d13('0x2a')](_0x4b8312[_0x240d13('0x23')]),_0x2e64cf[_0x240d13('0x2')]=_[_0x240d13('0x18')](_0x2e64cf[_0x240d13('0x26')],_0x2e64cf['query']),_0x4dfc76[_0x240d13('0x32')]=_[_0x240d13('0x18')](_0x2e64cf[_0x240d13('0x26')],qs[_0x240d13('0xe')](_0x4b8312[_0x240d13('0x23')]['fields'])),_0x4dfc76[_0x240d13('0x32')]=_0x4dfc76['attributes'][_0x240d13('0xa')]?_0x4dfc76[_0x240d13('0x32')]:_0x2e64cf['model'],_0x4b8312[_0x240d13('0x23')][_0x240d13('0x19')]&&(_0x4dfc76['include']=[{'all':!![]}]),_0x4dfc76=_['merge']({},_0x4dfc76,_0x4b8312[_0x240d13('0x9')]),db[_0x240d13('0x25')][_0x240d13('0xf')](_0x4dfc76)[_0x240d13('0x5')](handleEntityNotFound(_0x26ae90,null))[_0x240d13('0x5')](respondWithResult(_0x26ae90,null))[_0x240d13('0x2e')](handleError(_0x26ae90,null));},exports['create']=function(_0x262eb7,_0x352cdb){const _0x4175df=_0x2a8bfa;return db['VoiceTransferReport'][_0x4175df('0x13')](_0x262eb7[_0x4175df('0x30')],{})[_0x4175df('0x5')](respondWithResult(_0x352cdb,0xc9))[_0x4175df('0x2e')](handleError(_0x352cdb,null));},exports['update']=function(_0x173d3a,_0x133b25){const _0x56a106=_0x2a8bfa;return _0x173d3a[_0x56a106('0x30')]['id']&&delete _0x173d3a[_0x56a106('0x30')]['id'],db['VoiceTransferReport'][_0x56a106('0xf')]({'where':{'id':_0x173d3a['params']['id']}})[_0x56a106('0x5')](handleEntityNotFound(_0x133b25,null))['then'](saveUpdates(_0x173d3a[_0x56a106('0x30')],null))[_0x56a106('0x5')](respondWithResult(_0x133b25,null))[_0x56a106('0x2e')](handleError(_0x133b25,null));},exports['destroy']=function(_0x4e91d1,_0x203343){const _0x1fecb2=_0x2a8bfa;return db['VoiceTransferReport'][_0x1fecb2('0xf')]({'where':{'id':_0x4e91d1[_0x1fecb2('0x12')]['id']}})[_0x1fecb2('0x5')](handleEntityNotFound(_0x203343,null))[_0x1fecb2('0x5')](removeEntity(_0x203343,null))[_0x1fecb2('0x2e')](handleError(_0x203343,null));};
\ No newline at end of file
+const a776_0x3de9=['stack','update','catch','count','show','findAll','VIRTUAL','merge','offset','keys','VoiceTransferReport','like','length','model','pick','name','map','lodash','filters','include','where','then','intersection','query','params','../../components/parsers/qs','rows','end','options','set','create','includeAll','key','body','sequelize','order','destroy','findOne','sort','nolimit','../../config/logger','rawAttributes','status','limit','json','type','sendStatus','fields','attributes','filter'];(function(_0x7b9432,_0x3de9df){const _0x19286e=function(_0x25e4f6){while(--_0x25e4f6){_0x7b9432['push'](_0x7b9432['shift']());}};_0x19286e(++_0x3de9df);}(a776_0x3de9,0x1db));const a776_0x1928=function(_0x7b9432,_0x3de9df){_0x7b9432=_0x7b9432-0x0;let _0x19286e=a776_0x3de9[_0x7b9432];return _0x19286e;};const _0x3a682b=a776_0x1928;'use strict';const _=require(_0x3a682b('0x2a')),qs=require(_0x3a682b('0x0')),logger=require(_0x3a682b('0xf'))('api'),db=require('../../mysqldb')['db'],{Op}=require(_0x3a682b('0x9'));function respondWithResult(_0x25e4f6,_0x54dee8){return _0x54dee8=_0x54dee8||0xc8,function(_0x5c79a2){const _0x244b80=a776_0x1928;if(_0x5c79a2)return _0x25e4f6[_0x244b80('0x11')](_0x54dee8)[_0x244b80('0x13')](_0x5c79a2);};}function respondWithFilteredResult(_0x53aec7,_0x3dc0d1){return function(_0x21b170){const _0x2b6f73=a776_0x1928;if(_0x21b170){const _0x482bb2=_0x21b170[_0x2b6f73('0x1c')],_0x43edc2=_0x3dc0d1[_0x2b6f73('0x21')];let _0x35be06=_0x3dc0d1[_0x2b6f73('0x21')]+_0x3dc0d1[_0x2b6f73('0x12')],_0x3a3eb1;return _0x35be06>=_0x482bb2?(_0x35be06=_0x482bb2,_0x3a3eb1=0xc8):_0x3a3eb1=0xce,_0x53aec7[_0x2b6f73('0x11')](_0x3a3eb1),_0x53aec7[_0x2b6f73('0x4')]('Content-Range',_0x43edc2+'-'+_0x35be06+'/'+_0x482bb2)['json'](_0x21b170);}return null;};}function saveUpdates(_0x46975e){return function(_0x35f3d7){if(_0x35f3d7)return _0x35f3d7['update'](_0x46975e)['then'](function(_0x39c366){return _0x39c366;});return null;};}function removeEntity(_0x101575){return function(_0x216442){if(_0x216442)return _0x216442['destroy']()['then'](function(){const _0x418bc9=a776_0x1928;_0x101575[_0x418bc9('0x11')](0xcc)[_0x418bc9('0x2')]();});};}function handleEntityNotFound(_0xa8db67){return function(_0x4d8555){const _0x6e2743=a776_0x1928;return!_0x4d8555&&_0xa8db67[_0x6e2743('0x15')](0x194),_0x4d8555;};}function handleError(_0x4fa214,_0x2dac10){return _0x2dac10=_0x2dac10||0x1f4,function(_0x23cb57){const _0x11d7c9=a776_0x1928;logger['error'](_0x23cb57[_0x11d7c9('0x19')]),_0x23cb57[_0x11d7c9('0x28')]&&delete _0x23cb57[_0x11d7c9('0x28')],_0x4fa214['status'](_0x2dac10)['send'](_0x23cb57);};}exports['index']=function(_0x51379c,_0x4d61df){const _0x188d26=_0x3a682b;let _0x3513a2={};const _0x3e2679={},_0x4079fc={'count':0x0,'rows':[]},_0x45a206=_[_0x188d26('0x29')](db[_0x188d26('0x23')][_0x188d26('0x10')],function(_0x4b7214){const _0x1d0a2a=_0x188d26;return{'name':_0x4b7214['fieldName'],'type':_0x4b7214[_0x1d0a2a('0x14')][_0x1d0a2a('0x7')]};});_0x3e2679['model']=_[_0x188d26('0x29')](_0x45a206,_0x188d26('0x28')),_0x3e2679[_0x188d26('0x30')]=_['keys'](_0x51379c[_0x188d26('0x30')]),_0x3e2679[_0x188d26('0x2b')]=_[_0x188d26('0x2f')](_0x3e2679[_0x188d26('0x26')],_0x3e2679[_0x188d26('0x30')]),_0x3513a2[_0x188d26('0x17')]=_[_0x188d26('0x2f')](_0x3e2679[_0x188d26('0x26')],qs[_0x188d26('0x16')](_0x51379c[_0x188d26('0x30')][_0x188d26('0x16')])),_0x3513a2[_0x188d26('0x17')]=_0x3513a2[_0x188d26('0x17')]['length']?_0x3513a2[_0x188d26('0x17')]:_0x3e2679['model'];typeof _0x51379c[_0x188d26('0x30')][_0x188d26('0xe')]==='undefined'&&(_0x3513a2['limit']=qs['limit'](_0x51379c[_0x188d26('0x30')][_0x188d26('0x12')]),_0x3513a2[_0x188d26('0x21')]=qs['offset'](_0x51379c[_0x188d26('0x30')][_0x188d26('0x21')]));_0x3513a2[_0x188d26('0xa')]=qs[_0x188d26('0xd')](_0x51379c[_0x188d26('0x30')][_0x188d26('0xd')]),_0x3513a2[_0x188d26('0x2d')]=qs[_0x188d26('0x2b')](_[_0x188d26('0x27')](_0x51379c[_0x188d26('0x30')],_0x3e2679[_0x188d26('0x2b')]),_0x45a206);_0x51379c[_0x188d26('0x30')][_0x188d26('0x18')]&&(_0x3513a2['where']=_[_0x188d26('0x20')](_0x3513a2[_0x188d26('0x2d')],{[Op['or']]:_['map'](_0x45a206,function(_0x1fe613){const _0x3fb7c6=_0x188d26;if(_0x1fe613[_0x3fb7c6('0x14')]!==_0x3fb7c6('0x1f')){const _0x354456={};return _0x354456[_0x1fe613[_0x3fb7c6('0x28')]]={[Op[_0x3fb7c6('0x24')]]:'%'+_0x51379c[_0x3fb7c6('0x30')]['filter']+'%'},_0x354456;}})}));_0x3513a2=_['merge']({},_0x3513a2,_0x51379c[_0x188d26('0x3')]);const _0x5ac53b={'where':_0x3513a2[_0x188d26('0x2d')]};return db['VoiceTransferReport'][_0x188d26('0x1c')](_0x5ac53b)[_0x188d26('0x2e')](function(_0x168e24){const _0x3c7f6b=_0x188d26;return _0x4079fc[_0x3c7f6b('0x1c')]=_0x168e24,_0x51379c[_0x3c7f6b('0x30')][_0x3c7f6b('0x6')]&&(_0x3513a2['include']=[{'all':!![]}]),db[_0x3c7f6b('0x23')][_0x3c7f6b('0x1e')](_0x3513a2);})[_0x188d26('0x2e')](function(_0x464af6){const _0x3fa98a=_0x188d26;return _0x4079fc[_0x3fa98a('0x1')]=_0x464af6,_0x4079fc;})[_0x188d26('0x2e')](respondWithFilteredResult(_0x4d61df,_0x3513a2))[_0x188d26('0x1b')](handleError(_0x4d61df,null));},exports[_0x3a682b('0x1d')]=function(_0x336ed8,_0x2de0df){const _0x37a2b1=_0x3a682b;let _0x3555ee={'raw':!![],'where':{'id':_0x336ed8[_0x37a2b1('0x31')]['id']}};const _0x557c1d={};return _0x557c1d[_0x37a2b1('0x26')]=_[_0x37a2b1('0x22')](db[_0x37a2b1('0x23')]['rawAttributes']),_0x557c1d[_0x37a2b1('0x30')]=_['keys'](_0x336ed8[_0x37a2b1('0x30')]),_0x557c1d['filters']=_[_0x37a2b1('0x2f')](_0x557c1d[_0x37a2b1('0x26')],_0x557c1d[_0x37a2b1('0x30')]),_0x3555ee['attributes']=_[_0x37a2b1('0x2f')](_0x557c1d[_0x37a2b1('0x26')],qs[_0x37a2b1('0x16')](_0x336ed8[_0x37a2b1('0x30')][_0x37a2b1('0x16')])),_0x3555ee[_0x37a2b1('0x17')]=_0x3555ee[_0x37a2b1('0x17')][_0x37a2b1('0x25')]?_0x3555ee[_0x37a2b1('0x17')]:_0x557c1d[_0x37a2b1('0x26')],_0x336ed8[_0x37a2b1('0x30')]['includeAll']&&(_0x3555ee[_0x37a2b1('0x2c')]=[{'all':!![]}]),_0x3555ee=_[_0x37a2b1('0x20')]({},_0x3555ee,_0x336ed8[_0x37a2b1('0x3')]),db[_0x37a2b1('0x23')][_0x37a2b1('0xc')](_0x3555ee)[_0x37a2b1('0x2e')](handleEntityNotFound(_0x2de0df,null))[_0x37a2b1('0x2e')](respondWithResult(_0x2de0df,null))[_0x37a2b1('0x1b')](handleError(_0x2de0df,null));},exports[_0x3a682b('0x5')]=function(_0x30df98,_0x1061b9){const _0x262f14=_0x3a682b;return db[_0x262f14('0x23')][_0x262f14('0x5')](_0x30df98['body'],{})[_0x262f14('0x2e')](respondWithResult(_0x1061b9,0xc9))[_0x262f14('0x1b')](handleError(_0x1061b9,null));},exports[_0x3a682b('0x1a')]=function(_0x323c22,_0x5bb60c){const _0x295c27=_0x3a682b;return _0x323c22[_0x295c27('0x8')]['id']&&delete _0x323c22[_0x295c27('0x8')]['id'],db[_0x295c27('0x23')][_0x295c27('0xc')]({'where':{'id':_0x323c22[_0x295c27('0x31')]['id']}})[_0x295c27('0x2e')](handleEntityNotFound(_0x5bb60c,null))[_0x295c27('0x2e')](saveUpdates(_0x323c22['body'],null))[_0x295c27('0x2e')](respondWithResult(_0x5bb60c,null))[_0x295c27('0x1b')](handleError(_0x5bb60c,null));},exports[_0x3a682b('0xb')]=function(_0xa649b0,_0x4bb6bb){const _0x11c8b6=_0x3a682b;return db[_0x11c8b6('0x23')][_0x11c8b6('0xc')]({'where':{'id':_0xa649b0['params']['id']}})[_0x11c8b6('0x2e')](handleEntityNotFound(_0x4bb6bb,null))[_0x11c8b6('0x2e')](removeEntity(_0x4bb6bb,null))[_0x11c8b6('0x1b')](handleError(_0x4bb6bb,null));};
\ No newline at end of file