Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / saInvoiceNumber / saInvoiceNumber.rpc.js
index 2b73028..b5b257b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5667=['debug','SAInvoiceNumber,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','SAInvoiceNumber,\x20%s,\x20%s','request\x20sent'];(function(_0x4eaeff,_0x2b687){var _0x1c1a40=function(_0x365bae){while(--_0x365bae){_0x4eaeff['push'](_0x4eaeff['shift']());}};_0x1c1a40(++_0x2b687);}(_0x5667,0x1ad));var _0x7566=function(_0x34b959,_0x11e15f){_0x34b959=_0x34b959-0x0;var _0x2734ba=_0x5667[_0x34b959];return _0x2734ba;};'use strict';var _=require('lodash');var util=require(_0x7566('0x0'));var moment=require(_0x7566('0x1'));var BPromise=require(_0x7566('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7566('0x3'))['db'];var utils=require(_0x7566('0x4'));var logger=require(_0x7566('0x5'))('rpc');var config=require(_0x7566('0x6'));var jayson=require(_0x7566('0x7'));var client=jayson[_0x7566('0x8')][_0x7566('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5ee5be,_0x3a3b2e,_0xb73de0){return new BPromise(function(_0x1d54f4,_0x152e76){return client['request'](_0x5ee5be,_0xb73de0)['then'](function(_0x33c77f){logger['info'](_0x7566('0xa'),_0x3a3b2e,_0x7566('0xb'));logger[_0x7566('0xc')](_0x7566('0xd'),_0x3a3b2e,_0x7566('0xb'),JSON[_0x7566('0xe')](_0x33c77f));if(_0x33c77f[_0x7566('0xf')]){if(_0x33c77f[_0x7566('0xf')][_0x7566('0x10')]===0x1f4){logger[_0x7566('0xf')](_0x7566('0xa'),_0x3a3b2e,_0x33c77f['error']['message']);return _0x152e76(_0x33c77f[_0x7566('0xf')][_0x7566('0x11')]);}logger[_0x7566('0xf')](_0x7566('0xa'),_0x3a3b2e,_0x33c77f['error'][_0x7566('0x11')]);return _0x1d54f4(_0x33c77f[_0x7566('0xf')][_0x7566('0x11')]);}else{logger[_0x7566('0x12')](_0x7566('0xa'),_0x3a3b2e,'request\x20sent');_0x1d54f4(_0x33c77f[_0x7566('0x13')]['message']);}})[_0x7566('0x14')](function(_0x2dac0b){logger[_0x7566('0xf')](_0x7566('0xa'),_0x3a3b2e,_0x2dac0b);_0x152e76(_0x2dac0b);});});}
\ No newline at end of file
+var _0xf743=['http','request','then','info','SAInvoiceNumber,\x20%s,\x20%s','request\x20sent','debug','SAInvoiceNumber,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x57abe9,_0x35d265){var _0x13a02d=function(_0x3080fa){while(--_0x3080fa){_0x57abe9['push'](_0x57abe9['shift']());}};_0x13a02d(++_0x35d265);}(_0xf743,0x188));var _0x3f74=function(_0x4cccb7,_0x528880){_0x4cccb7=_0x4cccb7-0x0;var _0x8fa7f6=_0xf743[_0x4cccb7];return _0x8fa7f6;};'use strict';var _=require(_0x3f74('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x3f74('0x1'));var logger=require(_0x3f74('0x2'))(_0x3f74('0x3'));var config=require(_0x3f74('0x4'));var jayson=require(_0x3f74('0x5'));var client=jayson[_0x3f74('0x6')][_0x3f74('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x43dc85,_0x2ffcda,_0x1f4b65){return new BPromise(function(_0x40b598,_0x13a291){return client[_0x3f74('0x8')](_0x43dc85,_0x1f4b65)[_0x3f74('0x9')](function(_0x668849){logger[_0x3f74('0xa')](_0x3f74('0xb'),_0x2ffcda,_0x3f74('0xc'));logger[_0x3f74('0xd')](_0x3f74('0xe'),_0x2ffcda,_0x3f74('0xc'),JSON[_0x3f74('0xf')](_0x668849));if(_0x668849[_0x3f74('0x10')]){if(_0x668849['error'][_0x3f74('0x11')]===0x1f4){logger[_0x3f74('0x10')]('SAInvoiceNumber,\x20%s,\x20%s',_0x2ffcda,_0x668849[_0x3f74('0x10')][_0x3f74('0x12')]);return _0x13a291(_0x668849['error'][_0x3f74('0x12')]);}logger[_0x3f74('0x10')](_0x3f74('0xb'),_0x2ffcda,_0x668849['error'][_0x3f74('0x12')]);return _0x40b598(_0x668849['error'][_0x3f74('0x12')]);}else{logger[_0x3f74('0xa')](_0x3f74('0xb'),_0x2ffcda,'request\x20sent');_0x40b598(_0x668849[_0x3f74('0x13')][_0x3f74('0x12')]);}})[_0x3f74('0x14')](function(_0x3a25ac){logger[_0x3f74('0x10')]('SAInvoiceNumber,\x20%s,\x20%s',_0x2ffcda,_0x3a25ac);_0x13a291(_0x3a25ac);});});}
\ No newline at end of file