b08bdf1c11eb51d1f4723ff1f90c985563979950
[motion.git] / server / api / report_mail / report_mail.controller.js
1 var _0x42fe=["\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"];_0x42fe[0];var _=require(_0x42fe[1]);var moment=require(_0x42fe[2]);var Report=require(_0x42fe[4])[_0x42fe[3]];var Room=require(_0x42fe[4])[_0x42fe[5]];var Status=require(_0x42fe[4])[_0x42fe[6]];var sequelize=require(_0x42fe[4])[_0x42fe[7]];var Util=require(_0x42fe[8]);var logger=require(_0x42fe[10])(_0x42fe[9]);exports[_0x42fe[11]]= function(_0x6b9fx9,_0x6b9fxa,_0x6b9fxb){var _0x6b9fxc={};if(_0x6b9fx9[_0x42fe[13]][_0x42fe[12]]=== _0x42fe[14]){_0x6b9fxc[_0x42fe[15]]= _0x6b9fx9[_0x42fe[13]][_0x42fe[16]]};return Report[_0x42fe[23]](Util[_0x42fe[22]](_0x6b9fx9[_0x42fe[21]],_0x6b9fxc))[_0x42fe[20]](function(_0x6b9fxe){_0x6b9fxa[_0x42fe[19]](200)[_0x42fe[18]](_0x6b9fxe)})[_0x42fe[17]](function(_0x6b9fxd){return handleError(_0x6b9fxa,_0x6b9fxd)})};exports[_0x42fe[24]]= function(_0x6b9fx9,_0x6b9fxa){var _0x6b9fxf=_0x6b9fx9[_0x42fe[28]][_0x42fe[27]][_0x42fe[26]](_0x42fe[25])[1];return Report[_0x42fe[35]](_0x6b9fx9[_0x42fe[28]][_0x42fe[34]])[_0x42fe[20]](function(_0x6b9fx10){if(!_0x6b9fx10){return _0x6b9fxa[_0x42fe[29]](404)};var _0x6b9fx11=_[_0x42fe[32]](_0x6b9fx10,{connectid:_0x6b9fx9[_0x42fe[28]][_0x42fe[27]]});return _0x6b9fx11[_0x42fe[33]]()})[_0x42fe[20]](function(){return Room[_0x42fe[31]]({status:_0x42fe[30],openReason:_0x42fe[14]},{where:{id:_0x6b9fxf},user:_0x6b9fx9[_0x42fe[13]],individualHooks:true})})[_0x42fe[20]](function(){return _0x6b9fxa[_0x42fe[29]](200)})[_0x42fe[17]](sequelize.UniqueConstraintError,function(_0x6b9fxd){return _0x6b9fxa[_0x42fe[29]](504)})[_0x42fe[17]](function(_0x6b9fxd){return handleError(_0x6b9fxa,_0x6b9fxd)})};exports[_0x42fe[36]]= function(_0x6b9fx9,_0x6b9fxa){var _0x6b9fx12;return Report[_0x42fe[35]](_0x6b9fx9[_0x42fe[28]][_0x42fe[34]])[_0x42fe[20]](function(_0x6b9fx13){_0x6b9fx12= _0x6b9fx13;if(!_0x6b9fx12){return _0x6b9fxa[_0x42fe[29]](404)};var _0x6b9fx11=_[_0x42fe[32]](_0x6b9fx13,{rejectedAt:moment()[_0x42fe[42]](_0x42fe[41])});return _0x6b9fx11[_0x42fe[33]]()})[_0x42fe[20]](function(){return Status[_0x42fe[40]]({status:_0x42fe[37],data1:_0x6b9fx9[_0x42fe[13]][_0x42fe[16]],data2:_0x6b9fx9[_0x42fe[13]][_0x42fe[38]],UserId:_0x6b9fx9[_0x42fe[13]][_0x42fe[34]],MailRoomId:_0x6b9fx12[_0x42fe[39]]})})[_0x42fe[20]](function(){return _0x6b9fxa[_0x42fe[29]](200)})[_0x42fe[17]](function(_0x6b9fxd){return handleError(_0x6b9fxa,_0x6b9fxd)})};function handleError(_0x6b9fxa,_0x6b9fxd){logger[_0x42fe[44]](_0x6b9fxd[_0x42fe[43]]);return _0x6b9fxa[_0x42fe[19]](500)[_0x42fe[18]](_0x6b9fxd)}