97ec646f885425225e526f77e180363f9f5609d8
[motion.git] / server / api / report_mail / report_mail.controller.js
1 var _0x8640=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x8640[0];var _=require(_0x8640[1]);var moment=require(_0x8640[2]);var Report=require(_0x8640[4])[_0x8640[3]];var Room=require(_0x8640[4])[_0x8640[5]];var Status=require(_0x8640[4])[_0x8640[6]];var sequelize=require(_0x8640[4])[_0x8640[7]];var Util=require(_0x8640[8]);var logger=require(_0x8640[10])(_0x8640[9]);exports[_0x8640[11]]= function(_0x2824x9,_0x2824xa,_0x2824xb){var _0x2824xc={};if(_0x2824x9[_0x8640[13]][_0x8640[12]]=== _0x8640[14]){_0x2824xc[_0x8640[15]]= _0x2824x9[_0x8640[13]][_0x8640[16]]};return Report[_0x8640[23]](Util[_0x8640[22]](_0x2824x9[_0x8640[21]],_0x2824xc))[_0x8640[20]](function(_0x2824xe){_0x2824xa[_0x8640[19]](200)[_0x8640[18]](_0x2824xe)})[_0x8640[17]](function(_0x2824xd){return handleError(_0x2824xa,_0x2824xd)})};exports[_0x8640[24]]= function(_0x2824x9,_0x2824xa){var _0x2824xf=_0x2824x9[_0x8640[28]][_0x8640[27]][_0x8640[26]](_0x8640[25])[1];return Report[_0x8640[35]](_0x2824x9[_0x8640[28]][_0x8640[34]])[_0x8640[20]](function(_0x2824x10){if(!_0x2824x10){return _0x2824xa[_0x8640[29]](404)};var _0x2824x11=_[_0x8640[32]](_0x2824x10,{connectid:_0x2824x9[_0x8640[28]][_0x8640[27]]});return _0x2824x11[_0x8640[33]]()})[_0x8640[20]](function(){return Room[_0x8640[31]]({status:_0x8640[30],openReason:_0x8640[14]},{where:{id:_0x2824xf},user:_0x2824x9[_0x8640[13]],individualHooks:true})})[_0x8640[20]](function(){return _0x2824xa[_0x8640[29]](200)})[_0x8640[17]](sequelize.UniqueConstraintError,function(_0x2824xd){return _0x2824xa[_0x8640[29]](504)})[_0x8640[17]](function(_0x2824xd){return handleError(_0x2824xa,_0x2824xd)})};exports[_0x8640[36]]= function(_0x2824x9,_0x2824xa){var _0x2824x12;return Report[_0x8640[35]](_0x2824x9[_0x8640[28]][_0x8640[34]])[_0x8640[20]](function(_0x2824x13){_0x2824x12= _0x2824x13;if(!_0x2824x12){return _0x2824xa[_0x8640[29]](404)};var _0x2824x11=_[_0x8640[32]](_0x2824x13,{rejectedAt:moment()[_0x8640[42]](_0x8640[41])});return _0x2824x11[_0x8640[33]]()})[_0x8640[20]](function(){return Status[_0x8640[40]]({status:_0x8640[37],data1:_0x2824x9[_0x8640[13]][_0x8640[16]],data2:_0x2824x9[_0x8640[13]][_0x8640[38]],UserId:_0x2824x9[_0x8640[13]][_0x8640[34]],MailRoomId:_0x2824x12[_0x8640[39]]})})[_0x8640[20]](function(){return _0x2824xa[_0x8640[29]](200)})[_0x8640[17]](function(_0x2824xd){return handleError(_0x2824xa,_0x2824xd)})};function handleError(_0x2824xa,_0x2824xd){logger[_0x8640[44]](_0x2824xd[_0x8640[43]]);return _0x2824xa[_0x8640[19]](500)[_0x8640[18]](_0x2824xd)}