flexbiz-server 12.4.21 → 12.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1068) hide show
  1. package/package.json +2 -1
  2. package/server/app.js +1 -22
  3. package/server/auths/bearer.js +1 -3
  4. package/server/auths/facebook.js +1 -12
  5. package/server/auths/google.js +1 -13
  6. package/server/auths/local.js +1 -64
  7. package/server/cluster.js +1 -27
  8. package/server/controllers/controller.js +1 -107
  9. package/server/controllers/controllerRPT.js +1 -27
  10. package/server/controllers/controllerUtils.js +1 -76
  11. package/server/controllers/createHandler.js +1 -35
  12. package/server/controllers/createRouteHandler.js +1 -4
  13. package/server/controllers/deleteHandler.js +1 -11
  14. package/server/controllers/deleteManyHandler.js +1 -2
  15. package/server/controllers/exportHandler.js +1 -17
  16. package/server/controllers/findHandler.js +1 -53
  17. package/server/controllers/handlers.js +1 -3
  18. package/server/controllers/historyHandler.js +1 -5
  19. package/server/controllers/importFromExcelHandler.js +1 -14
  20. package/server/controllers/importFromGsHandler.js +1 -10
  21. package/server/controllers/importFromJsonHandler.js +1 -7
  22. package/server/controllers/importHandler.js +1 -21
  23. package/server/controllers/logHandler.js +1 -5
  24. package/server/controllers/rptCreateRouteHandler.js +1 -4
  25. package/server/controllers/rptExcelHandler.js +1 -32
  26. package/server/controllers/rptHandler.js +1 -13
  27. package/server/controllers/updateBookHandler.js +1 -10
  28. package/server/controllers/updateFieldHandler.js +1 -12
  29. package/server/controllers/updateHandler.js +1 -39
  30. package/server/controllers/updateKeyHandler.js +1 -14
  31. package/server/controllers/viewHandler.js +1 -13
  32. package/server/flow/FlowEngine.js +1 -64
  33. package/server/flow/WebhookManager.js +1 -26
  34. package/server/flow/handlers.js +1 -3
  35. package/server/flow/nodes/aiAnalysis.js +1 -9
  36. package/server/flow/nodes/customer.js +1 -15
  37. package/server/flow/nodes/data.js +1 -14
  38. package/server/flow/nodes/debug.js +1 -2
  39. package/server/flow/nodes/delay.js +1 -3
  40. package/server/flow/nodes/email.js +1 -9
  41. package/server/flow/nodes/event.js +1 -11
  42. package/server/flow/nodes/facebook.js +1 -3
  43. package/server/flow/nodes/facebookConversations.js +1 -5
  44. package/server/flow/nodes/facebookCreatePost.js +1 -10
  45. package/server/flow/nodes/facebookSendMessage.js +1 -12
  46. package/server/flow/nodes/forEachItem.js +1 -8
  47. package/server/flow/nodes/function.js +1 -4
  48. package/server/flow/nodes/httprequest.js +1 -7
  49. package/server/flow/nodes/inject.js +1 -12
  50. package/server/flow/nodes/pushNotification.js +1 -5
  51. package/server/flow/nodes/report.js +1 -6
  52. package/server/flow/nodes/saveData.js +1 -2
  53. package/server/flow/nodes/switch.js +1 -20
  54. package/server/flow/nodes/webhook.js +1 -1
  55. package/server/flow/nodes/zaloSendMessage.js +1 -4
  56. package/server/flow/utils.js +1 -2
  57. package/server/global.js +1 -23
  58. package/server/libs/BlockchainTransactionPool.js +1 -3
  59. package/server/libs/WorkerPool.js +1 -4
  60. package/server/libs/WorkerStaticPool.js +1 -16
  61. package/server/libs/WorkerStaticPool_v1.js +1 -5
  62. package/server/libs/assbonus.js +1 -7
  63. package/server/libs/backup.js +1 -2
  64. package/server/libs/blockchainconnect.js +1 -12
  65. package/server/libs/cdpsdiem.js +1 -5
  66. package/server/libs/cdpsdt.js +1 -7
  67. package/server/libs/cdpskh.js +1 -9
  68. package/server/libs/cdpsnphep.js +1 -6
  69. package/server/libs/cdpstk.js +1 -11
  70. package/server/libs/ckcn.js +1 -12
  71. package/server/libs/ckdiem.js +1 -5
  72. package/server/libs/ckdt.js +1 -6
  73. package/server/libs/cknphep.js +1 -6
  74. package/server/libs/cktk.js +1 -4
  75. package/server/libs/cktt.js +1 -9
  76. package/server/libs/ckvt.js +1 -12
  77. package/server/libs/ckvtcapphat.js +1 -6
  78. package/server/libs/ckvtnpp.js +1 -8
  79. package/server/libs/ckvttt.js +1 -11
  80. package/server/libs/createSocaitheongay.js +1 -9
  81. package/server/libs/ctdiem.js +1 -5
  82. package/server/libs/ctvt.js +1 -7
  83. package/server/libs/ctvtnpp.js +1 -7
  84. package/server/libs/ctvttt.js +1 -7
  85. package/server/libs/databanle.js +1 -17
  86. package/server/libs/databanlenpp.js +1 -8
  87. package/server/libs/databanletheongay.js +1 -27
  88. package/server/libs/dkcn.js +1 -10
  89. package/server/libs/dkdiem.js +1 -5
  90. package/server/libs/dkdt.js +1 -6
  91. package/server/libs/dknphep.js +1 -7
  92. package/server/libs/dktk.js +1 -4
  93. package/server/libs/dktt.js +1 -8
  94. package/server/libs/dkvt.js +1 -9
  95. package/server/libs/dkvtnpp.js +1 -7
  96. package/server/libs/dkvttt.js +1 -7
  97. package/server/libs/dncn.js +1 -6
  98. package/server/libs/dntk.js +1 -4
  99. package/server/libs/dntt.js +1 -6
  100. package/server/libs/docs.js +1 -452
  101. package/server/libs/dstkcn.js +1 -1
  102. package/server/libs/dstktt.js +1 -1
  103. package/server/libs/dtbanletheonpp.js +1 -17
  104. package/server/libs/dtbanletheosp.js +1 -15
  105. package/server/libs/dtbanletheospnpp.js +1 -15
  106. package/server/libs/email.js +1 -3
  107. package/server/libs/excel.js +1 -2
  108. package/server/libs/getGiaban.js +1 -67
  109. package/server/libs/getGiabanAsync.js +1 -1
  110. package/server/libs/getNotifies.js +1 -1
  111. package/server/libs/htmlReport.js +1 -9
  112. package/server/libs/initDatabase.js +1 -9
  113. package/server/libs/invoiceEasy.js +1 -109
  114. package/server/libs/invoiceViettel.js +1 -29
  115. package/server/libs/invoiceVnpt.js +1 -22
  116. package/server/libs/kpistatus.js +1 -32
  117. package/server/libs/load-template.js +1 -3
  118. package/server/libs/mailmanagement.js +1 -13
  119. package/server/libs/mongooseDeletePost.js +1 -6
  120. package/server/libs/mongooseLeanId.js +1 -1
  121. package/server/libs/mongoosePatch.js +1 -8
  122. package/server/libs/onepay-payment.js +1 -4
  123. package/server/libs/optimizeBookkeeping.js +1 -14
  124. package/server/libs/parse-template.js +1 -5
  125. package/server/libs/permission.js +1 -51
  126. package/server/libs/phanbokh.js +1 -3
  127. package/server/libs/post-book.js +1 -23
  128. package/server/libs/post-socai.js +1 -25
  129. package/server/libs/post-sokho.js +1 -27
  130. package/server/libs/prototypes.js +1 -29
  131. package/server/libs/psdt.js +1 -1
  132. package/server/libs/pskh.js +1 -1
  133. package/server/libs/pstk.js +1 -1
  134. package/server/libs/redis-cache.js +1 -17
  135. package/server/libs/restore.js +1 -1
  136. package/server/libs/schedule.js +1 -18
  137. package/server/libs/sessionContext.js +2 -14
  138. package/server/libs/textReport.js +1 -3
  139. package/server/libs/thnxt.js +1 -9
  140. package/server/libs/thnxtnpp.js +1 -9
  141. package/server/libs/thnxttt.js +1 -8
  142. package/server/libs/tinhGt.js +1 -7
  143. package/server/libs/tinhGtCapnhatPNK.js +1 -7
  144. package/server/libs/tinhGtPhanboHeSo.js +1 -12
  145. package/server/libs/tinhGtPhanboSltp.js +1 -10
  146. package/server/libs/tinhGtPhanboYtcp.js +1 -11
  147. package/server/libs/tinhGtSltk.js +1 -9
  148. package/server/libs/tinhGtThcppstk.js +1 -10
  149. package/server/libs/tinhGtTrucTiep.js +1 -7
  150. package/server/libs/tinhGtXoa.js +1 -3
  151. package/server/libs/tinhgiatb.js +1 -38
  152. package/server/libs/tinhgiatb1vt.js +1 -5
  153. package/server/libs/tinhhoahong.js +1 -64
  154. package/server/libs/tinhhoahongnpp.js +1 -46
  155. package/server/libs/tinhkhauhao1ts.js +1 -12
  156. package/server/libs/tinhkhauhaots.js +1 -8
  157. package/server/libs/tuoinophaithu.js +1 -10
  158. package/server/libs/tuoinophaitra.js +1 -11
  159. package/server/libs/utils.js +1 -78
  160. package/server/libs/validate.js +1 -4
  161. package/server/libs/validator-acc-cust.js +1 -1
  162. package/server/libs/validator-account.js +1 -4
  163. package/server/libs/validator-vt.js +1 -2
  164. package/server/libs/validator.js +1 -11
  165. package/server/libs/vsocai.js +1 -8
  166. package/server/models/account.js +1 -7
  167. package/server/models/afflink.js +1 -2
  168. package/server/models/app.js +1 -15
  169. package/server/models/approve.js +1 -93
  170. package/server/models/assabcihandler.js +1 -35
  171. package/server/models/assbank.js +1 -19
  172. package/server/models/assbooking.js +1 -4
  173. package/server/models/assbuy.js +1 -3
  174. package/server/models/asscashwithdraw.js +1 -4
  175. package/server/models/assfindhash.js +1 -2
  176. package/server/models/assinvestment.js +1 -13
  177. package/server/models/assissue.js +1 -2
  178. package/server/models/asskey.js +1 -15
  179. package/server/models/assneedtobuy.js +1 -6
  180. package/server/models/assperiod.js +1 -7
  181. package/server/models/assproduct.js +1 -13
  182. package/server/models/assprofitsharing.js +1 -4
  183. package/server/models/assreceiver.js +1 -2
  184. package/server/models/assrequest.js +1 -11
  185. package/server/models/asssell.js +1 -7
  186. package/server/models/asstransaction.js +1 -3
  187. package/server/models/asstransfer.js +1 -4
  188. package/server/models/assuser_identity.js +1 -4
  189. package/server/models/asswithdraw.js +1 -4
  190. package/server/models/attend.js +1 -2
  191. package/server/models/banggiaban.js +1 -8
  192. package/server/models/bangtinhluong.js +1 -6
  193. package/server/models/base.js +1 -1
  194. package/server/models/bds_area.js +1 -4
  195. package/server/models/bds_block.js +1 -3
  196. package/server/models/bds_building.js +1 -4
  197. package/server/models/bds_floor.js +1 -3
  198. package/server/models/bds_floordetail.js +1 -9
  199. package/server/models/bds_nhadat.js +1 -11
  200. package/server/models/bds_nhomnhadat.js +1 -4
  201. package/server/models/bds_phanloainhadat.js +1 -3
  202. package/server/models/bg1.js +1 -9
  203. package/server/models/bg2.js +1 -10
  204. package/server/models/cache.js +1 -3
  205. package/server/models/calllog.js +1 -4
  206. package/server/models/campaign.js +1 -6
  207. package/server/models/cart.js +1 -5
  208. package/server/models/cddiem.js +1 -2
  209. package/server/models/cddt.js +1 -3
  210. package/server/models/cdkh.js +1 -5
  211. package/server/models/cdkhtheongay.js +1 -5
  212. package/server/models/cdnphep.js +1 -2
  213. package/server/models/cdtk.js +1 -3
  214. package/server/models/cdtktheongay.js +1 -3
  215. package/server/models/cdvt.js +1 -5
  216. package/server/models/cdvtnpp.js +1 -6
  217. package/server/models/cdvttheongay.js +1 -5
  218. package/server/models/chamcong.js +1 -7
  219. package/server/models/checkin.js +1 -4
  220. package/server/models/checkinactivity.js +1 -3
  221. package/server/models/checkinkpi.js +1 -4
  222. package/server/models/checkinlocation.js +1 -2
  223. package/server/models/chitieukpi.js +1 -3
  224. package/server/models/chudethaoluan.js +1 -3
  225. package/server/models/ckgtluong.js +1 -2
  226. package/server/models/colleague.js +1 -2
  227. package/server/models/comment.js +1 -4
  228. package/server/models/congdoansx.js +1 -4
  229. package/server/models/congtacvien.js +1 -4
  230. package/server/models/congthuctinhgiaban.js +1 -8
  231. package/server/models/consultant.js +1 -4
  232. package/server/models/contract.js +1 -6
  233. package/server/models/counter.js +1 -2
  234. package/server/models/ctds.js +1 -5
  235. package/server/models/ctds2.js +1 -6
  236. package/server/models/currency.js +1 -3
  237. package/server/models/customer.js +1 -31
  238. package/server/models/databanle.js +1 -8
  239. package/server/models/datlich.js +1 -4
  240. package/server/models/department.js +1 -4
  241. package/server/models/dh2.js +1 -20
  242. package/server/models/diagram.js +1 -2
  243. package/server/models/dinhmucsx.js +1 -8
  244. package/server/models/dkhoc.js +1 -6
  245. package/server/models/dknphep.js +1 -2
  246. package/server/models/dmban.js +1 -4
  247. package/server/models/dmbp.js +1 -12
  248. package/server/models/dmca.js +1 -2
  249. package/server/models/dmchietkhau.js +1 -9
  250. package/server/models/dmchietkhauhd.js +1 -20
  251. package/server/models/dmcpmh.js +1 -2
  252. package/server/models/dmdiemthuong.js +1 -5
  253. package/server/models/dmdoi.js +1 -4
  254. package/server/models/dmdoituongdanhgia.js +1 -2
  255. package/server/models/dmdt.js +1 -8
  256. package/server/models/dmdvt.js +1 -3
  257. package/server/models/dmgiaban.js +1 -9
  258. package/server/models/dmgiamua.js +1 -5
  259. package/server/models/dmgiathitruong.js +1 -5
  260. package/server/models/dmgiathitruong_ngay.js +1 -2
  261. package/server/models/dmgiathitruong_theodoi.js +1 -2
  262. package/server/models/dmhoahonghd.js +1 -9
  263. package/server/models/dmhoahongnpp.js +1 -9
  264. package/server/models/dmkc.js +1 -3
  265. package/server/models/dmkho.js +1 -6
  266. package/server/models/dmkhuyenmai.js +1 -9
  267. package/server/models/dmkhuyenmaihd.js +1 -11
  268. package/server/models/dmletet.js +1 -2
  269. package/server/models/dmlo.js +1 -4
  270. package/server/models/dmloaicong.js +1 -4
  271. package/server/models/dmloaitask.js +1 -2
  272. package/server/models/dmloaits.js +1 -2
  273. package/server/models/dmnckkm.js +1 -4
  274. package/server/models/dmnghiepvu.js +1 -4
  275. package/server/models/dmnguonvon.js +1 -2
  276. package/server/models/dmnhnv.js +1 -4
  277. package/server/models/dmnv.js +1 -17
  278. package/server/models/dmnvt.js +1 -9
  279. package/server/models/dmphatdichvu.js +1 -5
  280. package/server/models/dmphi.js +1 -3
  281. package/server/models/dmqct.js +1 -3
  282. package/server/models/dmqddvt.js +1 -3
  283. package/server/models/dmtanggiamts.js +1 -3
  284. package/server/models/dmto.js +1 -4
  285. package/server/models/dmtt.js +1 -6
  286. package/server/models/dmvt.js +1 -17
  287. package/server/models/dmyt.js +1 -4
  288. package/server/models/dn0.js +1 -13
  289. package/server/models/dnm.js +1 -11
  290. package/server/models/dokho.js +1 -2
  291. package/server/models/domain.js +1 -2
  292. package/server/models/dvcs.js +1 -3
  293. package/server/models/ecomcategories.js +1 -3
  294. package/server/models/ecomcategories_cty.js +1 -3
  295. package/server/models/ecomproductlines.js +1 -2
  296. package/server/models/ecompromotion_flashsales.js +1 -2
  297. package/server/models/ecompromotion_freeships.js +1 -2
  298. package/server/models/email.js +1 -2
  299. package/server/models/endpoint.js +1 -1
  300. package/server/models/events.js +1 -3
  301. package/server/models/evoucher.js +1 -5
  302. package/server/models/experiencejourney.js +1 -2
  303. package/server/models/experiencejourneydata.js +1 -4
  304. package/server/models/experiencejourneypersona.js +1 -3
  305. package/server/models/experiencejourneystage.js +1 -2
  306. package/server/models/exportexceltemplate.js +1 -2
  307. package/server/models/fbconversation.js +1 -15
  308. package/server/models/fbmessage.js +1 -2
  309. package/server/models/fbpage.js +1 -2
  310. package/server/models/fbpost.js +1 -2
  311. package/server/models/fieldright.js +1 -2
  312. package/server/models/file.js +1 -4
  313. package/server/models/financialroadmap.js +1 -3
  314. package/server/models/flow.js +1 -2
  315. package/server/models/flowdata.js +1 -3
  316. package/server/models/folder.js +1 -4
  317. package/server/models/follow.js +1 -2
  318. package/server/models/form.js +1 -3
  319. package/server/models/forminfo.js +1 -5
  320. package/server/models/formvalue.js +1 -3
  321. package/server/models/giaoca.js +1 -4
  322. package/server/models/giatb.js +1 -3
  323. package/server/models/group.js +1 -11
  324. package/server/models/gt_ctgt.js +1 -4
  325. package/server/models/gt_hspb.js +1 -3
  326. package/server/models/gt_sltk.js +1 -3
  327. package/server/models/gt_thcppstk.js +1 -3
  328. package/server/models/hanmucton.js +1 -4
  329. package/server/models/hd1.js +1 -11
  330. package/server/models/hd2.js +1 -27
  331. package/server/models/hd3.js +1 -18
  332. package/server/models/hd4.js +1 -13
  333. package/server/models/hd7.js +1 -17
  334. package/server/models/hd8.js +1 -12
  335. package/server/models/hde.js +1 -11
  336. package/server/models/hlink.js +1 -2
  337. package/server/models/hlinkvalue.js +1 -2
  338. package/server/models/hmcn.js +1 -3
  339. package/server/models/hmcnct.js +1 -2
  340. package/server/models/hspbts.js +1 -4
  341. package/server/models/htl.js +1 -13
  342. package/server/models/importexceltemplate.js +1 -2
  343. package/server/models/introducebonus.js +1 -4
  344. package/server/models/introducecode.js +1 -3
  345. package/server/models/introducer.js +1 -4
  346. package/server/models/kbbtpb.js +1 -7
  347. package/server/models/kbmPttct.js +1 -4
  348. package/server/models/kbmTkgtgt.js +1 -5
  349. package/server/models/kbm_bcdkt.js +1 -4
  350. package/server/models/kbm_kqhdkd.js +1 -3
  351. package/server/models/kbm_lcttgt.js +1 -5
  352. package/server/models/kbm_lctttt.js +1 -4
  353. package/server/models/kbm_pttct.js +1 -4
  354. package/server/models/kbm_tkgtgt.js +1 -5
  355. package/server/models/kbmbcdkt.js +1 -4
  356. package/server/models/kbmbcqt.js +1 -4
  357. package/server/models/kbmkqhdkd.js +1 -3
  358. package/server/models/kbmlcttgt.js +1 -6
  359. package/server/models/kbmlctttt.js +1 -4
  360. package/server/models/kbmtmbctc.js +1 -4
  361. package/server/models/kehoachdtcp.js +1 -3
  362. package/server/models/kehoachmh.js +1 -8
  363. package/server/models/keyresult.js +1 -7
  364. package/server/models/khunghangthanhvien.js +1 -3
  365. package/server/models/label.js +1 -2
  366. package/server/models/labelinfo.js +1 -2
  367. package/server/models/lenhcapphat.js +1 -8
  368. package/server/models/lenhsx.js +1 -8
  369. package/server/models/lienhe.js +1 -4
  370. package/server/models/like_module.js +1 -2
  371. package/server/models/link.js +1 -2
  372. package/server/models/loaidiem.js +1 -2
  373. package/server/models/lock.js +1 -2
  374. package/server/models/log.js +1 -5
  375. package/server/models/mailaccount.js +1 -3
  376. package/server/models/mailgroup.js +1 -3
  377. package/server/models/mailreceived.js +1 -2
  378. package/server/models/mailschedule.js +1 -2
  379. package/server/models/mailsent.js +1 -2
  380. package/server/models/mailtemplate.js +1 -2
  381. package/server/models/maudanhgia.js +1 -2
  382. package/server/models/menuinfo.js +1 -2
  383. package/server/models/message.js +1 -8
  384. package/server/models/message2.js +1 -4
  385. package/server/models/message2setting.js +1 -3
  386. package/server/models/moduleinfo.js +1 -4
  387. package/server/models/momo.js +1 -17
  388. package/server/models/news.js +1 -3
  389. package/server/models/newsfeed.js +1 -4
  390. package/server/models/note.js +1 -2
  391. package/server/models/notification.js +1 -7
  392. package/server/models/okr.js +1 -4
  393. package/server/models/okrdiagram.js +1 -3
  394. package/server/models/onepay.js +1 -24
  395. package/server/models/opportunity.js +1 -4
  396. package/server/models/options.js +1 -2
  397. package/server/models/originimportid.js +1 -1
  398. package/server/models/otp.js +1 -1
  399. package/server/models/parameter.js +1 -2
  400. package/server/models/participant.js +1 -20
  401. package/server/models/partner.js +1 -1
  402. package/server/models/payload.js +1 -1
  403. package/server/models/pbl.js +1 -16
  404. package/server/models/pc0.js +1 -13
  405. package/server/models/pc1.js +1 -14
  406. package/server/models/pc2.js +1 -13
  407. package/server/models/pc3.js +1 -13
  408. package/server/models/pc5.js +1 -8
  409. package/server/models/pc6.js +1 -14
  410. package/server/models/pcl.js +1 -6
  411. package/server/models/pdn.js +1 -9
  412. package/server/models/pdx.js +1 -9
  413. package/server/models/pgh.js +1 -5
  414. package/server/models/phieudanhgia.js +1 -3
  415. package/server/models/pht.js +1 -8
  416. package/server/models/phucap.js +1 -4
  417. package/server/models/pkc.js +1 -6
  418. package/server/models/pkh.js +1 -6
  419. package/server/models/pkk.js +1 -10
  420. package/server/models/pkt.js +1 -12
  421. package/server/models/pn1.js +1 -17
  422. package/server/models/pn2.js +1 -11
  423. package/server/models/pn3.js +1 -13
  424. package/server/models/pn5.js +1 -14
  425. package/server/models/pn6.js +1 -14
  426. package/server/models/pn9.js +1 -17
  427. package/server/models/pnc.js +1 -10
  428. package/server/models/pnh.js +1 -12
  429. package/server/models/pnk.js +1 -10
  430. package/server/models/po1.js +1 -19
  431. package/server/models/ppb.js +1 -6
  432. package/server/models/profile.js +1 -4
  433. package/server/models/pt1.js +1 -12
  434. package/server/models/pt5.js +1 -8
  435. package/server/models/ptl.js +1 -6
  436. package/server/models/ptthanhtoan.js +1 -6
  437. package/server/models/purchase_contract.js +1 -17
  438. package/server/models/pxc.js +1 -9
  439. package/server/models/pxh.js +1 -12
  440. package/server/models/pxk.js +1 -10
  441. package/server/models/qts.js +1 -14
  442. package/server/models/qts_dieuchinh.js +1 -3
  443. package/server/models/qts_dieuchuyen.js +1 -4
  444. package/server/models/quanhuyen.js +1 -2
  445. package/server/models/reason.js +1 -2
  446. package/server/models/receivedinvoice.js +1 -2
  447. package/server/models/reportinfo.js +1 -5
  448. package/server/models/right.js +1 -4
  449. package/server/models/rpt.js +1 -2
  450. package/server/models/rptform.js +1 -5
  451. package/server/models/rptobject.js +1 -2
  452. package/server/models/sale_contract.js +1 -9
  453. package/server/models/schedule.js +1 -16
  454. package/server/models/schedule_log.js +1 -2
  455. package/server/models/service.js +1 -4
  456. package/server/models/shipbook.js +1 -12
  457. package/server/models/shortcut.js +1 -2
  458. package/server/models/smsaccount.js +1 -10
  459. package/server/models/smssend.js +1 -2
  460. package/server/models/so1.js +1 -22
  461. package/server/models/so2.js +1 -10
  462. package/server/models/so3.js +1 -9
  463. package/server/models/so5.js +1 -15
  464. package/server/models/so9.js +1 -19
  465. package/server/models/socai.js +1 -26
  466. package/server/models/socainpp.js +1 -18
  467. package/server/models/socaitc.js +1 -6
  468. package/server/models/socaitmp.js +1 -16
  469. package/server/models/socaitt.js +1 -4
  470. package/server/models/sodiemthuong.js +1 -4
  471. package/server/models/sokho.js +1 -28
  472. package/server/models/sokhocapphat.js +1 -18
  473. package/server/models/sokhokhongton.js +1 -19
  474. package/server/models/sokhonpp.js +1 -19
  475. package/server/models/sokhotc.js +1 -8
  476. package/server/models/sokhott.js +1 -18
  477. package/server/models/sophanbokh.js +1 -3
  478. package/server/models/sosanxuat.js +1 -5
  479. package/server/models/sotinhkh.js +1 -2
  480. package/server/models/spdd_ck.js +1 -3
  481. package/server/models/spdd_dk.js +1 -3
  482. package/server/models/step.js +1 -2
  483. package/server/models/strategicdiagram.js +1 -3
  484. package/server/models/strategicgoal.js +1 -4
  485. package/server/models/strategickpi.js +1 -6
  486. package/server/models/strategicobjective.js +1 -5
  487. package/server/models/strategicplan.js +1 -5
  488. package/server/models/subscribe.js +1 -2
  489. package/server/models/support.js +1 -2
  490. package/server/models/synctime.js +1 -2
  491. package/server/models/sysconfig.js +1 -2
  492. package/server/models/sysgroup.js +1 -2
  493. package/server/models/tableinfo.js +1 -3
  494. package/server/models/task.js +1 -9
  495. package/server/models/taskreg.js +1 -4
  496. package/server/models/tc.js +1 -2
  497. package/server/models/tdttco.js +1 -8
  498. package/server/models/tdttco_tt.js +1 -5
  499. package/server/models/tdttno.js +1 -8
  500. package/server/models/tdttno_tt.js +1 -5
  501. package/server/models/templaterpt.js +1 -2
  502. package/server/models/templatestore.js +1 -3
  503. package/server/models/templatevoucher.js +1 -3
  504. package/server/models/tinhthanh.js +1 -2
  505. package/server/models/tokens.js +1 -2
  506. package/server/models/tontucthoi.js +1 -9
  507. package/server/models/trangthai.js +1 -4
  508. package/server/models/trangthaiapp.js +1 -4
  509. package/server/models/transaction.js +1 -16
  510. package/server/models/trialinfo.js +1 -2
  511. package/server/models/user.js +1 -38
  512. package/server/models/usergroup.js +1 -7
  513. package/server/models/vanchuyen.js +1 -12
  514. package/server/models/vat.js +1 -3
  515. package/server/models/vatra.js +1 -6
  516. package/server/models/vatvao.js +1 -6
  517. package/server/models/versioninfo.js +1 -2
  518. package/server/models/vietqrbanks.js +1 -2
  519. package/server/models/vsocai.js +1 -6
  520. package/server/models/waitevent.js +1 -2
  521. package/server/models/wallet.js +1 -8
  522. package/server/models/warranty.js +1 -3
  523. package/server/models/warrantyclaim.js +1 -2
  524. package/server/models/warrantypolicy.js +1 -1
  525. package/server/models/xaphuong.js +1 -2
  526. package/server/models/xhd.js +1 -10
  527. package/server/models/ytdd_ck.js +1 -4
  528. package/server/models/ytdd_dk.js +1 -4
  529. package/server/models/zalo.js +1 -17
  530. package/server/modules/lists/bg-cddiem.js +1 -6
  531. package/server/modules/lists/bg-cddt.js +1 -7
  532. package/server/modules/lists/bg-cdkh.js +1 -11
  533. package/server/modules/lists/bg-cdnphep.js +1 -6
  534. package/server/modules/lists/bg-cdtk.js +1 -9
  535. package/server/modules/lists/bg-cdvt.js +1 -8
  536. package/server/modules/lists/bg-cdvtnpp.js +1 -8
  537. package/server/modules/lists/ls-account.js +1 -4
  538. package/server/modules/lists/ls-afflink.js +1 -3
  539. package/server/modules/lists/ls-approve.js +1 -4
  540. package/server/modules/lists/ls-assabcihandler.js +1 -3
  541. package/server/modules/lists/ls-assbank.js +1 -3
  542. package/server/modules/lists/ls-assbooking.js +1 -20
  543. package/server/modules/lists/ls-assbuy.js +1 -8
  544. package/server/modules/lists/ls-asscashwithdraw.js +1 -8
  545. package/server/modules/lists/ls-assinvestment.js +1 -31
  546. package/server/modules/lists/ls-assissue.js +1 -3
  547. package/server/modules/lists/ls-asskey.js +1 -41
  548. package/server/modules/lists/ls-assneedtobuy.js +1 -10
  549. package/server/modules/lists/ls-assperiod.js +1 -19
  550. package/server/modules/lists/ls-assproduct.js +1 -9
  551. package/server/modules/lists/ls-assprofitsharing.js +1 -8
  552. package/server/modules/lists/ls-assreceiver.js +1 -3
  553. package/server/modules/lists/ls-assrequest.js +1 -4
  554. package/server/modules/lists/ls-asssell.js +1 -13
  555. package/server/modules/lists/ls-asstransaction.js +1 -3
  556. package/server/modules/lists/ls-asstransfer.js +1 -3
  557. package/server/modules/lists/ls-assuser_identity.js +1 -1
  558. package/server/modules/lists/ls-asswithdraw.js +1 -12
  559. package/server/modules/lists/ls-bangtinhluong.js +1 -2
  560. package/server/modules/lists/ls-bds_area.js +1 -3
  561. package/server/modules/lists/ls-bds_block.js +1 -1
  562. package/server/modules/lists/ls-bds_building.js +1 -3
  563. package/server/modules/lists/ls-bds_dmnhbds.js +1 -6
  564. package/server/modules/lists/ls-bds_floor.js +1 -2
  565. package/server/modules/lists/ls-bds_floordetail.js +1 -19
  566. package/server/modules/lists/ls-bds_nhadat.js +1 -16
  567. package/server/modules/lists/ls-bds_nhomnhadat.js +1 -1
  568. package/server/modules/lists/ls-bds_phanloainhadat.js +1 -1
  569. package/server/modules/lists/ls-calllog.js +1 -4
  570. package/server/modules/lists/ls-campaign.js +1 -1
  571. package/server/modules/lists/ls-cart.js +1 -14
  572. package/server/modules/lists/ls-chamcong.js +1 -3
  573. package/server/modules/lists/ls-checkin.js +1 -12
  574. package/server/modules/lists/ls-checkinactivity.js +1 -8
  575. package/server/modules/lists/ls-checkinkpi.js +1 -3
  576. package/server/modules/lists/ls-checkinlocation.js +1 -1
  577. package/server/modules/lists/ls-chitieukpi.js +1 -1
  578. package/server/modules/lists/ls-chudethaoluan.js +1 -1
  579. package/server/modules/lists/ls-ckgtluong.js +1 -1
  580. package/server/modules/lists/ls-comment.js +1 -9
  581. package/server/modules/lists/ls-congdoansx.js +1 -3
  582. package/server/modules/lists/ls-congtacvien.js +1 -5
  583. package/server/modules/lists/ls-consultant.js +1 -2
  584. package/server/modules/lists/ls-contract.js +1 -7
  585. package/server/modules/lists/ls-ctds.js +1 -4
  586. package/server/modules/lists/ls-ctds2.js +1 -4
  587. package/server/modules/lists/ls-currency.js +1 -1
  588. package/server/modules/lists/ls-customer.js +1 -21
  589. package/server/modules/lists/ls-datlich.js +1 -9
  590. package/server/modules/lists/ls-dckhauhaots.js +1 -3
  591. package/server/modules/lists/ls-department.js +1 -3
  592. package/server/modules/lists/ls-diagram.js +1 -1
  593. package/server/modules/lists/ls-dkhoc.js +1 -6
  594. package/server/modules/lists/ls-dknphep.js +1 -1
  595. package/server/modules/lists/ls-dmban.js +1 -4
  596. package/server/modules/lists/ls-dmbp.js +1 -7
  597. package/server/modules/lists/ls-dmca.js +1 -1
  598. package/server/modules/lists/ls-dmchietkhau.js +1 -19
  599. package/server/modules/lists/ls-dmchietkhauhd.js +1 -4
  600. package/server/modules/lists/ls-dmchucvu.js +1 -2
  601. package/server/modules/lists/ls-dmcpmh.js +1 -1
  602. package/server/modules/lists/ls-dmdiemthuong.js +1 -4
  603. package/server/modules/lists/ls-dmdoi.js +1 -4
  604. package/server/modules/lists/ls-dmdoituongdanhgia.js +1 -1
  605. package/server/modules/lists/ls-dmdt.js +1 -11
  606. package/server/modules/lists/ls-dmdvt.js +1 -2
  607. package/server/modules/lists/ls-dmgiaban.js +1 -4
  608. package/server/modules/lists/ls-dmgiamua.js +1 -4
  609. package/server/modules/lists/ls-dmgiathitruong.js +1 -15
  610. package/server/modules/lists/ls-dmgiathitruong_ngay.js +1 -2
  611. package/server/modules/lists/ls-dmgiathitruong_theodoi.js +1 -1
  612. package/server/modules/lists/ls-dmhoahonghd.js +1 -1
  613. package/server/modules/lists/ls-dmhoahongnpp.js +1 -1
  614. package/server/modules/lists/ls-dmkc.js +1 -3
  615. package/server/modules/lists/ls-dmkho.js +1 -1
  616. package/server/modules/lists/ls-dmkhuyenmai.js +1 -5
  617. package/server/modules/lists/ls-dmkhuyenmaihd.js +1 -3
  618. package/server/modules/lists/ls-dmletet.js +1 -1
  619. package/server/modules/lists/ls-dmlo.js +1 -1
  620. package/server/modules/lists/ls-dmloaicong.js +1 -1
  621. package/server/modules/lists/ls-dmloaits.js +1 -1
  622. package/server/modules/lists/ls-dmnckkm.js +1 -7
  623. package/server/modules/lists/ls-dmnghiepvu.js +1 -1
  624. package/server/modules/lists/ls-dmnguonvon.js +1 -1
  625. package/server/modules/lists/ls-dmnhnv.js +1 -6
  626. package/server/modules/lists/ls-dmnhtask.js +1 -5
  627. package/server/modules/lists/ls-dmnkh.js +1 -6
  628. package/server/modules/lists/ls-dmntt.js +1 -6
  629. package/server/modules/lists/ls-dmnv.js +1 -17
  630. package/server/modules/lists/ls-dmnvt.js +1 -8
  631. package/server/modules/lists/ls-dmphatdichvu.js +1 -3
  632. package/server/modules/lists/ls-dmphi.js +1 -6
  633. package/server/modules/lists/ls-dmqct.js +1 -2
  634. package/server/modules/lists/ls-dmqddvt.js +1 -3
  635. package/server/modules/lists/ls-dmtanggiamts.js +1 -1
  636. package/server/modules/lists/ls-dmto.js +1 -5
  637. package/server/modules/lists/ls-dmtt.js +1 -7
  638. package/server/modules/lists/ls-dmvt.js +1 -68
  639. package/server/modules/lists/ls-dmyt.js +1 -1
  640. package/server/modules/lists/ls-dokho.js +1 -1
  641. package/server/modules/lists/ls-dvcs.js +1 -1
  642. package/server/modules/lists/ls-ecomcategories.js +1 -5
  643. package/server/modules/lists/ls-ecomcategories_cty.js +1 -5
  644. package/server/modules/lists/ls-email.js +1 -4
  645. package/server/modules/lists/ls-events.js +1 -3
  646. package/server/modules/lists/ls-evoucher.js +1 -3
  647. package/server/modules/lists/ls-experiencejourney.js +1 -1
  648. package/server/modules/lists/ls-experiencejourneydata.js +1 -3
  649. package/server/modules/lists/ls-experiencejourneypersona.js +1 -4
  650. package/server/modules/lists/ls-experiencejourneystage.js +1 -1
  651. package/server/modules/lists/ls-fbconversation.js +1 -2
  652. package/server/modules/lists/ls-fbmessage.js +1 -2
  653. package/server/modules/lists/ls-fbpage.js +1 -11
  654. package/server/modules/lists/ls-fbpost.js +1 -2
  655. package/server/modules/lists/ls-file.js +1 -31
  656. package/server/modules/lists/ls-financialroadmap.js +1 -3
  657. package/server/modules/lists/ls-flow.js +1 -6
  658. package/server/modules/lists/ls-flowdata.js +1 -1
  659. package/server/modules/lists/ls-folder.js +1 -1
  660. package/server/modules/lists/ls-form.js +1 -1
  661. package/server/modules/lists/ls-forminfo.js +1 -1
  662. package/server/modules/lists/ls-formvalue.js +1 -1
  663. package/server/modules/lists/ls-giaoca.js +1 -4
  664. package/server/modules/lists/ls-group.js +1 -5
  665. package/server/modules/lists/ls-hlink.js +1 -1
  666. package/server/modules/lists/ls-hlinkvalue.js +1 -1
  667. package/server/modules/lists/ls-hmcn.js +1 -2
  668. package/server/modules/lists/ls-hspbts.js +1 -3
  669. package/server/modules/lists/ls-introducebonus.js +1 -4
  670. package/server/modules/lists/ls-introducecode.js +1 -10
  671. package/server/modules/lists/ls-introducer.js +1 -20
  672. package/server/modules/lists/ls-kbm-bcdkt.js +1 -1
  673. package/server/modules/lists/ls-kbm-bcqt.js +1 -5
  674. package/server/modules/lists/ls-kbm-kqhdkd.js +1 -1
  675. package/server/modules/lists/ls-kbm-lcttgt.js +1 -1
  676. package/server/modules/lists/ls-kbm-lctttt.js +1 -1
  677. package/server/modules/lists/ls-kbm-pttct.js +1 -3
  678. package/server/modules/lists/ls-kbm-tkgtgt.js +1 -3
  679. package/server/modules/lists/ls-kbm-tmbctc.js +1 -3
  680. package/server/modules/lists/ls-kehoachdtcp.js +1 -4
  681. package/server/modules/lists/ls-keyresult.js +1 -7
  682. package/server/modules/lists/ls-khunghangthanhvien.js +1 -1
  683. package/server/modules/lists/ls-kygui.js +1 -19
  684. package/server/modules/lists/ls-label.js +1 -1
  685. package/server/modules/lists/ls-lienhe.js +1 -4
  686. package/server/modules/lists/ls-like-module.js +1 -1
  687. package/server/modules/lists/ls-link.js +1 -1
  688. package/server/modules/lists/ls-loaidiem.js +1 -1
  689. package/server/modules/lists/ls-lock.js +1 -1
  690. package/server/modules/lists/ls-log.js +1 -3
  691. package/server/modules/lists/ls-mailaccount.js +1 -5
  692. package/server/modules/lists/ls-mailreceived.js +1 -5
  693. package/server/modules/lists/ls-mailschedule.js +1 -7
  694. package/server/modules/lists/ls-mailsent.js +1 -4
  695. package/server/modules/lists/ls-mailtemplate.js +1 -4
  696. package/server/modules/lists/ls-maudanhgia.js +1 -3
  697. package/server/modules/lists/ls-message2.js +1 -8
  698. package/server/modules/lists/ls-message2setting.js +1 -5
  699. package/server/modules/lists/ls-news.js +1 -7
  700. package/server/modules/lists/ls-newsfeed.js +1 -4
  701. package/server/modules/lists/ls-note.js +1 -6
  702. package/server/modules/lists/ls-okr.js +1 -5
  703. package/server/modules/lists/ls-okrdiagram.js +1 -1
  704. package/server/modules/lists/ls-opportunity.js +1 -5
  705. package/server/modules/lists/ls-options.js +1 -4
  706. package/server/modules/lists/ls-parameter.js +1 -3
  707. package/server/modules/lists/ls-participant.js +1 -10
  708. package/server/modules/lists/ls-phieudanhgia.js +1 -7
  709. package/server/modules/lists/ls-phucap.js +1 -2
  710. package/server/modules/lists/ls-profile.js +1 -1
  711. package/server/modules/lists/ls-ptthanhtoan.js +1 -3
  712. package/server/modules/lists/ls-qts-dieuchinh.js +1 -2
  713. package/server/modules/lists/ls-qts-dieuchuyen.js +1 -8
  714. package/server/modules/lists/ls-reason.js +1 -1
  715. package/server/modules/lists/ls-rpt.js +1 -5
  716. package/server/modules/lists/ls-rptform.js +1 -4
  717. package/server/modules/lists/ls-service.js +1 -3
  718. package/server/modules/lists/ls-shortcut.js +1 -1
  719. package/server/modules/lists/ls-smsaccount.js +1 -1
  720. package/server/modules/lists/ls-smssend.js +1 -3
  721. package/server/modules/lists/ls-sosanxuat.js +1 -4
  722. package/server/modules/lists/ls-step.js +1 -1
  723. package/server/modules/lists/ls-strategicdiagram.js +1 -1
  724. package/server/modules/lists/ls-strategicgoal.js +1 -3
  725. package/server/modules/lists/ls-strategickpi.js +1 -7
  726. package/server/modules/lists/ls-strategicobjective.js +1 -3
  727. package/server/modules/lists/ls-strategicplan.js +1 -6
  728. package/server/modules/lists/ls-support.js +1 -3
  729. package/server/modules/lists/ls-task.js +1 -34
  730. package/server/modules/lists/ls-taskreg.js +1 -2
  731. package/server/modules/lists/ls-tc.js +1 -1
  732. package/server/modules/lists/ls-templaterpt.js +1 -5
  733. package/server/modules/lists/ls-templatevoucher.js +1 -1
  734. package/server/modules/lists/ls-tontucthoi.js +1 -3
  735. package/server/modules/lists/ls-trangthaiapp.js +1 -3
  736. package/server/modules/lists/ls-transaction.js +1 -4
  737. package/server/modules/lists/ls-usergroup.js +1 -7
  738. package/server/modules/lists/ls-vat.js +1 -1
  739. package/server/modules/lists/ls-vatra.js +1 -5
  740. package/server/modules/lists/ls-vatvao.js +1 -6
  741. package/server/modules/lists/ls-waitevent.js +1 -1
  742. package/server/modules/lists/ls-warranty.js +1 -4
  743. package/server/modules/lists/ls_hanmucton.js +1 -3
  744. package/server/modules/lists/ls_hspb.js +1 -4
  745. package/server/modules/lists/ls_spdd_ck.js +1 -3
  746. package/server/modules/lists/ls_spdd_dk.js +1 -3
  747. package/server/modules/lists/ls_ytdd_ck.js +1 -4
  748. package/server/modules/lists/ls_ytdd_dk.js +1 -4
  749. package/server/modules/lists/sys-attend.js +1 -4
  750. package/server/modules/lists/sys-follow.js +1 -4
  751. package/server/modules/lists/sys-right.js +1 -2
  752. package/server/modules/public/app.js +1 -4
  753. package/server/modules/public/approve.js +1 -37
  754. package/server/modules/public/callin.js +1 -7
  755. package/server/modules/public/comment.js +1 -5
  756. package/server/modules/public/dmnvt.js +1 -4
  757. package/server/modules/public/dmvt.js +1 -9
  758. package/server/modules/public/file.js +1 -11
  759. package/server/modules/public/form.js +1 -7
  760. package/server/modules/public/forminfo.js +1 -1
  761. package/server/modules/public/group.js +1 -4
  762. package/server/modules/public/hlink.js +1 -3
  763. package/server/modules/public/introducecode.js +1 -1
  764. package/server/modules/public/listinfo.js +1 -1
  765. package/server/modules/public/media-webhook.js +1 -1
  766. package/server/modules/public/partner.js +1 -1
  767. package/server/modules/public/paymentCallback.js +1 -32
  768. package/server/modules/public/province.js +1 -1
  769. package/server/modules/public/ptthanhtoan.js +1 -4
  770. package/server/modules/public/subscribe.js +1 -30
  771. package/server/modules/public/support.js +1 -3
  772. package/server/modules/public/tableinfo.js +1 -1
  773. package/server/modules/public/trialinfo.js +1 -4
  774. package/server/modules/public/versioninfo.js +1 -1
  775. package/server/modules/reports/calc-tinhgiatb.js +1 -6
  776. package/server/modules/reports/calc-tinhgiathanh.js +1 -6
  777. package/server/modules/reports/calc-tinhkhauhaots.js +1 -3
  778. package/server/modules/reports/calc-tinhluong.js +1 -37
  779. package/server/modules/reports/rp-analyzedata.js +1 -6
  780. package/server/modules/reports/rp-assbonus.js +1 -4
  781. package/server/modules/reports/rp-assinterest.js +1 -8
  782. package/server/modules/reports/rp-assproductowners.js +1 -3
  783. package/server/modules/reports/rp-asssupply.js +1 -1
  784. package/server/modules/reports/rp-asstransferlog.js +1 -10
  785. package/server/modules/reports/rp-banggiatb.js +1 -3
  786. package/server/modules/reports/rp-bangtinhkhauhao.js +1 -6
  787. package/server/modules/reports/rp-baocaokhachhang.js +1 -6
  788. package/server/modules/reports/rp-bcdkt.js +1 -11
  789. package/server/modules/reports/rp-bcintroducebonus.js +1 -4
  790. package/server/modules/reports/rp-bckhtiemnang.js +1 -3
  791. package/server/modules/reports/rp-bcqt.js +1 -85
  792. package/server/modules/reports/rp-bkct.js +1 -13
  793. package/server/modules/reports/rp-bkshipbook.js +1 -8
  794. package/server/modules/reports/rp-bkvanchuyen.js +1 -8
  795. package/server/modules/reports/rp-bkvatra.js +1 -7
  796. package/server/modules/reports/rp-bkvatvao.js +1 -7
  797. package/server/modules/reports/rp-capnhatsocaitc.js +1 -4
  798. package/server/modules/reports/rp-cdpsdiem.js +1 -4
  799. package/server/modules/reports/rp-cdpsdt.js +1 -5
  800. package/server/modules/reports/rp-cdpskh.js +1 -7
  801. package/server/modules/reports/rp-cdpsnphep.js +1 -3
  802. package/server/modules/reports/rp-cdpstk.js +1 -4
  803. package/server/modules/reports/rp-chitietchitientheohoadon.js +1 -12
  804. package/server/modules/reports/rp-chitiettaisan.js +1 -13
  805. package/server/modules/reports/rp-chitietthutientheohoadon.js +1 -13
  806. package/server/modules/reports/rp-ckcn.js +1 -3
  807. package/server/modules/reports/rp-ckdiem.js +1 -2
  808. package/server/modules/reports/rp-cktk.js +1 -3
  809. package/server/modules/reports/rp-ckvt.js +1 -10
  810. package/server/modules/reports/rp-ckvttheokho.js +1 -4
  811. package/server/modules/reports/rp-ckvttheotg.js +1 -4
  812. package/server/modules/reports/rp-ckvttt.js +1 -3
  813. package/server/modules/reports/rp-congnophaithutheotuoino.js +1 -3
  814. package/server/modules/reports/rp-congnophaitratheotuoino.js +1 -3
  815. package/server/modules/reports/rp-congnosapthu.js +1 -4
  816. package/server/modules/reports/rp-congnosaptra.js +1 -4
  817. package/server/modules/reports/rp-congviectheobp.js +1 -9
  818. package/server/modules/reports/rp-congviectheodt.js +1 -8
  819. package/server/modules/reports/rp-congviectheokh.js +1 -8
  820. package/server/modules/reports/rp-congviectheonv.js +1 -9
  821. package/server/modules/reports/rp-congviectheotimeline.js +1 -6
  822. package/server/modules/reports/rp-ctbanle.js +1 -15
  823. package/server/modules/reports/rp-ctbanle2.js +1 -20
  824. package/server/modules/reports/rp-ctbanlectv.js +1 -20
  825. package/server/modules/reports/rp-ctbanlenpp.js +1 -24
  826. package/server/modules/reports/rp-ctdanhgianhanvien.js +1 -8
  827. package/server/modules/reports/rp-cthangbanbitralai.js +1 -4
  828. package/server/modules/reports/rp-ctmuahang.js +1 -7
  829. package/server/modules/reports/rp-cttralaihang.js +1 -4
  830. package/server/modules/reports/rp-databanle.js +1 -10
  831. package/server/modules/reports/rp-diemthuong.js +1 -2
  832. package/server/modules/reports/rp-dkcn.js +1 -3
  833. package/server/modules/reports/rp-dktk.js +1 -2
  834. package/server/modules/reports/rp-dsnhanviencm.js +1 -9
  835. package/server/modules/reports/rp-dsnhanvientb.js +1 -9
  836. package/server/modules/reports/rp-dtbanlekempk.js +1 -9
  837. package/server/modules/reports/rp-dtbanletheoct.js +1 -23
  838. package/server/modules/reports/rp-dtbanletheoctkempk.js +1 -25
  839. package/server/modules/reports/rp-dtbanletheokh.js +1 -20
  840. package/server/modules/reports/rp-dtbanletheokhnpp.js +1 -19
  841. package/server/modules/reports/rp-dtbanletheokho.js +1 -18
  842. package/server/modules/reports/rp-dtbanletheonam.js +1 -3
  843. package/server/modules/reports/rp-dtbanletheongay.js +1 -1
  844. package/server/modules/reports/rp-dtbanletheonpp.js +1 -23
  845. package/server/modules/reports/rp-dtbanletheonv.js +1 -19
  846. package/server/modules/reports/rp-dtbanletheoquy.js +1 -3
  847. package/server/modules/reports/rp-dtbanletheosp.js +1 -8
  848. package/server/modules/reports/rp-dtbanletheospnpp.js +1 -6
  849. package/server/modules/reports/rp-dtbanletheothang.js +1 -3
  850. package/server/modules/reports/rp-dtbanletheothungan.js +1 -12
  851. package/server/modules/reports/rp-dtbanletheovt.js +1 -2
  852. package/server/modules/reports/rp-dtbanletheovtnpp.js +1 -2
  853. package/server/modules/reports/rp-dutoanthuchitheodt.js +1 -4
  854. package/server/modules/reports/rp-getPXC2PNC.js +1 -8
  855. package/server/modules/reports/rp-getariseofaccountsbymonth.js +1 -4
  856. package/server/modules/reports/rp-getbtpb.js +1 -6
  857. package/server/modules/reports/rp-getcashbycashier.js +1 -7
  858. package/server/modules/reports/rp-getcschietkhau.js +1 -5
  859. package/server/modules/reports/rp-getdinhmuc4lenhcp.js +1 -7
  860. package/server/modules/reports/rp-getdinhmuc4pxk.js +1 -9
  861. package/server/modules/reports/rp-getdk4pht.js +1 -8
  862. package/server/modules/reports/rp-getdk4pkc.js +1 -9
  863. package/server/modules/reports/rp-getdttheoca.js +1 -5
  864. package/server/modules/reports/rp-getinvoice2pay.js +1 -4
  865. package/server/modules/reports/rp-getinvoice2receive.js +1 -4
  866. package/server/modules/reports/rp-getinvoice2return.js +1 -5
  867. package/server/modules/reports/rp-getinvoice2return_bl.js +1 -6
  868. package/server/modules/reports/rp-getkehoachmh4lenhcp.js +1 -4
  869. package/server/modules/reports/rp-getkhauhao.js +1 -7
  870. package/server/modules/reports/rp-getluong.js +1 -8
  871. package/server/modules/reports/rp-getluongchuyen.js +1 -5
  872. package/server/modules/reports/rp-getpn2fee.js +1 -5
  873. package/server/modules/reports/rp-getpn2return.js +1 -5
  874. package/server/modules/reports/rp-getthanhpham4pnk.js +1 -7
  875. package/server/modules/reports/rp-getvc2xhd.js +1 -11
  876. package/server/modules/reports/rp-gt_cpnvltt.js +1 -6
  877. package/server/modules/reports/rp-hangbanbitralai.js +1 -5
  878. package/server/modules/reports/rp-hangthanhvien.js +1 -3
  879. package/server/modules/reports/rp-hoadonbanhangtheohantt.js +1 -5
  880. package/server/modules/reports/rp-hoadonmuahangtheohantt.js +1 -5
  881. package/server/modules/reports/rp-hoahong.js +1 -15
  882. package/server/modules/reports/rp-kcsns.js +1 -19
  883. package/server/modules/reports/rp-kgchamcong.js +1 -7
  884. package/server/modules/reports/rp-khoaso.js +1 -12
  885. package/server/modules/reports/rp-kiemtrasocaitcvssocai.js +1 -6
  886. package/server/modules/reports/rp-kqdanhgianhanvien.js +1 -5
  887. package/server/modules/reports/rp-kqhdkd.js +1 -7
  888. package/server/modules/reports/rp-lcttgt.js +1 -17
  889. package/server/modules/reports/rp-lctttt.js +1 -11
  890. package/server/modules/reports/rp-linkslist.js +1 -4
  891. package/server/modules/reports/rp-phanbochitienchohoadon.js +1 -11
  892. package/server/modules/reports/rp-phanbothutienchohoadon.js +1 -10
  893. package/server/modules/reports/rp-ptbitralai.js +1 -7
  894. package/server/modules/reports/rp-ptcttct.js +1 -22
  895. package/server/modules/reports/rp-ptdonhang.js +1 -8
  896. package/server/modules/reports/rp-pttct.js +1 -49
  897. package/server/modules/reports/rp-pttctkho.js +1 -32
  898. package/server/modules/reports/rp-pttctkho2.js +1 -29
  899. package/server/modules/reports/rp-referredusers.js +1 -1
  900. package/server/modules/reports/rp-sctbhxh.js +1 -4
  901. package/server/modules/reports/rp-sctcnkh.js +1 -17
  902. package/server/modules/reports/rp-sctdiem.js +1 -3
  903. package/server/modules/reports/rp-sctdt.js +1 -7
  904. package/server/modules/reports/rp-sctdtcp.js +1 -11
  905. package/server/modules/reports/rp-sctluong.js +1 -4
  906. package/server/modules/reports/rp-sctthuetncn.js +1 -4
  907. package/server/modules/reports/rp-scttk.js +1 -7
  908. package/server/modules/reports/rp-sctvt.js +1 -5
  909. package/server/modules/reports/rp-sctvt_sl.js +1 -5
  910. package/server/modules/reports/rp-sctvtnpp.js +1 -6
  911. package/server/modules/reports/rp-sctvttt.js +1 -5
  912. package/server/modules/reports/rp-search.js +1 -4
  913. package/server/modules/reports/rp-socai.js +1 -6
  914. package/server/modules/reports/rp-socaitk.js +1 -7
  915. package/server/modules/reports/rp-sochut.js +1 -7
  916. package/server/modules/reports/rp-sokho.js +1 -7
  917. package/server/modules/reports/rp-sokhott.js +1 -5
  918. package/server/modules/reports/rp-sonkbh.js +1 -5
  919. package/server/modules/reports/rp-sonkc.js +1 -6
  920. package/server/modules/reports/rp-sonkct.js +1 -5
  921. package/server/modules/reports/rp-sonkmh.js +1 -5
  922. package/server/modules/reports/rp-sonktt.js +1 -5
  923. package/server/modules/reports/rp-soquy.js +1 -11
  924. package/server/modules/reports/rp-sosanhkhvatt.js +1 -13
  925. package/server/modules/reports/rp-sosanhkhvatt2.js +1 -6
  926. package/server/modules/reports/rp-sotaisan.js +1 -13
  927. package/server/modules/reports/rp-sotiengui.js +1 -7
  928. package/server/modules/reports/rp-taodinhmuctudkhoc.js +1 -5
  929. package/server/modules/reports/rp-thbanhangkempk.js +1 -28
  930. package/server/modules/reports/rp-thdanhgianhanvien.js +1 -9
  931. package/server/modules/reports/rp-thgt.js +1 -6
  932. package/server/modules/reports/rp-thnxt.js +1 -12
  933. package/server/modules/reports/rp-thnxt_sl.js +1 -9
  934. package/server/modules/reports/rp-thnxtnpp.js +1 -10
  935. package/server/modules/reports/rp-thnxttt.js +1 -9
  936. package/server/modules/reports/rp-tkbanhangtheogioithieu.js +1 -9
  937. package/server/modules/reports/rp-tkgioithieukh.js +1 -4
  938. package/server/modules/reports/rp-tkgtgt.js +1 -7
  939. package/server/modules/reports/rp-tmbctc.js +1 -20
  940. package/server/modules/reports/rp-tonghopbanhang.js +1 -6
  941. package/server/modules/reports/rp-tonghopmuahang.js +1 -5
  942. package/server/modules/reports/rp-tonghoptralaihang.js +1 -5
  943. package/server/modules/reports/rp-tongquanbanle.js +1 -20
  944. package/server/modules/reports/rp-tongquanbds.js +1 -3
  945. package/server/modules/reports/rp-tongquancongty.js +1 -6
  946. package/server/modules/reports/rp-tongquanctvnpp.js +1 -12
  947. package/server/modules/reports/rp-tongquannvbh.js +1 -14
  948. package/server/modules/reports/rp-tongquannvnpp.js +1 -5
  949. package/server/modules/reports/rp-uoctinhnvl.js +1 -11
  950. package/server/modules/reports/rp-wallet.js +1 -3
  951. package/server/modules/reports/rpt-tkdiemtichluy.js +1 -9
  952. package/server/modules/systems/sys-app.js +1 -30
  953. package/server/modules/systems/sys-colleague.js +1 -11
  954. package/server/modules/systems/sys-domain.js +1 -4
  955. package/server/modules/systems/sys-ecomproductlines.js +1 -1
  956. package/server/modules/systems/sys-exportexceltemplate.js +1 -4
  957. package/server/modules/systems/sys-fieldright.js +1 -3
  958. package/server/modules/systems/sys-importexceltemplate.js +1 -4
  959. package/server/modules/systems/sys-labelinfo.js +1 -4
  960. package/server/modules/systems/sys-listinfo.js +1 -10
  961. package/server/modules/systems/sys-menuinfo.js +1 -4
  962. package/server/modules/systems/sys-message.js +1 -14
  963. package/server/modules/systems/sys-moduleinfo.js +1 -4
  964. package/server/modules/systems/sys-notification.js +1 -8
  965. package/server/modules/systems/sys-quanhuyen.js +1 -4
  966. package/server/modules/systems/sys-reportinfo.js +1 -4
  967. package/server/modules/systems/sys-rptobject.js +1 -3
  968. package/server/modules/systems/sys-schedule.js +1 -11
  969. package/server/modules/systems/sys-sysconfig.js +1 -3
  970. package/server/modules/systems/sys-sysgroup.js +1 -3
  971. package/server/modules/systems/sys-tableinfo.js +1 -3
  972. package/server/modules/systems/sys-templatestore.js +1 -5
  973. package/server/modules/systems/sys-tinhthanh.js +1 -4
  974. package/server/modules/systems/sys-token.js +1 -3
  975. package/server/modules/systems/sys-trangthai.js +1 -4
  976. package/server/modules/systems/sys-trialinfo.js +1 -3
  977. package/server/modules/systems/sys-user.js +1 -45
  978. package/server/modules/systems/sys-users.js +1 -10
  979. package/server/modules/systems/sys-versioninfo.js +1 -3
  980. package/server/modules/systems/sys-vietqrbanks.js +1 -4
  981. package/server/modules/systems/sys-xaphuong.js +1 -4
  982. package/server/modules/vouchers/vo-banggiaban.js +1 -5
  983. package/server/modules/vouchers/vo-bc1.js +1 -33
  984. package/server/modules/vouchers/vo-bc5.js +1 -15
  985. package/server/modules/vouchers/vo-bg1.js +1 -10
  986. package/server/modules/vouchers/vo-bg2.js +1 -12
  987. package/server/modules/vouchers/vo-bn1.js +1 -35
  988. package/server/modules/vouchers/vo-bn5.js +1 -15
  989. package/server/modules/vouchers/vo-dh2.js +1 -35
  990. package/server/modules/vouchers/vo-dinhmucsx.js +1 -6
  991. package/server/modules/vouchers/vo-dkb.js +1 -21
  992. package/server/modules/vouchers/vo-dn0.js +1 -9
  993. package/server/modules/vouchers/vo-dnm.js +1 -21
  994. package/server/modules/vouchers/vo-hd1.js +1 -36
  995. package/server/modules/vouchers/vo-hd2.js +1 -107
  996. package/server/modules/vouchers/vo-hd3.js +1 -44
  997. package/server/modules/vouchers/vo-hd4.js +1 -13
  998. package/server/modules/vouchers/vo-hd7.js +1 -29
  999. package/server/modules/vouchers/vo-hd8.js +1 -29
  1000. package/server/modules/vouchers/vo-hde.js +1 -40
  1001. package/server/modules/vouchers/vo-htl.js +1 -11
  1002. package/server/modules/vouchers/vo-kbbtpb.js +1 -6
  1003. package/server/modules/vouchers/vo-kehoachmh.js +1 -13
  1004. package/server/modules/vouchers/vo-lenhcapphat.js +1 -10
  1005. package/server/modules/vouchers/vo-lenhsx.js +1 -12
  1006. package/server/modules/vouchers/vo-pbl.js +1 -93
  1007. package/server/modules/vouchers/vo-pc0.js +1 -14
  1008. package/server/modules/vouchers/vo-pc1.js +1 -31
  1009. package/server/modules/vouchers/vo-pc2.js +1 -24
  1010. package/server/modules/vouchers/vo-pc3.js +1 -14
  1011. package/server/modules/vouchers/vo-pc5.js +1 -15
  1012. package/server/modules/vouchers/vo-pc6.js +1 -19
  1013. package/server/modules/vouchers/vo-pcl.js +1 -7
  1014. package/server/modules/vouchers/vo-pdn.js +1 -11
  1015. package/server/modules/vouchers/vo-pdx.js +1 -9
  1016. package/server/modules/vouchers/vo-pgh.js +1 -19
  1017. package/server/modules/vouchers/vo-pht.js +1 -7
  1018. package/server/modules/vouchers/vo-pkc.js +1 -7
  1019. package/server/modules/vouchers/vo-pkh.js +1 -10
  1020. package/server/modules/vouchers/vo-pkk.js +1 -12
  1021. package/server/modules/vouchers/vo-pkt.js +1 -13
  1022. package/server/modules/vouchers/vo-pn1.js +1 -33
  1023. package/server/modules/vouchers/vo-pn2.js +1 -16
  1024. package/server/modules/vouchers/vo-pn3.js +1 -18
  1025. package/server/modules/vouchers/vo-pn5.js +1 -19
  1026. package/server/modules/vouchers/vo-pn6.js +1 -18
  1027. package/server/modules/vouchers/vo-pn9.js +1 -22
  1028. package/server/modules/vouchers/vo-pnc.js +1 -20
  1029. package/server/modules/vouchers/vo-pnh.js +1 -20
  1030. package/server/modules/vouchers/vo-pnk.js +1 -14
  1031. package/server/modules/vouchers/vo-pnknpp.js +1 -12
  1032. package/server/modules/vouchers/vo-po1.js +1 -15
  1033. package/server/modules/vouchers/vo-ppb.js +1 -8
  1034. package/server/modules/vouchers/vo-pt1.js +1 -21
  1035. package/server/modules/vouchers/vo-pt5.js +1 -15
  1036. package/server/modules/vouchers/vo-ptl.js +1 -8
  1037. package/server/modules/vouchers/vo-purchase_contract.js +1 -9
  1038. package/server/modules/vouchers/vo-pxc.js +1 -22
  1039. package/server/modules/vouchers/vo-pxh.js +1 -28
  1040. package/server/modules/vouchers/vo-pxk.js +1 -15
  1041. package/server/modules/vouchers/vo-pxknpp.js +1 -14
  1042. package/server/modules/vouchers/vo-qts.js +1 -12
  1043. package/server/modules/vouchers/vo-sale_contract.js +1 -11
  1044. package/server/modules/vouchers/vo-shipbook.js +1 -17
  1045. package/server/modules/vouchers/vo-so1.js +1 -126
  1046. package/server/modules/vouchers/vo-so2.js +1 -37
  1047. package/server/modules/vouchers/vo-so3.js +1 -41
  1048. package/server/modules/vouchers/vo-so5.js +1 -57
  1049. package/server/modules/vouchers/vo-so7.js +1 -97
  1050. package/server/modules/vouchers/vo-so9.js +1 -119
  1051. package/server/modules/vouchers/vo-vanchuyen.js +1 -14
  1052. package/server/modules/vouchers/vo-xhd.js +1 -33
  1053. package/server/route.js +1 -51
  1054. package/server/services/invoiceFetcher.js +1 -15
  1055. package/server/sslConfig.js +1 -2
  1056. package/server/transactionMiddleware.js +1 -5
  1057. package/server/workers/backupApp.js +1 -9
  1058. package/server/workers/calcGrid.js +1 -9
  1059. package/server/workers/customerOnImport.js +1 -8
  1060. package/server/workers/dmvtOnImport.js +1 -9
  1061. package/server/workers/excelParser.js +1 -9
  1062. package/server/workers/inputWorker.js +1 -6
  1063. package/server/workers/pushNotify.js +1 -10
  1064. package/server/workers/reportWorker.js +1 -7
  1065. package/server/workers/restoreApp.js +1 -23
  1066. package/server/workers/runScript.js +1 -4
  1067. package/server/workers/sendEmail.js +1 -13
  1068. package/server/workers/webhook.js +1 -5
@@ -1,4 +1 @@
1
- const congdoansxSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_cong_doan:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ten_cong_doan:{type:String,required:!0,maxlength:1024},stt:{type:Number,default:0},phu_trach:{type:String,uppercase:!0,trim:!0},ten_phu_trach:String,phoi_hop:{type:String,uppercase:!0,trim:!0},exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,
2
- default:""},user_updated:{type:String,default:""},visible_to:{type:Number,default:0},visible_to_users:[String],update_right:[String],delete_right:[String],dataview_to:{type:Number,default:0},dataview_to_users:[String]});
3
- (global.configs||{}).createIndexes&&(congdoansxSchema.index({id_app:1,ma_cong_doan:1,ten_cong_doan:1}),congdoansxSchema.index({status:1}),congdoansxSchema.index({user_created:1,visible_to:1,visible_to_users:1}),congdoansxSchema.index({ma_cong_doan:"text",ten_cong_doan:"text",phu_trach:"text",ten_phu_trach:"text"},{name:"congdoansx_index_text"}));const model=mongoose.models.congdoansx||mongoose.model("congdoansx",congdoansxSchema);
4
- model.referenceKeys={ma_cong_doan:[{model:"socai",key:"ma_cong_doan",error:"C\u00f4ng \u0111o\u1ea1n {{VALUE}} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u"},{model:"sokho",key:"ma_cong_doan",error:"C\u00f4ng \u0111o\u1ea1n {{VALUE}} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u"}]};module.exports=model;
1
+ const _0x3aeb98=_0x3e6b;(function(_0x344592,_0x39283f){const _0x49ed5a=_0x3e6b,_0x3474cf=_0x344592();while(!![]){try{const _0x2db690=parseInt(_0x49ed5a(0x110))/0x1*(-parseInt(_0x49ed5a(0x101))/0x2)+parseInt(_0x49ed5a(0x10d))/0x3*(parseInt(_0x49ed5a(0x109))/0x4)+-parseInt(_0x49ed5a(0x119))/0x5+-parseInt(_0x49ed5a(0x10c))/0x6+parseInt(_0x49ed5a(0xf9))/0x7*(-parseInt(_0x49ed5a(0x10b))/0x8)+parseInt(_0x49ed5a(0x103))/0x9*(parseInt(_0x49ed5a(0x112))/0xa)+parseInt(_0x49ed5a(0x116))/0xb*(parseInt(_0x49ed5a(0xf6))/0xc);if(_0x2db690===_0x39283f)break;else _0x3474cf['push'](_0x3474cf['shift']());}catch(_0x4cfe27){_0x3474cf['push'](_0x3474cf['shift']());}}}(_0x5a36,0x41afd));const _0x235557=(function(){const _0x449be0=_0x3e6b,_0xaedc3={'etCtU':'congdoansx_index_text','CSlyH':function(_0x424082,_0x3c12c3){return _0x424082===_0x3c12c3;},'XfmVC':_0x449be0(0x105),'VNoKw':_0x449be0(0x114)};let _0xe7e71d=!![];return function(_0x318023,_0x2fa55e){const _0x4c514f=_0x449be0,_0x4453e6={'fdLRS':_0x4c514f(0xfc),'CFyOi':_0xaedc3['etCtU'],'NQysg':function(_0x10f059,_0x3ddba5){return _0xaedc3['CSlyH'](_0x10f059,_0x3ddba5);},'JEUsQ':_0xaedc3[_0x4c514f(0x102)]};if(_0xaedc3[_0x4c514f(0x11d)](_0xaedc3[_0x4c514f(0x113)],_0xaedc3['VNoKw'])){const _0x52dd2b=_0xe7e71d?function(){const _0xb8c8ab=_0x4c514f;if(_0x4453e6[_0xb8c8ab(0x11b)]('XNjIz','XNjIz')){if(_0x2fa55e){if(_0x4453e6['NQysg']('AZcDf',_0x4453e6[_0xb8c8ab(0x10a)])){const _0x445013=_0x2d74c3?function(){const _0x469fcc=_0xb8c8ab;if(_0xfc4209){const _0x1cfa52=_0x3d2de9[_0x469fcc(0xff)](_0x3ff241,arguments);return _0x173379=null,_0x1cfa52;}}:function(){};return _0x44e28a=![],_0x445013;}else{const _0x26324b=_0x2fa55e[_0xb8c8ab(0xff)](_0x318023,arguments);return _0x2fa55e=null,_0x26324b;}}}else _0x101493[_0xb8c8ab(0xf7)]({'id_app':0x1,'ma_cong_doan':0x1,'ten_cong_doan':0x1}),_0x3a423e[_0xb8c8ab(0xf7)]({'status':0x1}),_0x3aae34['index']({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}),_0xc8e2cb[_0xb8c8ab(0xf7)]({'ma_cong_doan':_0x4453e6['fdLRS'],'ten_cong_doan':_0x4453e6['fdLRS'],'phu_trach':_0x4453e6[_0xb8c8ab(0x10f)],'ten_phu_trach':_0x4453e6[_0xb8c8ab(0x10f)]},{'name':_0x4453e6['CFyOi']});}:function(){};return _0xe7e71d=![],_0x52dd2b;}else{const _0x3aa48e=_0x296bb4[_0x4c514f(0xff)](_0x5c7acd,arguments);return _0x4b40c7=null,_0x3aa48e;}};}()),_0x1bd1a1=_0x235557(this,function(){const _0x558b41=_0x3e6b,_0x228170={'nDUFh':_0x558b41(0x106)};return _0x1bd1a1[_0x558b41(0x118)]()[_0x558b41(0xfd)](_0x228170['nDUFh'])['toString']()[_0x558b41(0x100)](_0x1bd1a1)['search'](_0x228170[_0x558b41(0xfa)]);});_0x1bd1a1();const congdoansxSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_cong_doan':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ten_cong_doan':{'type':String,'required':!![],'maxlength':0x400},'stt':{'type':Number,'default':0x0},'phu_trach':{'type':String,'uppercase':!![],'trim':!![]},'ten_phu_trach':String,'phoi_hop':{'type':String,'uppercase':!![],'trim':!![]},'exfields':Schema['Types'][_0x3aeb98(0x11c)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x3aeb98(0x10e)]},'date_updated':{'type':Date,'default':Date[_0x3aeb98(0x10e)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'update_right':[String],'delete_right':[String],'dataview_to':{'type':Number,'default':0x0},'dataview_to_users':[String]});function _0x5a36(){const _0xa4cbd=['nZu3odq0ngnvwvb1Ba','Aw5KzxG','y29Uz2rVyw5ZEa','n1n3qvLstW','BKrvrMG','y29Uz2rVyw5ZEf9PBMrLEf90zxH0','Dgv4Da','C2vHCMnO','CMvMzxjLBMnLs2v5CW','yxbWBhK','y29UC3rYDwn0B3i','mMzqzvDPCq','wgzTvKm','ovjVr0zlqW','C29RAg8','zLbJwgC','kcGOlISPkYKRksSK','y29UzMLNCW','zxHWB3j0CW','ntGYntjmvM9Rt2C','sKvvC1e','mta2otm1mLrzyvbpBW','mtiXmdiXoe5Hr3fizG','mtHKAeLQww0','BM93','zMrmuLm','ndiYmtK3v2j2wMHL','Bw9KzwXZ','ndqYnJCYmhfhsLHwCq','vK5Vs3C','q3P2uwG','q8o0BMCGXjfV4BQHBIb7E1zbtfvfFx0GXjhdOYbWAmoHDcbZAw5OigtHU68GBgNHU4D1','mtf3Du5jyw4','BwfFy29Uz19KB2fU','Dg9tDhjPBMC','nJC0odi1zw1zCg9O','Bw9KzwW','tLf5C2C','twL4zwq','q1nSEuG'];_0x5a36=function(){return _0xa4cbd;};return _0x5a36();}(global[_0x3aeb98(0x107)]||{})['createIndexes']&&(congdoansxSchema[_0x3aeb98(0xf7)]({'id_app':0x1,'ma_cong_doan':0x1,'ten_cong_doan':0x1}),congdoansxSchema[_0x3aeb98(0xf7)]({'status':0x1}),congdoansxSchema[_0x3aeb98(0xf7)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}),congdoansxSchema[_0x3aeb98(0xf7)]({'ma_cong_doan':_0x3aeb98(0xfc),'ten_cong_doan':_0x3aeb98(0xfc),'phu_trach':_0x3aeb98(0xfc),'ten_phu_trach':'text'},{'name':_0x3aeb98(0xfb)}));const model=mongoose[_0x3aeb98(0x111)][_0x3aeb98(0xf8)]||mongoose[_0x3aeb98(0x11a)](_0x3aeb98(0xf8),congdoansxSchema);function _0x3e6b(_0xc68bc6,_0x557441){const _0x4e9877=_0x5a36();return _0x3e6b=function(_0x1bd1a1,_0x235557){_0x1bd1a1=_0x1bd1a1-0xf6;let _0x5a36d2=_0x4e9877[_0x1bd1a1];if(_0x3e6b['VFpjiz']===undefined){var _0x3e6bdb=function(_0x3f8a95){const _0x4a4298='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47533b='',_0x324561='',_0x51505a=_0x47533b+_0x3e6bdb;for(let _0x4f3cbd=0x0,_0x87c75c,_0x51db97,_0x15ec82=0x0;_0x51db97=_0x3f8a95['charAt'](_0x15ec82++);~_0x51db97&&(_0x87c75c=_0x4f3cbd%0x4?_0x87c75c*0x40+_0x51db97:_0x51db97,_0x4f3cbd++%0x4)?_0x47533b+=_0x51505a['charCodeAt'](_0x15ec82+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x87c75c>>(-0x2*_0x4f3cbd&0x6)):_0x4f3cbd:0x0){_0x51db97=_0x4a4298['indexOf'](_0x51db97);}for(let _0x2d74c3=0x0,_0x18a4a4=_0x47533b['length'];_0x2d74c3<_0x18a4a4;_0x2d74c3++){_0x324561+='%'+('00'+_0x47533b['charCodeAt'](_0x2d74c3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x324561);};_0x3e6b['teIZBa']=_0x3e6bdb,_0xc68bc6=arguments,_0x3e6b['VFpjiz']=!![];}const _0x1d6929=_0x4e9877[0x0],_0x28af2d=_0x1bd1a1+_0x1d6929,_0x11a8e1=_0xc68bc6[_0x28af2d];if(!_0x11a8e1){const _0x35c03e=function(_0x18e08c){this['pvIeHp']=_0x18e08c,this['qXyPwP']=[0x1,0x0,0x0],this['fxKvhA']=function(){return'newState';},this['ExSpAa']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['BsRfxC']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x35c03e['prototype']['XJSTGe']=function(){const _0x26961d=new RegExp(this['ExSpAa']+this['BsRfxC']),_0x44e28a=_0x26961d['test'](this['fxKvhA']['toString']())?--this['qXyPwP'][0x1]:--this['qXyPwP'][0x0];return this['uKTrxx'](_0x44e28a);},_0x35c03e['prototype']['uKTrxx']=function(_0xfc4209){if(!Boolean(~_0xfc4209))return _0xfc4209;return this['lTqNtB'](this['pvIeHp']);},_0x35c03e['prototype']['lTqNtB']=function(_0x32bbec){for(let _0x80f22b=0x0,_0x42fa0b=this['qXyPwP']['length'];_0x80f22b<_0x42fa0b;_0x80f22b++){this['qXyPwP']['push'](Math['round'](Math['random']())),_0x42fa0b=this['qXyPwP']['length'];}return _0x32bbec(this['qXyPwP'][0x0]);},new _0x35c03e(_0x3e6b)['XJSTGe'](),_0x5a36d2=_0x3e6b['teIZBa'](_0x5a36d2),_0xc68bc6[_0x28af2d]=_0x5a36d2;}else _0x5a36d2=_0x11a8e1;return _0x5a36d2;},_0x3e6b(_0xc68bc6,_0x557441);}model[_0x3aeb98(0xfe)]={'ma_cong_doan':[{'model':'socai','key':_0x3aeb98(0x117),'error':_0x3aeb98(0x115)},{'model':_0x3aeb98(0x104),'key':'ma_cong_doan','error':_0x3aeb98(0x115)}]},module[_0x3aeb98(0x108)]=model;
@@ -1,4 +1 @@
1
- const congtacvienSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},trang_thai:{type:String,default:"0",maxlength:32},username:{type:String,maxlength:1024},name:{type:String,maxlength:1024},phone:{type:String,maxlength:1024},email:{type:String,maxlength:1024},zalo:{type:String,maxlength:1024},whatsapp:{type:String,maxlength:1024},facebook:{type:String,maxlength:1024},address:{type:String,maxlength:1024},anh_cmnd:{type:String,maxlength:1024},so_cmnd:{type:String,maxlength:1024},ngay_cap:{type:Date},
2
- noi_cap:{type:String,maxlength:1024},nguon_gioi_thieu:{type:String,maxlength:1024},code_gioi_thieu:{type:String,maxlength:1024},dang_nhap_otp:{type:String,maxlength:1024},tk_nh:{type:String,maxlength:1024},ten_tk_nh:{type:String,maxlength:1024},tai_nh:{type:String,maxlength:1024},thongtin_lh:{type:String,maxlength:1024},cam_ket:{type:String,maxlength:1024},anh_chandung:{type:String,maxlength:1024},anh_banglaixe:{type:String,maxlength:1024},anh_xac_nhan_tu_phap:{type:String,maxlength:1024},anh_chung_chi:{type:String,
3
- maxlength:1024},anh_bang_tot_nghiep:{type:String,maxlength:1024},chap_nhan_dieu_khoan:{type:Boolean},duyet:Boolean,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},visible_to:{type:Number,default:0},visible_to_users:[String],update_right:[String],delete_right:[String]});
4
- (global.configs||{}).createIndexes&&(congtacvienSchema.index({id_app:1,username:1,name:1}),congtacvienSchema.index({trang_thai:1}),congtacvienSchema.index({status:1}),congtacvienSchema.index({user_created:1,visible_to:1,visible_to_users:1}),congtacvienSchema.index({username:"text",name:"text",phone:"text",email:"text",address:"text"},{name:"congtacvien_index_text"}));const model=mongoose.models.congtacvien||mongoose.model("congtacvien",congtacvienSchema);module.exports=model;
1
+ const _0x51e956=_0x43e4;(function(_0x128b2e,_0x1e8956){const _0x4b4d73=_0x43e4,_0x4ea4e0=_0x128b2e();while(!![]){try{const _0x57a7a7=-parseInt(_0x4b4d73(0x14f))/0x1*(-parseInt(_0x4b4d73(0x138))/0x2)+parseInt(_0x4b4d73(0x14a))/0x3+parseInt(_0x4b4d73(0x135))/0x4+parseInt(_0x4b4d73(0x137))/0x5+parseInt(_0x4b4d73(0x133))/0x6+parseInt(_0x4b4d73(0x13d))/0x7*(parseInt(_0x4b4d73(0x144))/0x8)+parseInt(_0x4b4d73(0x140))/0x9*(-parseInt(_0x4b4d73(0x12d))/0xa);if(_0x57a7a7===_0x1e8956)break;else _0x4ea4e0['push'](_0x4ea4e0['shift']());}catch(_0x4a437f){_0x4ea4e0['push'](_0x4ea4e0['shift']());}}}(_0x13b2,0x942d7));const _0x308bd9=(function(){const _0x4d78b2=_0x43e4,_0x1ae818={'uLhGy':'text','TgWOd':_0x4d78b2(0x13a),'MTkrt':function(_0x132593,_0x3cef25){return _0x132593!==_0x3cef25;},'QeLOd':_0x4d78b2(0x150),'XTuwG':_0x4d78b2(0x12f)};let _0x16fc31=!![];return function(_0x26b859,_0x1f493c){const _0x4ce664=_0x4d78b2,_0x55323a={'hJGDH':_0x1ae818[_0x4ce664(0x148)],'BGSPf':_0x1ae818['TgWOd'],'LpVKl':function(_0x301b1d,_0x55e069){const _0x166a78=_0x4ce664;return _0x1ae818[_0x166a78(0x14d)](_0x301b1d,_0x55e069);},'iYgjX':_0x4ce664(0x131)};if(_0x1ae818[_0x4ce664(0x14d)](_0x1ae818[_0x4ce664(0x13e)],_0x1ae818[_0x4ce664(0x12e)])){const _0x527bb1=_0x16fc31?function(){const _0x3f02c4=_0x4ce664,_0x234a6e={'MyHrz':_0x55323a[_0x3f02c4(0x136)],'MJGzB':_0x55323a[_0x3f02c4(0x155)]};if(_0x55323a[_0x3f02c4(0x145)](_0x3f02c4(0x131),_0x55323a[_0x3f02c4(0x147)])){if(_0x4baa01){const _0x5cb381=_0x138294[_0x3f02c4(0x14e)](_0x1d8343,arguments);return _0x499a23=null,_0x5cb381;}}else{if(_0x1f493c){if(_0x55323a[_0x3f02c4(0x145)](_0x3f02c4(0x152),_0x3f02c4(0x14b))){const _0x147269=_0x1f493c[_0x3f02c4(0x14e)](_0x26b859,arguments);return _0x1f493c=null,_0x147269;}else _0x3a288f['index']({'id_app':0x1,'username':0x1,'name':0x1}),_0xc02c79[_0x3f02c4(0x157)]({'trang_thai':0x1}),_0x30c00b[_0x3f02c4(0x157)]({'status':0x1}),_0x4698da['index']({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}),_0x439693[_0x3f02c4(0x157)]({'username':_0x3f02c4(0x146),'name':_0x234a6e[_0x3f02c4(0x143)],'phone':_0x234a6e[_0x3f02c4(0x143)],'email':_0x3f02c4(0x146),'address':_0x234a6e['MyHrz']},{'name':_0x234a6e[_0x3f02c4(0x132)]});}}}:function(){};return _0x16fc31=![],_0x527bb1;}else{const _0x1cc33c=_0xa202c5?function(){if(_0x17e138){const _0x273781=_0x57842f['apply'](_0x30ff24,arguments);return _0x2cd7f0=null,_0x273781;}}:function(){};return _0x447cd8=![],_0x1cc33c;}};}()),_0x222143=_0x308bd9(this,function(){const _0x169881=_0x43e4,_0x137412={'JnDNt':_0x169881(0x139)};return _0x222143[_0x169881(0x149)]()[_0x169881(0x14c)](_0x137412[_0x169881(0x141)])[_0x169881(0x149)]()[_0x169881(0x158)](_0x222143)[_0x169881(0x14c)]('(((.+)+)+)+$');});function _0x43e4(_0x2f745d,_0x5e4c20){const _0x1c8b93=_0x13b2();return _0x43e4=function(_0x222143,_0x308bd9){_0x222143=_0x222143-0x12d;let _0x13b215=_0x1c8b93[_0x222143];if(_0x43e4['psmVRb']===undefined){var _0x43e441=function(_0x23d582){const _0xa10bf6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfae710='',_0x215dae='',_0x24b7e7=_0xfae710+_0x43e441;for(let _0x382988=0x0,_0x14155a,_0x32d2d3,_0x2c628f=0x0;_0x32d2d3=_0x23d582['charAt'](_0x2c628f++);~_0x32d2d3&&(_0x14155a=_0x382988%0x4?_0x14155a*0x40+_0x32d2d3:_0x32d2d3,_0x382988++%0x4)?_0xfae710+=_0x24b7e7['charCodeAt'](_0x2c628f+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x14155a>>(-0x2*_0x382988&0x6)):_0x382988:0x0){_0x32d2d3=_0xa10bf6['indexOf'](_0x32d2d3);}for(let _0xa202c5=0x0,_0x4b5f16=_0xfae710['length'];_0xa202c5<_0x4b5f16;_0xa202c5++){_0x215dae+='%'+('00'+_0xfae710['charCodeAt'](_0xa202c5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x215dae);};_0x43e4['fOOvTd']=_0x43e441,_0x2f745d=arguments,_0x43e4['psmVRb']=!![];}const _0x4e054f=_0x1c8b93[0x0],_0x1dd3b1=_0x222143+_0x4e054f,_0x387156=_0x2f745d[_0x1dd3b1];if(!_0x387156){const _0x355b66=function(_0x7546a0){this['XKtllC']=_0x7546a0,this['tejImn']=[0x1,0x0,0x0],this['hImRqI']=function(){return'newState';},this['NAJsNj']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['VAymGu']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x355b66['prototype']['ijDVWN']=function(){const _0x12c7fa=new RegExp(this['NAJsNj']+this['VAymGu']),_0x447cd8=_0x12c7fa['test'](this['hImRqI']['toString']())?--this['tejImn'][0x1]:--this['tejImn'][0x0];return this['chAeRn'](_0x447cd8);},_0x355b66['prototype']['chAeRn']=function(_0x17e138){if(!Boolean(~_0x17e138))return _0x17e138;return this['qiBLzr'](this['XKtllC']);},_0x355b66['prototype']['qiBLzr']=function(_0x2d5aa7){for(let _0x120c20=0x0,_0x1aa2e6=this['tejImn']['length'];_0x120c20<_0x1aa2e6;_0x120c20++){this['tejImn']['push'](Math['round'](Math['random']())),_0x1aa2e6=this['tejImn']['length'];}return _0x2d5aa7(this['tejImn'][0x0]);},new _0x355b66(_0x43e4)['ijDVWN'](),_0x13b215=_0x43e4['fOOvTd'](_0x13b215),_0x2f745d[_0x1dd3b1]=_0x13b215;}else _0x13b215=_0x387156;return _0x13b215;},_0x43e4(_0x2f745d,_0x5e4c20);}_0x222143();const congtacvienSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'trang_thai':{'type':String,'default':'0','maxlength':0x20},'username':{'type':String,'maxlength':0x400},'name':{'type':String,'maxlength':0x400},'phone':{'type':String,'maxlength':0x400},'email':{'type':String,'maxlength':0x400},'zalo':{'type':String,'maxlength':0x400},'whatsapp':{'type':String,'maxlength':0x400},'facebook':{'type':String,'maxlength':0x400},'address':{'type':String,'maxlength':0x400},'anh_cmnd':{'type':String,'maxlength':0x400},'so_cmnd':{'type':String,'maxlength':0x400},'ngay_cap':{'type':Date},'noi_cap':{'type':String,'maxlength':0x400},'nguon_gioi_thieu':{'type':String,'maxlength':0x400},'code_gioi_thieu':{'type':String,'maxlength':0x400},'dang_nhap_otp':{'type':String,'maxlength':0x400},'tk_nh':{'type':String,'maxlength':0x400},'ten_tk_nh':{'type':String,'maxlength':0x400},'tai_nh':{'type':String,'maxlength':0x400},'thongtin_lh':{'type':String,'maxlength':0x400},'cam_ket':{'type':String,'maxlength':0x400},'anh_chandung':{'type':String,'maxlength':0x400},'anh_banglaixe':{'type':String,'maxlength':0x400},'anh_xac_nhan_tu_phap':{'type':String,'maxlength':0x400},'anh_chung_chi':{'type':String,'maxlength':0x400},'anh_bang_tot_nghiep':{'type':String,'maxlength':0x400},'chap_nhan_dieu_khoan':{'type':Boolean},'duyet':Boolean,'exfields':Schema['Types'][_0x51e956(0x153)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x51e956(0x142)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'update_right':[String],'delete_right':[String]});if((global[_0x51e956(0x130)]||{})[_0x51e956(0x156)]){const tNgdYB=_0x51e956(0x13c)[_0x51e956(0x154)]('|');let VtQWba=0x0;while(!![]){switch(tNgdYB[VtQWba++]){case'0':congtacvienSchema[_0x51e956(0x157)]({'id_app':0x1,'username':0x1,'name':0x1});continue;case'1':congtacvienSchema[_0x51e956(0x157)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1});continue;case'2':congtacvienSchema[_0x51e956(0x157)]({'username':_0x51e956(0x146),'name':_0x51e956(0x146),'phone':_0x51e956(0x146),'email':_0x51e956(0x146),'address':_0x51e956(0x146)},{'name':_0x51e956(0x13a)});continue;case'3':congtacvienSchema['index']({'status':0x1});continue;case'4':congtacvienSchema[_0x51e956(0x157)]({'trang_thai':0x1});continue;}break;}}function _0x13b2(){const _0x68cfe5=['uwvmt2q','y29Uz3rHy3zPzw4','nJiWotfsu0n4txq','sM5etNq','BM93','txLiCNO','nta0D1jPtg5y','thbws2W','Dgv4Da','AvLNALG','DuXOr3K','Dg9tDhjPBMC','mtiZoduWnxLZCvfRCa','v0XHq0m','C2vHCMnO','tvrRCNq','yxbWBhK','n1fwtvfTuq','vwT6sLe','Bw9KzwW','q1Hms3e','twL4zwq','C3bSAxq','qKDtugy','y3jLyxrLsw5KzxHLCW','Aw5KzxG','y29UC3rYDwn0B3i','mJK5me16EMvntW','wfr1D0C','uhH5ExK','y29UzMLNCW','uw1itMW','tuPhEKi','mZi1mdm2mKjms0LIzG','Bw9KzwXZ','mZC2nda1mMLZz2fZyq','AePhreG','ntqXode1s2rkq2Tk','mtq0mJjxDu9kzwO','kcGOlISPkYKRksSK','y29Uz3rHy3zPzw5FAw5KzxHFDgv4Da','zxHWB3j0CW','mhW0Fdn8mxWY','nJGZnJLrA2z0AKW'];_0x13b2=function(){return _0x68cfe5;};return _0x13b2();}const model=mongoose[_0x51e956(0x134)][_0x51e956(0x13f)]||mongoose[_0x51e956(0x151)]('congtacvien',congtacvienSchema);module[_0x51e956(0x13b)]=model;
@@ -1,8 +1 @@
1
- const congthuctinhgiabanSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},stt_uu_tien:Number,ma_vt:{type:String,uppercase:!0,default:"",maxlength:1024,trim:!0},ten_vt:String,ma_nvt:{type:String,default:"",maxlength:1024,trim:!0},ten_nvt:String,mieu_ta:{type:String,default:"",maxlength:1024},ma_kh:{type:String,default:"",maxlength:32,trim:!0},ten_kh:String,nh_kh:{type:String,maxlength:1024,trim:!0},ten_nh_kh:String,nh_kh2:{type:String,maxlength:1024,trim:!0},ten_nh_kh2:String,nh_kh3:{type:String,
2
- maxlength:1024,trim:!0},ten_nh_kh3:String,nh_kh4:{type:String,maxlength:1024,trim:!0},ten_nh_kh4:String,nh_kh5:{type:String,maxlength:1024,trim:!0},ten_nh_kh5:String,ma_kho:{type:String,default:"",maxlength:32,trim:!0},ten_kho:String,ma_ban:{type:String,default:"",maxlength:32,trim:!0},ten_ban:String,ma_tt1:{type:String,trim:!0},ma_tt2:{type:String,trim:!0},ma_tt3:{type:String,trim:!0},sl_tu:{type:Number,default:0},sl_den:{type:Number,default:0},t_sl_tu:{type:Number,default:0},t_sl_den:{type:Number,
3
- default:0},ty_le_lai:Number,gia_ban_le:{type:Number,default:0},gia_ban_buon:{type:Number,default:0},hieu_luc_tu:{type:Date},hieu_luc_den:{type:Date},ap_dung_lan_mua_thu:{type:Number},ap_dung_lan_mua_tu_thu:{type:Number},ap_dung_lan_mua_den_thu:{type:Number},online:{type:Boolean},offline:{type:Boolean},exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,
4
- default:""},dmvt:{type:Schema.Types.ObjectId,ref:"dmvt",localField:["ma_vt"],foreignField:["ma_vt"]},dmkh:{type:Schema.Types.ObjectId,ref:"customer",localField:["ma_kh"],foreignField:["ma_kh"]},dmkho:{type:Schema.Types.ObjectId,ref:"dmkho",localField:["ma_kho"],foreignField:["ma_kho"]},dmnvt:{type:Schema.Types.ObjectId,ref:"dmnvt",localField:["ma_nvt"],foreignField:["_id"]}},{toJSON:{virtuals:!0}});
5
- (global.configs||{}).createIndexes&&(congthuctinhgiabanSchema.index({id_app:1,ma_vt:1,ma_kho:1,ma_kh:1,hieu_luc_tu:-1,hieu_luc_den:-1}),congthuctinhgiabanSchema.index({ma_nvt:1}),congthuctinhgiabanSchema.index({nh_kh:1}),congthuctinhgiabanSchema.index({nh_kh2:1}),congthuctinhgiabanSchema.index({nh_kh3:1}),congthuctinhgiabanSchema.index({nh_kh4:1}),congthuctinhgiabanSchema.index({nh_kh5:1}),congthuctinhgiabanSchema.index({ma_kho:1}),congthuctinhgiabanSchema.index({ma_ban:1}),congthuctinhgiabanSchema.index({ma_kh:1}),
6
- congthuctinhgiabanSchema.index({ma_tt1:1}),congthuctinhgiabanSchema.index({ma_tt2:1}),congthuctinhgiabanSchema.index({ma_tt3:1}),congthuctinhgiabanSchema.index({ap_dung_lan_mua_thu:1}),congthuctinhgiabanSchema.index({ap_dung_lan_mua_tu_thu:1}),congthuctinhgiabanSchema.index({ap_dung_lan_mua_den_thu:1}),congthuctinhgiabanSchema.index({sl_tu:1}),congthuctinhgiabanSchema.index({sl_den:1}),congthuctinhgiabanSchema.index({t_sl_tu:1}),congthuctinhgiabanSchema.index({t_sl_den:1}),congthuctinhgiabanSchema.index({date_updated:-1}),
7
- congthuctinhgiabanSchema.index({date_created:-1}),congthuctinhgiabanSchema.index({user_created:1}),congthuctinhgiabanSchema.index({status:1}),congthuctinhgiabanSchema.index({online:1}),congthuctinhgiabanSchema.index({offline:1}),congthuctinhgiabanSchema.index({mieu_ta:"text",ma_vt:"text",ten_vt:"text",ma_kh:"text",ten_kh:"text",ma_nvt:"text",ten_nvt:"text",ma_kho:"text",ten_kho:"text"},{name:"congthuctinhgiaban_index_text"}));
8
- const model=mongoose.models.congthuctinhgiaban||mongoose.model("congthuctinhgiaban",congthuctinhgiabanSchema);module.exports=model;
1
+ const _0x261e5c=_0x2924;(function(_0x25f47f,_0x24a75f){const _0x34d5f8=_0x2924,_0x48c653=_0x25f47f();while(!![]){try{const _0x43e420=-parseInt(_0x34d5f8(0x122))/0x1*(parseInt(_0x34d5f8(0x125))/0x2)+parseInt(_0x34d5f8(0x140))/0x3+-parseInt(_0x34d5f8(0x12f))/0x4*(-parseInt(_0x34d5f8(0x13c))/0x5)+-parseInt(_0x34d5f8(0x13d))/0x6+-parseInt(_0x34d5f8(0x124))/0x7+parseInt(_0x34d5f8(0x133))/0x8+parseInt(_0x34d5f8(0x129))/0x9;if(_0x43e420===_0x24a75f)break;else _0x48c653['push'](_0x48c653['shift']());}catch(_0x4f5fca){_0x48c653['push'](_0x48c653['shift']());}}}(_0x242f,0x31493));function _0x2924(_0x124f98,_0x7382c8){const _0x4ff64e=_0x242f();return _0x2924=function(_0x4e3247,_0x35d721){_0x4e3247=_0x4e3247-0x11d;let _0x242fe4=_0x4ff64e[_0x4e3247];if(_0x2924['FVFdoz']===undefined){var _0x29240b=function(_0x42df0b){const _0x22bd99='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31b118='',_0x1896df='',_0x1a9b01=_0x31b118+_0x29240b;for(let _0x4aa9e1=0x0,_0xab0b79,_0x4204af,_0xc3f9dd=0x0;_0x4204af=_0x42df0b['charAt'](_0xc3f9dd++);~_0x4204af&&(_0xab0b79=_0x4aa9e1%0x4?_0xab0b79*0x40+_0x4204af:_0x4204af,_0x4aa9e1++%0x4)?_0x31b118+=_0x1a9b01['charCodeAt'](_0xc3f9dd+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xab0b79>>(-0x2*_0x4aa9e1&0x6)):_0x4aa9e1:0x0){_0x4204af=_0x22bd99['indexOf'](_0x4204af);}for(let _0x721227=0x0,_0x34061c=_0x31b118['length'];_0x721227<_0x34061c;_0x721227++){_0x1896df+='%'+('00'+_0x31b118['charCodeAt'](_0x721227)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1896df);};_0x2924['xxHiSl']=_0x29240b,_0x124f98=arguments,_0x2924['FVFdoz']=!![];}const _0x396329=_0x4ff64e[0x0],_0x4a8430=_0x4e3247+_0x396329,_0x1c3099=_0x124f98[_0x4a8430];if(!_0x1c3099){const _0x55c93c=function(_0x6f21c3){this['boQlEH']=_0x6f21c3,this['VZIeVU']=[0x1,0x0,0x0],this['dEapPP']=function(){return'newState';},this['Qehrmy']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['znbxLm']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x55c93c['prototype']['qDWmgk']=function(){const _0x40e698=new RegExp(this['Qehrmy']+this['znbxLm']),_0x2d79e3=_0x40e698['test'](this['dEapPP']['toString']())?--this['VZIeVU'][0x1]:--this['VZIeVU'][0x0];return this['xBtnMM'](_0x2d79e3);},_0x55c93c['prototype']['xBtnMM']=function(_0x35ce31){if(!Boolean(~_0x35ce31))return _0x35ce31;return this['DlcLkj'](this['boQlEH']);},_0x55c93c['prototype']['DlcLkj']=function(_0x20c3b0){for(let _0x59f41d=0x0,_0x5b27cc=this['VZIeVU']['length'];_0x59f41d<_0x5b27cc;_0x59f41d++){this['VZIeVU']['push'](Math['round'](Math['random']())),_0x5b27cc=this['VZIeVU']['length'];}return _0x20c3b0(this['VZIeVU'][0x0]);},new _0x55c93c(_0x2924)['qDWmgk'](),_0x242fe4=_0x2924['xxHiSl'](_0x242fe4),_0x124f98[_0x4a8430]=_0x242fe4;}else _0x242fe4=_0x1c3099;return _0x242fe4;},_0x2924(_0x124f98,_0x7382c8);}const _0x35d721=(function(){const _0x5ddb9d=_0x2924,_0x30b1de={'sXhHE':_0x5ddb9d(0x127)};let _0x3f7d5d=!![];return function(_0x5c1c78,_0xbce66a){const _0x1c2c18=_0x3f7d5d?function(){const _0x3e0c36=_0x2924;if(_0x3e0c36(0x127)===_0x30b1de['sXhHE']){if(_0xbce66a){const _0x364b05=_0xbce66a[_0x3e0c36(0x136)](_0x5c1c78,arguments);return _0xbce66a=null,_0x364b05;}}else{const _0x5df51a=_0x721227?function(){const _0x24c1e2=_0x3e0c36;if(_0x35ce31){const _0xec4e4d=_0x38b708[_0x24c1e2(0x136)](_0x108f3c,arguments);return _0x4b3df7=null,_0xec4e4d;}}:function(){};return _0x2d79e3=![],_0x5df51a;}}:function(){};return _0x3f7d5d=![],_0x1c2c18;};}()),_0x4e3247=_0x35d721(this,function(){const _0x1daa36=_0x2924;return _0x4e3247[_0x1daa36(0x131)]()[_0x1daa36(0x13e)](_0x1daa36(0x132))[_0x1daa36(0x131)]()[_0x1daa36(0x12a)](_0x4e3247)['search'](_0x1daa36(0x132));});_0x4e3247();const congthuctinhgiabanSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'stt_uu_tien':Number,'ma_vt':{'type':String,'uppercase':!![],'default':'','maxlength':0x400,'trim':!![]},'ten_vt':String,'ma_nvt':{'type':String,'default':'','maxlength':0x400,'trim':!![]},'ten_nvt':String,'mieu_ta':{'type':String,'default':'','maxlength':0x400},'ma_kh':{'type':String,'default':'','maxlength':0x20,'trim':!![]},'ten_kh':String,'nh_kh':{'type':String,'maxlength':0x400,'trim':!![]},'ten_nh_kh':String,'nh_kh2':{'type':String,'maxlength':0x400,'trim':!![]},'ten_nh_kh2':String,'nh_kh3':{'type':String,'maxlength':0x400,'trim':!![]},'ten_nh_kh3':String,'nh_kh4':{'type':String,'maxlength':0x400,'trim':!![]},'ten_nh_kh4':String,'nh_kh5':{'type':String,'maxlength':0x400,'trim':!![]},'ten_nh_kh5':String,'ma_kho':{'type':String,'default':'','maxlength':0x20,'trim':!![]},'ten_kho':String,'ma_ban':{'type':String,'default':'','maxlength':0x20,'trim':!![]},'ten_ban':String,'ma_tt1':{'type':String,'trim':!![]},'ma_tt2':{'type':String,'trim':!![]},'ma_tt3':{'type':String,'trim':!![]},'sl_tu':{'type':Number,'default':0x0},'sl_den':{'type':Number,'default':0x0},'t_sl_tu':{'type':Number,'default':0x0},'t_sl_den':{'type':Number,'default':0x0},'ty_le_lai':Number,'gia_ban_le':{'type':Number,'default':0x0},'gia_ban_buon':{'type':Number,'default':0x0},'hieu_luc_tu':{'type':Date},'hieu_luc_den':{'type':Date},'ap_dung_lan_mua_thu':{'type':Number},'ap_dung_lan_mua_tu_thu':{'type':Number},'ap_dung_lan_mua_den_thu':{'type':Number},'online':{'type':Boolean},'offline':{'type':Boolean},'exfields':Schema['Types'][_0x261e5c(0x11f)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x261e5c(0x141)]},'date_updated':{'type':Date,'default':Date[_0x261e5c(0x141)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'dmvt':{'type':Schema['Types'][_0x261e5c(0x12d)],'ref':_0x261e5c(0x11d),'localField':[_0x261e5c(0x12b)],'foreignField':['ma_vt']},'dmkh':{'type':Schema['Types'][_0x261e5c(0x12d)],'ref':_0x261e5c(0x12e),'localField':[_0x261e5c(0x13a)],'foreignField':['ma_kh']},'dmkho':{'type':Schema[_0x261e5c(0x134)][_0x261e5c(0x12d)],'ref':_0x261e5c(0x13b),'localField':['ma_kho'],'foreignField':[_0x261e5c(0x11e)]},'dmnvt':{'type':Schema[_0x261e5c(0x134)]['ObjectId'],'ref':_0x261e5c(0x120),'localField':[_0x261e5c(0x126)],'foreignField':[_0x261e5c(0x121)]}},{'toJSON':{'virtuals':!![]}});if((global[_0x261e5c(0x137)]||{})[_0x261e5c(0x12c)]){const EoheQH=_0x261e5c(0x123)['split']('|');let dOwrXJ=0x0;while(!![]){switch(EoheQH[dOwrXJ++]){case'0':congthuctinhgiabanSchema['index']({'ap_dung_lan_mua_thu':0x1});continue;case'1':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'sl_tu':0x1});continue;case'2':congthuctinhgiabanSchema['index']({'user_created':0x1});continue;case'3':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'id_app':0x1,'ma_vt':0x1,'ma_kho':0x1,'ma_kh':0x1,'hieu_luc_tu':-0x1,'hieu_luc_den':-0x1});continue;case'4':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_tt2':0x1});continue;case'5':congthuctinhgiabanSchema['index']({'nh_kh4':0x1});continue;case'6':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_tt3':0x1});continue;case'7':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ap_dung_lan_mua_den_thu':0x1});continue;case'8':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ap_dung_lan_mua_tu_thu':0x1});continue;case'9':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_nvt':0x1});continue;case'10':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'status':0x1});continue;case'11':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'offline':0x1});continue;case'12':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'t_sl_tu':0x1});continue;case'13':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_tt1':0x1});continue;case'14':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'mieu_ta':_0x261e5c(0x130),'ma_vt':_0x261e5c(0x130),'ten_vt':_0x261e5c(0x130),'ma_kh':'text','ten_kh':_0x261e5c(0x130),'ma_nvt':_0x261e5c(0x130),'ten_nvt':_0x261e5c(0x130),'ma_kho':_0x261e5c(0x130),'ten_kho':_0x261e5c(0x130)},{'name':_0x261e5c(0x128)});continue;case'15':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_kho':0x1});continue;case'16':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'t_sl_den':0x1});continue;case'17':congthuctinhgiabanSchema['index']({'date_updated':-0x1});continue;case'18':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'nh_kh':0x1});continue;case'19':congthuctinhgiabanSchema['index']({'nh_kh5':0x1});continue;case'20':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'nh_kh3':0x1});continue;case'21':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'sl_den':0x1});continue;case'22':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'nh_kh2':0x1});continue;case'23':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'date_created':-0x1});continue;case'24':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_kh':0x1});continue;case'25':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'online':0x1});continue;case'26':congthuctinhgiabanSchema[_0x261e5c(0x13f)]({'ma_ban':0x1});continue;}break;}}const model=mongoose[_0x261e5c(0x139)][_0x261e5c(0x135)]||mongoose['model'](_0x261e5c(0x135),congthuctinhgiabanSchema);module[_0x261e5c(0x138)]=model;function _0x242f(){const _0x8229cd=['ndmXmJKXq3n5svnY','mLbvvvv2rq','BwfFBNz0','uKrZuMi','y29Uz3rODwn0Aw5Oz2LHyMfUx2LUzgv4x3rLEhq','mJuZnZq3offmrwfMwG','y29UC3rYDwn0B3i','BwfFDNq','y3jLyxrLsw5KzxHLCW','t2jQzwn0swq','y3vZDg9Tzxi','ndy0uwPMzefi','Dgv4Da','Dg9tDhjPBMC','kcGOlISPkYKRksSK','mJa3nZq3mM1ltxvIDq','vhLWzxm','y29Uz3rODwn0Aw5Oz2LHyMfU','yxbWBhK','y29UzMLNCW','zxHWB3j0CW','Bw9KzwXZ','BwfFA2G','zg1RAg8','nJaWnxDQtgPKyq','mJaWmdu5mMP4CeXuyG','C2vHCMnO','Aw5KzxG','nZyXmdyXzLzZrw5Z','BM93','zg12Da','BwfFA2HV','twL4zwq','zg1UDNq','x2LK','mZm3nZa5Dg5buNDv','m3W5Fde4FdiYFdiWFdv8mtL8mtv8mJz8mJr8mtn8nhW2Fdb8ohW3Fdf8mJf8mtj8mtz8mtD8mJn8mNWXmhWYnxWXmxWXna'];_0x242f=function(){return _0x8229cd;};return _0x242f();}
@@ -1,4 +1 @@
1
- const consultantSchema=new Schema({stt:{type:Number,default:0},id_app:{type:String,required:!0,maxlength:1024},consultant_code:{type:String,required:!0,uppercase:!0,maxlength:32},consultant_name:{type:String,required:!0,maxlength:1024},consultant_name_en:{type:String,maxlength:1024},consultant_group:{type:String,maxlength:1024},picture:{type:String,maxlength:1024},description:String,description_en:String,exfields:Schema.Types.Mixed,shared:Boolean,status:{type:Boolean,default:!0},date_created:{type:Date,
2
- default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},visible_to:{type:Number,default:0},visible_to_users:[String],update_right:[String],delete_right:[String],dataview_to:{type:Number,default:0},dataview_to_users:[String]});
3
- (global.configs||{}).createIndexes&&(consultantSchema.index({id_app:1,consultant_name:1,consultant_code:1}),consultantSchema.index({status:1}),consultantSchema.index({user_created:1,visible_to:1,visible_to_users:1}),consultantSchema.index({consultant_name:"text",consultant_code:"text",description:"text"},{name:"consultant_index_text"}));const model=mongoose.models.consultant||mongoose.model("consultant",consultantSchema);
4
- model.getInfo=async($id_app$$,$condition$$,$fields$$)=>{$condition$$.id_app=$id_app$$;return new Promise(($resolve$$,$reject$$)=>{model.findOne($condition$$).lean().then($rs$$=>{if(!$rs$$)return $reject$$(Error("Can't find info"));$resolve$$($fields$$?$rs$$[$fields$$]:$rs$$)}).catch($e$$=>{$reject$$(Error($e$$.message))})})};module.exports=model;
1
+ const _0x4d880c=_0x2bd4;function _0x2bd4(_0x38763f,_0x4e285b){const _0x10cfbd=_0x2cf0();return _0x2bd4=function(_0x7bc660,_0x35075a){_0x7bc660=_0x7bc660-0x1e0;let _0x2cf07a=_0x10cfbd[_0x7bc660];if(_0x2bd4['mJGidc']===undefined){var _0x2bd49e=function(_0xc1c170){const _0x2f7e8a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4cdb42='',_0x94140a='',_0xd72086=_0x4cdb42+_0x2bd49e;for(let _0x558b88=0x0,_0x19c7c0,_0x419e38,_0x109293=0x0;_0x419e38=_0xc1c170['charAt'](_0x109293++);~_0x419e38&&(_0x19c7c0=_0x558b88%0x4?_0x19c7c0*0x40+_0x419e38:_0x419e38,_0x558b88++%0x4)?_0x4cdb42+=_0xd72086['charCodeAt'](_0x109293+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x19c7c0>>(-0x2*_0x558b88&0x6)):_0x558b88:0x0){_0x419e38=_0x2f7e8a['indexOf'](_0x419e38);}for(let _0x114d9d=0x0,_0x542528=_0x4cdb42['length'];_0x114d9d<_0x542528;_0x114d9d++){_0x94140a+='%'+('00'+_0x4cdb42['charCodeAt'](_0x114d9d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x94140a);};_0x2bd4['iPYGMv']=_0x2bd49e,_0x38763f=arguments,_0x2bd4['mJGidc']=!![];}const _0xb8f95f=_0x10cfbd[0x0],_0x2d1937=_0x7bc660+_0xb8f95f,_0x140de4=_0x38763f[_0x2d1937];if(!_0x140de4){const _0x3f5426=function(_0x3381b3){this['GenpNE']=_0x3381b3,this['TWRFME']=[0x1,0x0,0x0],this['sbvctA']=function(){return'newState';},this['jeFByx']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['aqDmCc']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3f5426['prototype']['fUWKWm']=function(){const _0x3c333c=new RegExp(this['jeFByx']+this['aqDmCc']),_0x1e6b80=_0x3c333c['test'](this['sbvctA']['toString']())?--this['TWRFME'][0x1]:--this['TWRFME'][0x0];return this['aIceJD'](_0x1e6b80);},_0x3f5426['prototype']['aIceJD']=function(_0x2bb684){if(!Boolean(~_0x2bb684))return _0x2bb684;return this['WuHLUW'](this['GenpNE']);},_0x3f5426['prototype']['WuHLUW']=function(_0x582637){for(let _0x4bfddd=0x0,_0x13ac85=this['TWRFME']['length'];_0x4bfddd<_0x13ac85;_0x4bfddd++){this['TWRFME']['push'](Math['round'](Math['random']())),_0x13ac85=this['TWRFME']['length'];}return _0x582637(this['TWRFME'][0x0]);},new _0x3f5426(_0x2bd4)['fUWKWm'](),_0x2cf07a=_0x2bd4['iPYGMv'](_0x2cf07a),_0x38763f[_0x2d1937]=_0x2cf07a;}else _0x2cf07a=_0x140de4;return _0x2cf07a;},_0x2bd4(_0x38763f,_0x4e285b);}(function(_0x98dd13,_0x36bf64){const _0x1f4239=_0x2bd4,_0x7304fa=_0x98dd13();while(!![]){try{const _0x192004=parseInt(_0x1f4239(0x1e7))/0x1+-parseInt(_0x1f4239(0x208))/0x2*(parseInt(_0x1f4239(0x1e1))/0x3)+-parseInt(_0x1f4239(0x1e4))/0x4+-parseInt(_0x1f4239(0x20f))/0x5+-parseInt(_0x1f4239(0x1e5))/0x6*(-parseInt(_0x1f4239(0x20a))/0x7)+-parseInt(_0x1f4239(0x20b))/0x8+parseInt(_0x1f4239(0x209))/0x9*(parseInt(_0x1f4239(0x1e9))/0xa);if(_0x192004===_0x36bf64)break;else _0x7304fa['push'](_0x7304fa['shift']());}catch(_0x4b4772){_0x7304fa['push'](_0x7304fa['shift']());}}}(_0x2cf0,0x745b7));const _0x35075a=(function(){const _0x283040={'wJkRz':'Can\x27t\x20find\x20info','kyOhF':function(_0x48b182,_0x5e0af5){return _0x48b182===_0x5e0af5;}};let _0x1c2d99=!![];return function(_0x1691a8,_0x1de670){const _0x5ac239=_0x2bd4,_0x2de31c={'YHaPK':_0x283040['wJkRz'],'HzOQm':function(_0x3a4e29,_0x255d32){return _0x3a4e29(_0x255d32);},'OBWQQ':function(_0x454fe8,_0x2731f8){return _0x283040['kyOhF'](_0x454fe8,_0x2731f8);},'iHhSQ':_0x5ac239(0x1f7)},_0x269d6d=_0x1c2d99?function(){const _0xccaf68=_0x5ac239;if(_0x2de31c[_0xccaf68(0x200)](_0x2de31c[_0xccaf68(0x1e0)],'BIfxS')){if(_0x1de670){const _0x3474a5=_0x1de670[_0xccaf68(0x1f2)](_0x1691a8,arguments);return _0x1de670=null,_0x3474a5;}}else{const _0x3b617b={'DyMTF':_0x2de31c[_0xccaf68(0x1e6)],'cNsGv':function(_0x96d266,_0x43a718){return _0x2de31c['HzOQm'](_0x96d266,_0x43a718);},'LnIDO':function(_0xa3b711,_0x4f7e70){const _0x2651cd=_0xccaf68;return _0x2de31c[_0x2651cd(0x1fb)](_0xa3b711,_0x4f7e70);}};_0x26094f['findOne'](_0x410387)['lean']()[_0xccaf68(0x1fd)](_0x575811=>{const _0x2bebe1=_0xccaf68;if(!_0x575811)return _0x4253b3(new _0x409afe(_0x3b617b['DyMTF']));_0x3b617b[_0x2bebe1(0x1fa)](_0x4375ec,_0x4fac04?_0x575811[_0x218c72]:_0x575811);})[_0xccaf68(0x1f3)](_0xad75b5=>{const _0x175829=_0xccaf68;_0x3b617b[_0x175829(0x20d)](_0x4a1117,new _0x699914(_0xad75b5['message']));});}}:function(){};return _0x1c2d99=![],_0x269d6d;};}()),_0x7bc660=_0x35075a(this,function(){const _0x511a32=_0x2bd4,_0x292e4b={'CiFkV':'(((.+)+)+)+$'};return _0x7bc660[_0x511a32(0x1f8)]()[_0x511a32(0x211)](_0x292e4b[_0x511a32(0x1ea)])['toString']()['constructor'](_0x7bc660)[_0x511a32(0x211)](_0x292e4b[_0x511a32(0x1ea)]);});function _0x2cf0(){const _0x607ba8=['uu9wvvu','y29UzMLNCW','zMLUze9Uzq','v1jOs2C','zxHWB3j0CW','yxbWBhK','y2f0y2G','rLPTCuy','Dgv4Da','quTlCfe','qKLMEfm','Dg9tDhjPBMC','y29UC3vSDgfUDa','y05Zr3y','shPpuw0','zw5KBKG','DgHLBG','v0LYu2K','Bw9KzwW','t0jxuve','r2DOuwe','twL4zwq','A1LAr2m','Aw5KzxG','BgvHBG','BwvZC2fNzq','yvfhq2S','nZHRrwPQBeS','mJC2nJG1ntz4rw96yxy','ode2mZGYA3j3r3nc','nJe4nJm1mMLuuKfxAa','BM93','tg5jre8','y29UC3vSDgfUDf9PBMrLEf90zxH0','ndq2ntiXnwHzu2Tvuq','q2fUj3qGzMLUzcbPBMzV','C2vHCMnO','AuHOu1e','nJq4mZnQy0LntvC','y3jLyxrLsw5KzxHLCW','zKntzu0','mZy3mJu0ofHmuKfjAa','mtjsBuTeD1u','wuHHueS','ntK2mZy2t0rgsKPl','r3jXwha','mtb6vg1dyvy','q2LgA1y','Bw9KzwXZ','qvb1wxa'];_0x2cf0=function(){return _0x607ba8;};return _0x2cf0();}_0x7bc660();const consultantSchema=new Schema({'stt':{'type':Number,'default':0x0},'id_app':{'type':String,'required':!![],'maxlength':0x400},'consultant_code':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20},'consultant_name':{'type':String,'required':!![],'maxlength':0x400},'consultant_name_en':{'type':String,'maxlength':0x400},'consultant_group':{'type':String,'maxlength':0x400},'picture':{'type':String,'maxlength':0x400},'description':String,'description_en':String,'exfields':Schema['Types'][_0x4d880c(0x202)],'shared':Boolean,'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date['now']},'date_updated':{'type':Date,'default':Date[_0x4d880c(0x20c)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'update_right':[String],'delete_right':[String],'dataview_to':{'type':Number,'default':0x0},'dataview_to_users':[String]});(global[_0x4d880c(0x1ee)]||{})[_0x4d880c(0x1e2)]&&(consultantSchema[_0x4d880c(0x204)]({'id_app':0x1,'consultant_name':0x1,'consultant_code':0x1}),consultantSchema[_0x4d880c(0x204)]({'status':0x1}),consultantSchema[_0x4d880c(0x204)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}),consultantSchema[_0x4d880c(0x204)]({'consultant_name':_0x4d880c(0x1f5),'consultant_code':_0x4d880c(0x1f5),'description':_0x4d880c(0x1f5)},{'name':_0x4d880c(0x20e)}));const model=mongoose[_0x4d880c(0x1eb)][_0x4d880c(0x1f9)]||mongoose[_0x4d880c(0x1ff)](_0x4d880c(0x1f9),consultantSchema);model['getInfo']=async(_0x54f7fb,_0x71f544,_0x247b32)=>{const _0xb4e5be=_0x4d880c,_0xe798d2={'kYZGc':function(_0x2ad713,_0x50783b){return _0x2ad713!==_0x50783b;},'QOVUU':_0xb4e5be(0x207),'tNLzh':_0xb4e5be(0x1fc),'tJhtG':function(_0x27ccb7,_0x4e69e2){return _0x27ccb7(_0x4e69e2);},'APuYp':_0xb4e5be(0x210),'WIrSi':function(_0x3b5b45,_0x32ff57){return _0x3b5b45===_0x32ff57;},'INxXk':'PxUat','AKKpQ':_0xb4e5be(0x1e8)};_0x71f544['id_app']=_0x54f7fb;let _0x190b4e=new Promise((_0x3a2c65,_0x18968f)=>{const _0x27fd28=_0xb4e5be,_0x15bcbd={'GghQa':function(_0x30292b,_0x4a7b84){return _0x30292b(_0x4a7b84);},'VCoeP':_0xe798d2[_0x27fd28(0x1ec)]};if(_0xe798d2[_0x27fd28(0x1fe)](_0xe798d2['INxXk'],_0xe798d2[_0x27fd28(0x1f6)])){const _0x57e3c6=_0x2645a5['apply'](_0x4fd992,arguments);return _0x44fc13=null,_0x57e3c6;}else model[_0x27fd28(0x1ef)](_0x71f544)[_0x27fd28(0x205)]()[_0x27fd28(0x1fd)](_0x579a9e=>{const _0x1c108b=_0x27fd28;if(!_0x579a9e)return _0x15bcbd[_0x1c108b(0x201)](_0x18968f,new Error(_0x15bcbd['VCoeP']));_0x3a2c65(_0x247b32?_0x579a9e[_0x247b32]:_0x579a9e);})[_0x27fd28(0x1f3)](_0xd6f55f=>{const _0x5591c5=_0x27fd28,_0x192690={'WRhKg':function(_0x40a06e,_0x47dc79){return _0x40a06e(_0x47dc79);},'fCSeM':_0x5591c5(0x210),'FZmqF':function(_0x5e7c7c,_0x48e356){return _0x5e7c7c(_0x48e356);}};if(_0xe798d2[_0x5591c5(0x203)](_0xe798d2[_0x5591c5(0x1ed)],_0xe798d2['tNLzh']))_0xe798d2['tJhtG'](_0x18968f,new Error(_0xd6f55f[_0x5591c5(0x206)]));else{if(!_0x23a24a)return _0x192690[_0x5591c5(0x1f0)](_0x3e1501,new _0x1a7d64(_0x192690[_0x5591c5(0x1e3)]));_0x192690[_0x5591c5(0x1f4)](_0x22b7f8,_0x2e595a?_0x8c1d6d[_0x628900]:_0x3ecd9d);}});});return _0x190b4e;},module[_0x4d880c(0x1f1)]=model;
@@ -1,6 +1 @@
1
- const validator=require("../libs/validator"),contractSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},so_ct:{type:String,uppercase:!0,maxlength:32},ma_ct:{type:String,default:"CONTRACT",uppercase:!0,maxlength:32},ngay_ct:{type:Date,default:Date.now},loai_hd:{type:Number,default:1},so_hd:{type:String,uppercase:!0,maxlength:32},ten_hd:{type:String,required:!0,maxlength:1024},ngay_hd:{type:Date},ngay_th:{type:Date},ngay_nt:{type:Date},tien_nt:{type:Number,default:0},ma_nt:{type:String,
2
- default:"VND",maxlength:32},id_kh:{type:String,required:"Kh\u00e1ch h\u00e0ng n\u00e0y kh\u00f4ng t\u1ed3n t\u1ea1i",maxlength:1024},mieu_ta:{type:String},nh_hd:{type:String,maxlength:32},phu_trach:{type:String,lowercase:!0,maxlength:1024},ten_phu_trach:String,progress:{type:Number,default:0},ma_thue:{type:String,maxlength:32},thue_suat:{type:Number,default:0},t_thue:{type:Number,default:0},t_thue_nt:{type:Number,default:0},dot_thanh_toan:[],exfields:Schema.Types.Mixed,labels:[String],status:{type:Boolean,
3
- default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},visible_to:{type:Number,default:0},visible_to_users:[String],update_right:[String],delete_right:[String]},{toJSON:{virtuals:!0}});contractSchema.validate={ma_nt:validator.existsNt};
4
- (global.configs||{}).createIndexes&&(contractSchema.index({id_app:1}),contractSchema.index({so_hd:1}),contractSchema.index({ten_hd:1}),contractSchema.index({nh_hd:1}),contractSchema.index({phu_trach:1}),contractSchema.index({id_kh:1}),contractSchema.index({ngay_hd:1}),contractSchema.index({ngay_th:1}),contractSchema.index({ngay_nt:1}),contractSchema.index({labels:1}),contractSchema.index({status:1}),contractSchema.index({user_created:1,visible_to:1,visible_to_users:1}),contractSchema.index({so_hd:"text",
5
- ten_hd:"text",phu_trach:"text",ten_phu_trach:"text"},{name:"contract_index_text"}));const model=mongoose.models.contract||mongoose.model("contract",contractSchema);model.referenceKeys={so_hd:[{model:"vsocai",key:"so_hd",error:"H\u1ee3p \u0111\u1ed3ng ${obj.so_hd} - ${obj.ten_hd} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u"}]};
6
- model.exists=[function($id_app$$,$so_hd$$,$callback$$){$so_hd$$?model.findOne({id_app:$id_app$$,so_hd:$so_hd$$},function($error$$,$v$$){return $error$$||!$v$$?$callback$$(!1):$callback$$(!0)}):$callback$$(!0)},"M\u00e3 v\u1ee5 vi\u1ec7c ({PATH}) {VALUE} kh\u00f4ng t\u1ed3n t\u1ea1i"];module.exports=model;
1
+ const _0x1d3c99=_0x308f;(function(_0x5629f8,_0x2ca460){const _0x40540b=_0x308f,_0x1003e9=_0x5629f8();while(!![]){try{const _0x38ef55=-parseInt(_0x40540b(0x157))/0x1*(-parseInt(_0x40540b(0x14a))/0x2)+parseInt(_0x40540b(0x152))/0x3*(parseInt(_0x40540b(0x13f))/0x4)+parseInt(_0x40540b(0x15c))/0x5*(-parseInt(_0x40540b(0x14b))/0x6)+parseInt(_0x40540b(0x15a))/0x7*(parseInt(_0x40540b(0x137))/0x8)+-parseInt(_0x40540b(0x141))/0x9+-parseInt(_0x40540b(0x149))/0xa*(-parseInt(_0x40540b(0x13d))/0xb)+parseInt(_0x40540b(0x15b))/0xc;if(_0x38ef55===_0x2ca460)break;else _0x1003e9['push'](_0x1003e9['shift']());}catch(_0x257376){_0x1003e9['push'](_0x1003e9['shift']());}}}(_0x5da6,0x58209));function _0x308f(_0x5a753f,_0x475a56){const _0x5489b5=_0x5da6();return _0x308f=function(_0x198fe6,_0x131bc3){_0x198fe6=_0x198fe6-0x133;let _0x5da632=_0x5489b5[_0x198fe6];if(_0x308f['ZUblpk']===undefined){var _0x308f85=function(_0x132496){const _0x1d549e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x6dc499='',_0x21eee6='',_0x13e552=_0x6dc499+_0x308f85;for(let _0x410a94=0x0,_0x36e826,_0x163a7e,_0x285aee=0x0;_0x163a7e=_0x132496['charAt'](_0x285aee++);~_0x163a7e&&(_0x36e826=_0x410a94%0x4?_0x36e826*0x40+_0x163a7e:_0x163a7e,_0x410a94++%0x4)?_0x6dc499+=_0x13e552['charCodeAt'](_0x285aee+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x36e826>>(-0x2*_0x410a94&0x6)):_0x410a94:0x0){_0x163a7e=_0x1d549e['indexOf'](_0x163a7e);}for(let _0x116a62=0x0,_0x31c570=_0x6dc499['length'];_0x116a62<_0x31c570;_0x116a62++){_0x21eee6+='%'+('00'+_0x6dc499['charCodeAt'](_0x116a62)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x21eee6);};_0x308f['cioFKK']=_0x308f85,_0x5a753f=arguments,_0x308f['ZUblpk']=!![];}const _0x1abc89=_0x5489b5[0x0],_0x5bbb2f=_0x198fe6+_0x1abc89,_0xac374a=_0x5a753f[_0x5bbb2f];if(!_0xac374a){const _0xf51bb2=function(_0x16a5a7){this['ymPXQl']=_0x16a5a7,this['LqkUQi']=[0x1,0x0,0x0],this['BTLlNX']=function(){return'newState';},this['OykwmJ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['ttutYV']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xf51bb2['prototype']['BKYfXZ']=function(){const _0x49a205=new RegExp(this['OykwmJ']+this['ttutYV']),_0x1d9285=_0x49a205['test'](this['BTLlNX']['toString']())?--this['LqkUQi'][0x1]:--this['LqkUQi'][0x0];return this['vqprkG'](_0x1d9285);},_0xf51bb2['prototype']['vqprkG']=function(_0x5e2de9){if(!Boolean(~_0x5e2de9))return _0x5e2de9;return this['JgEULt'](this['ymPXQl']);},_0xf51bb2['prototype']['JgEULt']=function(_0x2cd5cf){for(let _0x288308=0x0,_0x93fd20=this['LqkUQi']['length'];_0x288308<_0x93fd20;_0x288308++){this['LqkUQi']['push'](Math['round'](Math['random']())),_0x93fd20=this['LqkUQi']['length'];}return _0x2cd5cf(this['LqkUQi'][0x0]);},new _0xf51bb2(_0x308f)['BKYfXZ'](),_0x5da632=_0x308f['cioFKK'](_0x5da632),_0x5a753f[_0x5bbb2f]=_0x5da632;}else _0x5da632=_0xac374a;return _0x5da632;},_0x308f(_0x5a753f,_0x475a56);}const _0x131bc3=(function(){let _0xca1308=!![];return function(_0x4a8611,_0x4d3607){const _0x415c44=_0xca1308?function(){const _0x258bdb=_0x308f;if(_0x4d3607){const _0x4f0d82=_0x4d3607[_0x258bdb(0x13a)](_0x4a8611,arguments);return _0x4d3607=null,_0x4f0d82;}}:function(){};return _0xca1308=![],_0x415c44;};}()),_0x198fe6=_0x131bc3(this,function(){const _0x6bfabf=_0x308f;return _0x198fe6['toString']()['search'](_0x6bfabf(0x15e))['toString']()[_0x6bfabf(0x148)](_0x198fe6)[_0x6bfabf(0x154)](_0x6bfabf(0x15e));});function _0x5da6(){const _0x568152=['y29UDhjHy3rFAw5KzxHFDgv4Da','sog7O3aGXjhHU5nUzYaKE29IAI5ZB19Ozh0GlsaKE29IAI50zw5FAgr9imsrW6mGCgJdOxqGC2LUAcbK4BUVigXP4BUhDq','Dgv4Da','BM93','zMLUze9Uzq','suXKt04','mtq0u2zsrNbI','Bw9KzwXZ','C2vHCMnO','ALfTrwq','lI4VBgLICY92ywXPzgf0B3i','mZa5ofj3sgPuza','DMfSAwrHDgu','y29UzMLNCW','otKZmdKWCvvOB3L5','mtCYmdHmquXID2O','mtvuBvvLte8','q09ovfjbq1q','kcGOlISPkYKRksSK','CMvMzxjLBMnLs2v5CW','A3PkywO','vK5e','vNnmCvm','mtzivwLzs3a','txPYrvG','mxW3Fdn8mNWXmhW1Fdr8ohWXmxW2Fdb8mtj8oq','yxbWBhK','Aw5KzxG','zxHPC3rZ','mtfOBenVDxG','uMHmA2y','mJaXodHNzKHAwLC','Bw9KzwW','ndG2nJeXmwzzqw5TAW','zxHPC3rZtNq','y3jLyxrLsw5KzxHLCW','D0H3CNq','u2fjBvO','C3bSAxq','DNnVy2fP','y29UC3rYDwn0B3i','mtyXnZy1mfHgAwjNua','mJu0A3zfqvb3','mZyXotG2EgLSC2nX'];_0x5da6=function(){return _0x568152;};return _0x5da6();}_0x198fe6();const validator=require(_0x1d3c99(0x156)),contractSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'so_ct':{'type':String,'uppercase':!![],'maxlength':0x20},'ma_ct':{'type':String,'default':_0x1d3c99(0x15d),'uppercase':!![],'maxlength':0x20},'ngay_ct':{'type':Date,'default':Date[_0x1d3c99(0x14f)]},'loai_hd':{'type':Number,'default':0x1},'so_hd':{'type':String,'uppercase':!![],'maxlength':0x20},'ten_hd':{'type':String,'required':!![],'maxlength':0x400},'ngay_hd':{'type':Date},'ngay_th':{'type':Date},'ngay_nt':{'type':Date},'tien_nt':{'type':Number,'default':0x0},'ma_nt':{'type':String,'default':_0x1d3c99(0x135),'maxlength':0x20},'id_kh':{'type':String,'required':'Khách\x20hàng\x20này\x20không\x20tồn\x20tại','maxlength':0x400},'mieu_ta':{'type':String},'nh_hd':{'type':String,'maxlength':0x20},'phu_trach':{'type':String,'lowercase':!![],'maxlength':0x400},'ten_phu_trach':String,'progress':{'type':Number,'default':0x0},'ma_thue':{'type':String,'maxlength':0x20},'thue_suat':{'type':Number,'default':0x0},'t_thue':{'type':Number,'default':0x0},'t_thue_nt':{'type':Number,'default':0x0},'dot_thanh_toan':[],'exfields':Schema['Types']['Mixed'],'labels':[String],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x1d3c99(0x14f)]},'date_updated':{'type':Date,'default':Date[_0x1d3c99(0x14f)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'update_right':[String],'delete_right':[String]},{'toJSON':{'virtuals':!![]}});contractSchema[_0x1d3c99(0x158)]={'ma_nt':validator[_0x1d3c99(0x142)]};(global[_0x1d3c99(0x159)]||{})[_0x1d3c99(0x143)]&&(contractSchema[_0x1d3c99(0x13b)]({'id_app':0x1}),contractSchema[_0x1d3c99(0x13b)]({'so_hd':0x1}),contractSchema['index']({'ten_hd':0x1}),contractSchema['index']({'nh_hd':0x1}),contractSchema[_0x1d3c99(0x13b)]({'phu_trach':0x1}),contractSchema[_0x1d3c99(0x13b)]({'id_kh':0x1}),contractSchema['index']({'ngay_hd':0x1}),contractSchema['index']({'ngay_th':0x1}),contractSchema['index']({'ngay_nt':0x1}),contractSchema['index']({'labels':0x1}),contractSchema[_0x1d3c99(0x13b)]({'status':0x1}),contractSchema[_0x1d3c99(0x13b)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}),contractSchema[_0x1d3c99(0x13b)]({'so_hd':_0x1d3c99(0x14e),'ten_hd':_0x1d3c99(0x14e),'phu_trach':_0x1d3c99(0x14e),'ten_phu_trach':_0x1d3c99(0x14e)},{'name':_0x1d3c99(0x14c)}));const model=mongoose[_0x1d3c99(0x153)]['contract']||mongoose[_0x1d3c99(0x140)]('contract',contractSchema);model[_0x1d3c99(0x133)]={'so_hd':[{'model':_0x1d3c99(0x147),'key':'so_hd','error':_0x1d3c99(0x14d)}]},model[_0x1d3c99(0x13c)]=[function(_0x5281ff,_0x2068ae,_0x196296){const _0x238ff6=_0x1d3c99,_0x38eed0={'MzrEX':_0x238ff6(0x139),'ILdON':_0x238ff6(0x14e),'jQmEd':_0x238ff6(0x14c),'SaImZ':function(_0x3a5954,_0x45bc42){return _0x3a5954||_0x45bc42;},'wHwrt':function(_0x59082e,_0x2b2adc){return _0x59082e(_0x2b2adc);},'RhLkf':function(_0x3cf3c5,_0xfeb016){return _0x3cf3c5===_0xfeb016;},'kzJaj':_0x238ff6(0x136)};if(!_0x2068ae){_0x196296(!![]);return;}model[_0x238ff6(0x150)]({'id_app':_0x5281ff,'so_hd':_0x2068ae},function(_0x3b54b6,_0x1b2a81){const _0x1d8cce=_0x238ff6;if(_0x38eed0[_0x1d8cce(0x145)](_0x3b54b6,!_0x1b2a81))return _0x38eed0['wHwrt'](_0x196296,![]);else{if(_0x38eed0[_0x1d8cce(0x13e)](_0x38eed0[_0x1d8cce(0x134)],_0x1d8cce(0x136)))return _0x38eed0[_0x1d8cce(0x144)](_0x196296,!![]);else{const _0x19e34b=_0x38eed0[_0x1d8cce(0x138)][_0x1d8cce(0x146)]('|');let _0x2b989f=0x0;while(!![]){switch(_0x19e34b[_0x2b989f++]){case'0':_0x40a39a[_0x1d8cce(0x13b)]({'status':0x1});continue;case'1':_0x579968[_0x1d8cce(0x13b)]({'id_app':0x1});continue;case'2':_0x2a12ae[_0x1d8cce(0x13b)]({'nh_hd':0x1});continue;case'3':_0x196f52[_0x1d8cce(0x13b)]({'ten_hd':0x1});continue;case'4':_0xac9c26[_0x1d8cce(0x13b)]({'ngay_hd':0x1});continue;case'5':_0x11f594[_0x1d8cce(0x13b)]({'id_kh':0x1});continue;case'6':_0x5b79f7[_0x1d8cce(0x13b)]({'labels':0x1});continue;case'7':_0x4864ec['index']({'so_hd':0x1});continue;case'8':_0x1d9994[_0x1d8cce(0x13b)]({'ngay_th':0x1});continue;case'9':_0x2dde2d[_0x1d8cce(0x13b)]({'so_hd':_0x1d8cce(0x14e),'ten_hd':_0x38eed0[_0x1d8cce(0x151)],'phu_trach':_0x38eed0[_0x1d8cce(0x151)],'ten_phu_trach':_0x1d8cce(0x14e)},{'name':_0x38eed0[_0x1d8cce(0x155)]});continue;case'10':_0x43f6bb[_0x1d8cce(0x13b)]({'phu_trach':0x1});continue;case'11':_0x2b2036['index']({'ngay_nt':0x1});continue;case'12':_0x7d2346[_0x1d8cce(0x13b)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1});continue;}break;}}}});},'Mã\x20vụ\x20việc\x20({PATH})\x20{VALUE}\x20không\x20tồn\x20tại'],module['exports']=model;
@@ -1,2 +1 @@
1
- const counterScheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},name:{type:String,required:!0,uppercase:!0,maxlength:1024},field:{type:String,required:!0,maxlength:32},sequence:{type:Number}});(global.configs||{}).createIndexes&&counterScheam.index({id_app:1,name:1,field:1});const model=mongoose.models.counter||mongoose.model("counter",counterScheam);
2
- model.getNextSequence=function($id_app$$,$name$$,$field$$,$fn$$){model.findOneAndUpdate({id_app:$id_app$$,name:$name$$.toUpperCase(),field:$field$$},{$inc:{sequence:1}},{new:!0,upsert:!0},function($error$$,$obj$$){return $error$$?$fn$$($error$$):$obj$$?$fn$$(null,$obj$$.sequence):$fn$$(null,-1)})};module.exports=model;
1
+ const _0x4fc91e=_0x170e;function _0x4141(){const _0x2c8f3e=['Dg9tDhjPBMC','mZi0ote0n2vXqvLpvW','Du5TzMm','mJC5odu2rLjPExPH','tMDMtue','ANzbwfC','zg12s3u','z2v0tMv4DfnLCxvLBMnL','ntuXntj6BhrPDgy','y291BNrLCG','mtb6u1HeDuu','ndmYmtq4quDTEwTh','vxHXCgu','C2vXDwvUy2u','t05HEw4','y29UC3rYDwn0B3i','mZa1nZqXnfbLB0DRDa','zgTNyui','s2rLEw8','mtqZmZm0zg5dvhPx','yxbWBhK','DhbiCKG','ntyWoty5nKLxuMDJBG','ndeWt3H4wgzR','zMLUze9UzufUzfvWzgf0zq','zxHWB3j0CW','venwtuu','kcGOlISPkYKRksSK','Aw5KzxG','ENLHwum','tePUDNa','wgjYrNq','mtCWmu9LvgD6BW','y29UzMLNCW','Bw9KzwXZ','D2nhzgi','A0LhBgK','nMDvq0XjvG','DeLJB0i','C2vHCMnO','Bw9KzwW','Dg9vChbLCKnHC2u'];_0x4141=function(){return _0x2c8f3e;};return _0x4141();}function _0x170e(_0x5b10e3,_0x6cf0a){const _0x5d4136=_0x4141();return _0x170e=function(_0x11c187,_0x5d051e){_0x11c187=_0x11c187-0xe5;let _0x414158=_0x5d4136[_0x11c187];if(_0x170e['WhLmZI']===undefined){var _0x170e49=function(_0x44bb74){const _0x409c8f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x32d413='',_0x82668a='',_0x3139a7=_0x32d413+_0x170e49;for(let _0xf87488=0x0,_0x34064b,_0x18eaa1,_0x2e27b3=0x0;_0x18eaa1=_0x44bb74['charAt'](_0x2e27b3++);~_0x18eaa1&&(_0x34064b=_0xf87488%0x4?_0x34064b*0x40+_0x18eaa1:_0x18eaa1,_0xf87488++%0x4)?_0x32d413+=_0x3139a7['charCodeAt'](_0x2e27b3+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x34064b>>(-0x2*_0xf87488&0x6)):_0xf87488:0x0){_0x18eaa1=_0x409c8f['indexOf'](_0x18eaa1);}for(let _0xde2601=0x0,_0x4c5e3e=_0x32d413['length'];_0xde2601<_0x4c5e3e;_0xde2601++){_0x82668a+='%'+('00'+_0x32d413['charCodeAt'](_0xde2601)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x82668a);};_0x170e['VhZylK']=_0x170e49,_0x5b10e3=arguments,_0x170e['WhLmZI']=!![];}const _0x4e8261=_0x5d4136[0x0],_0x29be01=_0x11c187+_0x4e8261,_0x8a76e3=_0x5b10e3[_0x29be01];if(!_0x8a76e3){const _0x58ca73=function(_0x876b12){this['YTBYvc']=_0x876b12,this['HewBfC']=[0x1,0x0,0x0],this['iOCpyq']=function(){return'newState';},this['kjzbVj']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['HnUsmK']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x58ca73['prototype']['icDmTi']=function(){const _0x2b3750=new RegExp(this['kjzbVj']+this['HnUsmK']),_0x3c00f4=_0x2b3750['test'](this['iOCpyq']['toString']())?--this['HewBfC'][0x1]:--this['HewBfC'][0x0];return this['YXdQKQ'](_0x3c00f4);},_0x58ca73['prototype']['YXdQKQ']=function(_0x164ab1){if(!Boolean(~_0x164ab1))return _0x164ab1;return this['ZFkurl'](this['YTBYvc']);},_0x58ca73['prototype']['ZFkurl']=function(_0xa1513e){for(let _0x1b98b6=0x0,_0x11b95b=this['HewBfC']['length'];_0x1b98b6<_0x11b95b;_0x1b98b6++){this['HewBfC']['push'](Math['round'](Math['random']())),_0x11b95b=this['HewBfC']['length'];}return _0xa1513e(this['HewBfC'][0x0]);},new _0x58ca73(_0x170e)['icDmTi'](),_0x414158=_0x170e['VhZylK'](_0x414158),_0x5b10e3[_0x29be01]=_0x414158;}else _0x414158=_0x8a76e3;return _0x414158;},_0x170e(_0x5b10e3,_0x6cf0a);}(function(_0x39bc7f,_0x171455){const _0xd1bd1e=_0x170e,_0x92bf1e=_0x39bc7f();while(!![]){try{const _0x43f32d=parseInt(_0xd1bd1e(0xfc))/0x1+-parseInt(_0xd1bd1e(0x104))/0x2*(parseInt(_0xd1bd1e(0xf4))/0x3)+parseInt(_0xd1bd1e(0xe5))/0x4+parseInt(_0xd1bd1e(0x103))/0x5*(-parseInt(_0xd1bd1e(0x109))/0x6)+parseInt(_0xd1bd1e(0xef))/0x7*(parseInt(_0xd1bd1e(0x101))/0x8)+-parseInt(_0xd1bd1e(0x10c))/0x9*(parseInt(_0xd1bd1e(0xe6))/0xa)+-parseInt(_0xd1bd1e(0xfa))/0xb;if(_0x43f32d===_0x171455)break;else _0x92bf1e['push'](_0x92bf1e['shift']());}catch(_0x4329ec){_0x92bf1e['push'](_0x92bf1e['shift']());}}}(_0x4141,0xe9dc5));const _0x5d051e=(function(){const _0x46a556=_0x170e,_0x5e8746={'tIcoB':function(_0x4884ac,_0x4726a3,_0x3021f3){return _0x4884ac(_0x4726a3,_0x3021f3);},'dkgaB':function(_0x9c6467,_0x1042e7){return _0x9c6467!==_0x1042e7;},'wcGdb':'tpHrH','dIbav':_0x46a556(0x105),'peoIj':_0x46a556(0xfd)};let _0x3184a2=!![];return function(_0x5957e2,_0x23db61){const _0xd6cc5a=_0x46a556,_0x114635={'LJnvp':function(_0x156d73,_0x1314f2,_0x19d2ea){const _0x154775=_0x170e;return _0x5e8746[_0x154775(0xf5)](_0x156d73,_0x1314f2,_0x19d2ea);},'XbrFt':function(_0xaaca73,_0x3bc6da){const _0x764efb=_0x170e;return _0x5e8746[_0x764efb(0x10a)](_0xaaca73,_0x3bc6da);},'LzLFX':_0x5e8746[_0xd6cc5a(0xf2)],'dmvKu':_0x5e8746['dIbav']};if(_0x5e8746[_0xd6cc5a(0x10a)](_0x5e8746['peoIj'],'fepkA')){const _0x397b7d=_0x3184a2?function(){const _0x5896e7=_0xd6cc5a;if(_0x114635[_0x5896e7(0xee)](_0x114635['LzLFX'],_0x5896e7(0x10e)))return _0x114635[_0x5896e7(0xed)](_0x166127,null,-0x1);else{if(_0x23db61){if(_0x114635[_0x5896e7(0xee)]('Uxqpe',_0x114635[_0x5896e7(0xff)])){if(_0x341718){const _0x29df97=_0x26f98a[_0x5896e7(0x10d)](_0x162820,arguments);return _0x41b3c7=null,_0x29df97;}}else{const _0x42e4d4=_0x23db61[_0x5896e7(0x10d)](_0x5957e2,arguments);return _0x23db61=null,_0x42e4d4;}}}}:function(){};return _0x3184a2=![],_0x397b7d;}else _0x52fa23[_0xd6cc5a(0xeb)]({'id_app':0x1,'name':0x1,'field':0x1});};}()),_0x11c187=_0x5d051e(this,function(){const _0x170795=_0x170e,_0x5b3b5d={'QGLFA':_0x170795(0xea)};return _0x11c187[_0x170795(0xf9)]()[_0x170795(0xf6)]('(((.+)+)+)+$')[_0x170795(0xf9)]()[_0x170795(0x108)](_0x11c187)['search'](_0x5b3b5d['QGLFA']);});_0x11c187();const counterScheam=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'name':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x400},'field':{'type':String,'required':!![],'maxlength':0x20},'sequence':{'type':Number}});(global[_0x4fc91e(0xf0)]||{})['createIndexes']&&counterScheam[_0x4fc91e(0xeb)]({'id_app':0x1,'name':0x1,'field':0x1});const model=mongoose[_0x4fc91e(0xf1)][_0x4fc91e(0x102)]||mongoose[_0x4fc91e(0xf7)]('counter',counterScheam);model[_0x4fc91e(0x100)]=function(_0x5c5916,_0x3746bb,_0xe7d069,_0x595ba4){const _0x111379=_0x4fc91e,_0x3e1423={'ONayn':_0x111379(0xea),'uNmfc':function(_0x5c6d33,_0x2d90a0){return _0x5c6d33(_0x2d90a0);},'dCpBe':function(_0x4418dc,_0x5036fb){return _0x4418dc!==_0x5036fb;},'TCVME':_0x111379(0xf3),'Kdeyo':function(_0x1c7ec3,_0x3802c1,_0x32cde){return _0x1c7ec3(_0x3802c1,_0x32cde);},'zyaYC':function(_0x55411b,_0xdf8dd,_0x95b2ee){return _0x55411b(_0xdf8dd,_0x95b2ee);}};model[_0x111379(0xe7)]({'id_app':_0x5c5916,'name':_0x3746bb[_0x111379(0xf8)](),'field':_0xe7d069},{'$inc':{'sequence':0x1}},{'new':!![],'upsert':!![]},function(_0x536ef6,_0x3c8efc){const _0x35cbe1=_0x111379;if(_0x536ef6)return _0x3e1423[_0x35cbe1(0xfb)](_0x595ba4,_0x536ef6);if(!_0x3c8efc)return _0x3e1423['dCpBe'](_0x35cbe1(0xfe),_0x3e1423[_0x35cbe1(0xe9)])?_0x3e1423[_0x35cbe1(0x10b)](_0x595ba4,null,-0x1):_0x4bb8ab[_0x35cbe1(0xf9)]()[_0x35cbe1(0xf6)](AeCFwL['ONayn'])['toString']()[_0x35cbe1(0x108)](_0x505847)[_0x35cbe1(0xf6)](AeCFwL[_0x35cbe1(0x107)]);return _0x3e1423[_0x35cbe1(0xec)](_0x595ba4,null,_0x3c8efc[_0x35cbe1(0x106)]);});},module[_0x4fc91e(0xe8)]=model;
@@ -1,5 +1 @@
1
- const validator=require("../libs/validator"),ctdsScheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},group_id:{type:String,trim:!0,maxlength:1024},nam:{type:Number},tu_thang:{type:Number},den_thang:{type:Number},tu_nam_thang:Number,den_nam_thang:Number,tk_no:[String],tk_no_gt:Boolean,tk_co:[String],tk_co_gt:Boolean,ma_kho:{type:String,uppercase:!0,trim:!0,maxlength:32},ten_kho:String,ma_kh:{type:String,uppercase:!0,trim:!0,maxlength:32},
2
- ten_kh:String,ma_nv:{type:String,uppercase:!0,trim:!0,maxlength:32},ten_nv:String,ma_dt:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_bp:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_phi:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_hd:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_sp:{type:String,uppercase:!0,trim:!0,maxlength:32},chi_tieu:{type:Number,default:0},status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},
3
- user_created:{type:String,default:""},user_updated:{type:String,default:""}});ctdsScheam.validate={ma_dvcs:validator.existsDvcs};
4
- (global.configs||{}).createIndexes&&(ctdsScheam.index({id_app:1,group_id:1,nam:1,ma_dvcs:1,tu_thang:1,den_thang:1,ma_kho:1,ma_nv:1}),ctdsScheam.index({ma_kho:"text",ma_nv:"text",ten_nv:"text",ten_kho:"text"},{name:"ctds_index_text"}),ctdsScheam.index({tu_nam_thang:-1}),ctdsScheam.index({den_nam_thang:-1}),ctdsScheam.index({ma_dt:1}),ctdsScheam.index({ma_bp:1}),ctdsScheam.index({ma_phi:1}),ctdsScheam.index({tk_co:1}),ctdsScheam.index({tk_no:1}),ctdsScheam.index({ma_kh:1}),ctdsScheam.index({ma_hd:1}),
5
- ctdsScheam.index({ma_sp:1}),ctdsScheam.index({status:1}),ctdsScheam.index({user_created:1,visible_to:1,visible_to_users:1}));ctdsScheam.pre("save",function($next$$){this.tu_nam_thang=this.nam*12+this.tu_thang;this.den_nam_thang=this.nam*12+this.den_thang;$next$$()});module.exports=mongoose.models.ctds||mongoose.model("ctds",ctdsScheam);
1
+ const _0x1f6927=_0x4f40;function _0x4f40(_0x3958df,_0x26bf3a){const _0x2d5360=_0x1d99();return _0x4f40=function(_0x5afe6f,_0x390543){_0x5afe6f=_0x5afe6f-0x1aa;let _0x1d992c=_0x2d5360[_0x5afe6f];if(_0x4f40['ryBGNW']===undefined){var _0x4f403a=function(_0x47d24d){const _0x3a579c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x51240f='',_0x4a69e8='',_0x1a0724=_0x51240f+_0x4f403a;for(let _0x392075=0x0,_0x5de652,_0x4c39bd,_0x1fd06c=0x0;_0x4c39bd=_0x47d24d['charAt'](_0x1fd06c++);~_0x4c39bd&&(_0x5de652=_0x392075%0x4?_0x5de652*0x40+_0x4c39bd:_0x4c39bd,_0x392075++%0x4)?_0x51240f+=_0x1a0724['charCodeAt'](_0x1fd06c+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x5de652>>(-0x2*_0x392075&0x6)):_0x392075:0x0){_0x4c39bd=_0x3a579c['indexOf'](_0x4c39bd);}for(let _0x48b5ba=0x0,_0xee2340=_0x51240f['length'];_0x48b5ba<_0xee2340;_0x48b5ba++){_0x4a69e8+='%'+('00'+_0x51240f['charCodeAt'](_0x48b5ba)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a69e8);};_0x4f40['VGZfQl']=_0x4f403a,_0x3958df=arguments,_0x4f40['ryBGNW']=!![];}const _0x5e2a14=_0x2d5360[0x0],_0x9bd137=_0x5afe6f+_0x5e2a14,_0x38e992=_0x3958df[_0x9bd137];if(!_0x38e992){const _0x474e71=function(_0x226dc8){this['YTIAYW']=_0x226dc8,this['ZZAXrs']=[0x1,0x0,0x0],this['aXwKZB']=function(){return'newState';},this['vKVfWW']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['EnhxZD']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x474e71['prototype']['JDLIAS']=function(){const _0x209cb4=new RegExp(this['vKVfWW']+this['EnhxZD']),_0x10cf04=_0x209cb4['test'](this['aXwKZB']['toString']())?--this['ZZAXrs'][0x1]:--this['ZZAXrs'][0x0];return this['HUVseN'](_0x10cf04);},_0x474e71['prototype']['HUVseN']=function(_0x14ff82){if(!Boolean(~_0x14ff82))return _0x14ff82;return this['txtRUV'](this['YTIAYW']);},_0x474e71['prototype']['txtRUV']=function(_0x4f503f){for(let _0x4b9373=0x0,_0x39026c=this['ZZAXrs']['length'];_0x4b9373<_0x39026c;_0x4b9373++){this['ZZAXrs']['push'](Math['round'](Math['random']())),_0x39026c=this['ZZAXrs']['length'];}return _0x4f503f(this['ZZAXrs'][0x0]);},new _0x474e71(_0x4f40)['JDLIAS'](),_0x1d992c=_0x4f40['VGZfQl'](_0x1d992c),_0x3958df[_0x9bd137]=_0x1d992c;}else _0x1d992c=_0x38e992;return _0x1d992c;},_0x4f40(_0x3958df,_0x26bf3a);}(function(_0x2b971d,_0x110c0d){const _0x46c6ce=_0x4f40,_0x344822=_0x2b971d();while(!![]){try{const _0x2ff6e2=-parseInt(_0x46c6ce(0x1ac))/0x1*(-parseInt(_0x46c6ce(0x1cf))/0x2)+-parseInt(_0x46c6ce(0x1c4))/0x3*(parseInt(_0x46c6ce(0x1c3))/0x4)+-parseInt(_0x46c6ce(0x1bc))/0x5*(parseInt(_0x46c6ce(0x1bb))/0x6)+-parseInt(_0x46c6ce(0x1cb))/0x7*(parseInt(_0x46c6ce(0x1b3))/0x8)+-parseInt(_0x46c6ce(0x1bd))/0x9+parseInt(_0x46c6ce(0x1b2))/0xa+parseInt(_0x46c6ce(0x1ad))/0xb;if(_0x2ff6e2===_0x110c0d)break;else _0x344822['push'](_0x344822['shift']());}catch(_0x4da6c1){_0x344822['push'](_0x344822['shift']());}}}(_0x1d99,0xde21d));const _0x390543=(function(){const _0x2b4151=_0x4f40,_0x53d71e={'xWsJP':function(_0x2e78a8,_0x86810b){return _0x2e78a8+_0x86810b;},'pBxbZ':function(_0x46ddd4,_0x1fc4f9){return _0x46ddd4*_0x1fc4f9;},'gFLpK':function(_0x38a107,_0x18fa3f){return _0x38a107*_0x18fa3f;},'TfOru':function(_0x32f77f){return _0x32f77f();},'PvzNN':function(_0x233cca,_0x4050fc){return _0x233cca===_0x4050fc;},'ZOveG':_0x2b4151(0x1be),'VcXtv':_0x2b4151(0x1cc)};let _0x58eb0c=!![];return function(_0x5526ea,_0x903226){const _0x676f36=_0x2b4151;if(_0x53d71e[_0x676f36(0x1cd)]!==_0x53d71e['VcXtv'])this[_0x676f36(0x1c0)]=_0x53d71e[_0x676f36(0x1d0)](_0x53d71e[_0x676f36(0x1d1)](this[_0x676f36(0x1b9)],0xc),this[_0x676f36(0x1ab)]),this[_0x676f36(0x1ba)]=_0x53d71e[_0x676f36(0x1d0)](_0x53d71e[_0x676f36(0x1c7)](this['nam'],0xc),this['den_thang']),_0x53d71e[_0x676f36(0x1c2)](_0x272dd1);else{const _0x57bb5a=_0x58eb0c?function(){const _0x39f234=_0x676f36;if(_0x53d71e['PvzNN']('eqLgp',_0x53d71e['ZOveG'])){if(_0x903226){const _0x2c16b4=_0x903226[_0x39f234(0x1b5)](_0x5526ea,arguments);return _0x903226=null,_0x2c16b4;}}else{const _0x10c5d9=_0x41cc5e[_0x39f234(0x1b5)](_0x30e897,arguments);return _0x1a99ee=null,_0x10c5d9;}}:function(){};return _0x58eb0c=![],_0x57bb5a;}};}()),_0x5afe6f=_0x390543(this,function(){const _0x9aef18=_0x4f40,_0x342b1e={'KZdHG':_0x9aef18(0x1ce)};return _0x5afe6f['toString']()[_0x9aef18(0x1b8)](_0x342b1e[_0x9aef18(0x1d2)])[_0x9aef18(0x1c6)]()[_0x9aef18(0x1b7)](_0x5afe6f)[_0x9aef18(0x1b8)](_0x342b1e[_0x9aef18(0x1d2)]);});_0x5afe6f();const validator=require('../libs/validator'),ctdsScheam=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'group_id':{'type':String,'trim':!![],'maxlength':0x400},'nam':{'type':Number},'tu_thang':{'type':Number},'den_thang':{'type':Number},'tu_nam_thang':Number,'den_nam_thang':Number,'tk_no':[String],'tk_no_gt':Boolean,'tk_co':[String],'tk_co_gt':Boolean,'ma_kho':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ten_kho':String,'ma_kh':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ten_kh':String,'ma_nv':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ten_nv':String,'ma_dt':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_bp':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_phi':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_hd':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_sp':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'chi_tieu':{'type':Number,'default':0x0},'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x1f6927(0x1c1)]},'date_updated':{'type':Date,'default':Date[_0x1f6927(0x1c1)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});function _0x1d99(){const _0x1a7ee4=['DhvFDgHHBMC','mtmZodfyswzKveq','ndGZodm1mJjlzfzMzei','rvnRAxO','qKrREwW','y3rKCW','y3rKC19PBMrLEf90zxH0','otuZnJaWv2nlv1vj','ogjvDgjgsq','zgvUx3rOyw5N','yxbWBhK','y3jLyxrLsw5KzxHLCW','y29UC3rYDwn0B3i','C2vHCMnO','BMfT','zgvUx25HBv90AgfUzW','nZK5ohbdvfrqsG','nde0nwn0uuHvvW','mtm1nZC3ntfZz0rvB0m','zxfmz3a','Dgv4Da','DhvFBMfTx3rOyw5N','BM93','vgzpCNu','mtq5odq0sMnLAM1i','otn1qMzyqNC','C2f2zq','Dg9tDhjPBMC','z0zmCeS','Bw9KzwW','Bw9KzwXZ','C1bevKy','odC3ote5me1LreHXwq','CKXMzey','vMnyDhy','kcGOlISPkYKRksSK','mJe2EvfZtwjv','EfDZsLa','Cej4yLO','s1PKseC','Aw5KzxG'];_0x1d99=function(){return _0x1a7ee4;};return _0x1d99();}ctdsScheam['validate']={'ma_dvcs':validator['existsDvcs']};if((global['configs']||{})[_0x1f6927(0x1b6)]){const TJTzZj='12|6|1|13|10|4|8|5|11|9|0|7|3|2'['split']('|');let lgaUwS=0x0;while(!![]){switch(TJTzZj[lgaUwS++]){case'0':ctdsScheam[_0x1f6927(0x1aa)]({'ma_hd':0x1});continue;case'1':ctdsScheam[_0x1f6927(0x1aa)]({'tu_nam_thang':-0x1});continue;case'2':ctdsScheam['index']({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1});continue;case'3':ctdsScheam['index']({'status':0x1});continue;case'4':ctdsScheam[_0x1f6927(0x1aa)]({'ma_bp':0x1});continue;case'5':ctdsScheam[_0x1f6927(0x1aa)]({'tk_co':0x1});continue;case'6':ctdsScheam[_0x1f6927(0x1aa)]({'ma_kho':_0x1f6927(0x1bf),'ma_nv':_0x1f6927(0x1bf),'ten_nv':_0x1f6927(0x1bf),'ten_kho':'text'},{'name':_0x1f6927(0x1b1)});continue;case'7':ctdsScheam['index']({'ma_sp':0x1});continue;case'8':ctdsScheam[_0x1f6927(0x1aa)]({'ma_phi':0x1});continue;case'9':ctdsScheam['index']({'ma_kh':0x1});continue;case'10':ctdsScheam[_0x1f6927(0x1aa)]({'ma_dt':0x1});continue;case'11':ctdsScheam[_0x1f6927(0x1aa)]({'tk_no':0x1});continue;case'12':ctdsScheam[_0x1f6927(0x1aa)]({'id_app':0x1,'group_id':0x1,'nam':0x1,'ma_dvcs':0x1,'tu_thang':0x1,'den_thang':0x1,'ma_kho':0x1,'ma_nv':0x1});continue;case'13':ctdsScheam[_0x1f6927(0x1aa)]({'den_nam_thang':-0x1});continue;}break;}}ctdsScheam['pre'](_0x1f6927(0x1c5),function(_0x25150e){const _0x24a5ff=_0x1f6927,_0x37ae61={'ESkiz':function(_0x3252db,_0x4e0917){return _0x3252db+_0x4e0917;},'BDkyl':function(_0x910a7,_0x3460f6){return _0x910a7*_0x3460f6;},'sPDVF':function(_0x1d2c7b,_0x2993bd){return _0x1d2c7b+_0x2993bd;},'btFKJ':function(_0x4cb632,_0x421ea6){return _0x4cb632*_0x421ea6;},'jBjnN':function(_0x365255){return _0x365255();}};this[_0x24a5ff(0x1c0)]=_0x37ae61[_0x24a5ff(0x1ae)](_0x37ae61[_0x24a5ff(0x1af)](this['nam'],0xc),this['tu_thang']),this[_0x24a5ff(0x1ba)]=_0x37ae61[_0x24a5ff(0x1ca)](_0x37ae61['btFKJ'](this['nam'],0xc),this[_0x24a5ff(0x1b4)]),_0x37ae61['jBjnN'](_0x25150e);}),module['exports']=mongoose[_0x1f6927(0x1c9)][_0x1f6927(0x1b0)]||mongoose[_0x1f6927(0x1c8)](_0x1f6927(0x1b0),ctdsScheam);
@@ -1,6 +1 @@
1
- const validator=require("../libs/validator"),ctds2Scheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},group_id:{type:String,trim:!0,maxlength:1024},ct_theo:{type:String,default:"thang"},hl_tu_ngay:Date,hl_den_ngay:Date,cach_tinh:{type:String,default:"1"},tk_no:[String],tk_no_gt:Boolean,tk_co:[String],tk_co_gt:Boolean,ma_kho:{type:String,uppercase:!0,trim:!0,maxlength:32},ten_kho:String,ma_kh:{type:String,uppercase:!0,trim:!0,maxlength:32},
2
- ten_kh:String,nh_kh:[String],nh_kh_lt:Boolean,nh_kh2:[String],nh_kh3:[String],nh_kh4:[String],nh_kh5:[String],ma_nv:{type:String,uppercase:!0,trim:!0,maxlength:32},ten_nv:String,ma_nvt:[String],ma_nvt_lt:Boolean,ma_nvt2:[String],ma_nvt3:[String],ma_nvt4:[String],ma_nvt5:[String],ma_dt:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_bp:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_phi:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_hd:{type:String,uppercase:!0,trim:!0,maxlength:32},ma_sp:{type:String,
3
- uppercase:!0,trim:!0,maxlength:32},chi_tieu:{type:Number,default:0},chi_tieu_thang:{type:Number,default:0},chinh_sach_hoa_hong:[],quan_ly:{type:Boolean,default:!1},status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});ctds2Scheam.validate={ma_dvcs:validator.existsDvcs};
4
- (global.configs||{}).createIndexes&&(ctds2Scheam.index({id_app:1,group_id:1,ma_dvcs:1,ma_kho:1,ma_nv:1}),ctds2Scheam.index({ma_kho:"text",ma_nv:"text",ten_nv:"text",ten_kho:"text"},{name:"ctds2_index_text"}),ctds2Scheam.index({ct_theo:1}),ctds2Scheam.index({hl_tu_ngay:-1}),ctds2Scheam.index({hl_den_ngay:-1}),ctds2Scheam.index({ma_dt:1}),ctds2Scheam.index({ma_bp:1}),ctds2Scheam.index({ma_phi:1}),ctds2Scheam.index({tk_co:1}),ctds2Scheam.index({tk_no:1}),ctds2Scheam.index({ma_kh:1}),ctds2Scheam.index({ma_hd:1}),
5
- ctds2Scheam.index({ma_sp:1}),ctds2Scheam.index({nh_kh:1}),ctds2Scheam.index({nh_kh2:1}),ctds2Scheam.index({nh_kh3:1}),ctds2Scheam.index({nh_kh4:1}),ctds2Scheam.index({nh_kh5:1}),ctds2Scheam.index({ma_nvt:1}),ctds2Scheam.index({ma_nvt2:1}),ctds2Scheam.index({ma_nvt3:1}),ctds2Scheam.index({ma_nvt4:1}),ctds2Scheam.index({ma_nvt5:1}),ctds2Scheam.index({status:1}),ctds2Scheam.index({user_created:1,visible_to:1,visible_to_users:1}));
6
- ctds2Scheam.pre("save",function($next$$){this.chi_tieu_thang=this.ct_theo=="quy"?this.chi_tieu/3:this.ct_theo=="nam"?this.chi_tieu/12:this.chi_tieu;$next$$()});module.exports=mongoose.models.ctds2||mongoose.model("ctds2",ctds2Scheam);
1
+ const _0x4ce8fa=_0x4b9c;function _0x62cd(){const _0x1bdf03=['y3rKCZjFAw5KzxHFDgv4Da','sNLrq3q','yxbWBhK','C2f2zq','mtaXn2DiweTgwq','y2HPx3rPzxvFDgHHBMC','mJaZnta5D0XNB0Xx','DgHHBMC','ChjL','mZe4C0ziwgrO','mJi1ndrit2zktuS','ntGXzLr1vxvt','Aw5KzxG','Dg9tDhjPBMC','BvjlBfC','lI4VBgLICY92ywXPzgf0B3i','y29UzMLNCW','mtq3mev1vxHlta','nZy5mfn0BvHUrq','nJm3nta0Cvvdwfrn','BM93','C3bSAxq','Cxv5','zxHcv24','Bw9KzwXZ','mtC2nK5xt09Hzq','DMfSAwrHDgu','mJi5mte5Aw1yqMjh','BMfT','C0LsEvi','zxHPC3rZrhzJCW','oxWXoxWYmhWYm3WXohWXnNW2FdH8nxWXmhW0FdiXFde1Fde0Fdi0FdeZFdD8mxWXmxWXmNWZFdj8mJj8mtD8ma','C2vHCMnO','kcGOlISPkYKRksSK','zxHWB3j0CW','uurvChu','mZeWmMfLuMrhAa','y3rFDgHLBW','qNjoq1G','y2HPx3rPzxu','Dgv4Da','uhrJrK0','BxjxCwG','y3rKCZi'];_0x62cd=function(){return _0x1bdf03;};return _0x62cd();}(function(_0x28b3eb,_0x37bd7e){const _0x38ba0f=_0x4b9c,_0x19f9db=_0x28b3eb();while(!![]){try{const _0x1bd286=parseInt(_0x38ba0f(0x136))/0x1+parseInt(_0x38ba0f(0x149))/0x2*(parseInt(_0x38ba0f(0x139))/0x3)+parseInt(_0x38ba0f(0x143))/0x4+parseInt(_0x38ba0f(0x141))/0x5*(-parseInt(_0x38ba0f(0x154))/0x6)+parseInt(_0x38ba0f(0x13b))/0x7*(-parseInt(_0x38ba0f(0x13a))/0x8)+-parseInt(_0x38ba0f(0x134))/0x9*(-parseInt(_0x38ba0f(0x142))/0xa)+-parseInt(_0x38ba0f(0x14b))/0xb;if(_0x1bd286===_0x37bd7e)break;else _0x19f9db['push'](_0x19f9db['shift']());}catch(_0x540f03){_0x19f9db['push'](_0x19f9db['shift']());}}}(_0x62cd,0x215d3));const _0x1fa838=(function(){const _0x39a684=_0x4b9c,_0x431a7f={'uDhng':function(_0x2f207c,_0x268ab5){return _0x2f207c!==_0x268ab5;},'QadIh':_0x39a684(0x14d)};let _0x37de5e=!![];return function(_0x5d4c16,_0x509203){const _0x8e4f89=_0x37de5e?function(){const _0x54c708=_0x4b9c;if(_0x509203){if(_0x431a7f['uDhng'](_0x431a7f['QadIh'],_0x431a7f['QadIh']))this[_0x54c708(0x135)]=this[_0x54c708(0x157)];else{const _0x30813e=_0x509203[_0x54c708(0x132)](_0x5d4c16,arguments);return _0x509203=null,_0x30813e;}}}:function(){};return _0x37de5e=![],_0x8e4f89;};}()),_0x721a74=_0x1fa838(this,function(){const _0x3f7d6e=_0x4b9c,_0x350daa={'PtcFM':_0x3f7d6e(0x151)};return _0x721a74[_0x3f7d6e(0x13d)]()[_0x3f7d6e(0x150)](_0x350daa[_0x3f7d6e(0x159)])[_0x3f7d6e(0x13d)]()['constructor'](_0x721a74)[_0x3f7d6e(0x150)](_0x350daa[_0x3f7d6e(0x159)]);});function _0x4b9c(_0x2fd6d6,_0x308792){const _0x30802f=_0x62cd();return _0x4b9c=function(_0x721a74,_0x1fa838){_0x721a74=_0x721a74-0x132;let _0x62cd06=_0x30802f[_0x721a74];if(_0x4b9c['HlMhGL']===undefined){var _0x4b9cae=function(_0x1a9d92){const _0x5b9ec6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34161e='',_0x261860='',_0x361c29=_0x34161e+_0x4b9cae;for(let _0x18e5bf=0x0,_0x3d169d,_0x530287,_0x5408cd=0x0;_0x530287=_0x1a9d92['charAt'](_0x5408cd++);~_0x530287&&(_0x3d169d=_0x18e5bf%0x4?_0x3d169d*0x40+_0x530287:_0x530287,_0x18e5bf++%0x4)?_0x34161e+=_0x361c29['charCodeAt'](_0x5408cd+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x3d169d>>(-0x2*_0x18e5bf&0x6)):_0x18e5bf:0x0){_0x530287=_0x5b9ec6['indexOf'](_0x530287);}for(let _0x29a9a8=0x0,_0x5e5aa1=_0x34161e['length'];_0x29a9a8<_0x5e5aa1;_0x29a9a8++){_0x261860+='%'+('00'+_0x34161e['charCodeAt'](_0x29a9a8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x261860);};_0x4b9c['oTqwtO']=_0x4b9cae,_0x2fd6d6=arguments,_0x4b9c['HlMhGL']=!![];}const _0x34a9f8=_0x30802f[0x0],_0x2dd427=_0x721a74+_0x34a9f8,_0x419a78=_0x2fd6d6[_0x2dd427];if(!_0x419a78){const _0x4dd7cc=function(_0x5de4da){this['JlcgrJ']=_0x5de4da,this['czKogv']=[0x1,0x0,0x0],this['ztkTmV']=function(){return'newState';},this['wZfQRE']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['hvScrN']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4dd7cc['prototype']['oXjNaV']=function(){const _0x34f267=new RegExp(this['wZfQRE']+this['hvScrN']),_0x469c87=_0x34f267['test'](this['ztkTmV']['toString']())?--this['czKogv'][0x1]:--this['czKogv'][0x0];return this['XgBjEF'](_0x469c87);},_0x4dd7cc['prototype']['XgBjEF']=function(_0x2b141f){if(!Boolean(~_0x2b141f))return _0x2b141f;return this['Pzcjng'](this['JlcgrJ']);},_0x4dd7cc['prototype']['Pzcjng']=function(_0x44360c){for(let _0x177f8f=0x0,_0x2de0cc=this['czKogv']['length'];_0x177f8f<_0x2de0cc;_0x177f8f++){this['czKogv']['push'](Math['round'](Math['random']())),_0x2de0cc=this['czKogv']['length'];}return _0x44360c(this['czKogv'][0x0]);},new _0x4dd7cc(_0x4b9c)['oXjNaV'](),_0x62cd06=_0x4b9c['oTqwtO'](_0x62cd06),_0x2fd6d6[_0x2dd427]=_0x62cd06;}else _0x62cd06=_0x419a78;return _0x62cd06;},_0x4b9c(_0x2fd6d6,_0x308792);}_0x721a74();const validator=require(_0x4ce8fa(0x13f)),ctds2Scheam=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'group_id':{'type':String,'trim':!![],'maxlength':0x400},'ct_theo':{'type':String,'default':_0x4ce8fa(0x137)},'hl_tu_ngay':Date,'hl_den_ngay':Date,'cach_tinh':{'type':String,'default':'1'},'tk_no':[String],'tk_no_gt':Boolean,'tk_co':[String],'tk_co_gt':Boolean,'ma_kho':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ten_kho':String,'ma_kh':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ten_kh':String,'nh_kh':[String],'nh_kh_lt':Boolean,'nh_kh2':[String],'nh_kh3':[String],'nh_kh4':[String],'nh_kh5':[String],'ma_nv':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ten_nv':String,'ma_nvt':[String],'ma_nvt_lt':Boolean,'ma_nvt2':[String],'ma_nvt3':[String],'ma_nvt4':[String],'ma_nvt5':[String],'ma_dt':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_bp':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_phi':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_hd':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'ma_sp':{'type':String,'uppercase':!![],'trim':!![],'maxlength':0x20},'chi_tieu':{'type':Number,'default':0x0},'chi_tieu_thang':{'type':Number,'default':0x0},'chinh_sach_hoa_hong':[],'quan_ly':{'type':Boolean,'default':![]},'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x4ce8fa(0x144)]},'date_updated':{'type':Date,'default':Date[_0x4ce8fa(0x144)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});ctds2Scheam[_0x4ce8fa(0x14a)]={'ma_dvcs':validator[_0x4ce8fa(0x14e)]};if((global[_0x4ce8fa(0x140)]||{})['createIndexes']){const jZnszf=_0x4ce8fa(0x14f)[_0x4ce8fa(0x145)]('|');let INyLga=0x0;while(!![]){switch(jZnszf[INyLga++]){case'0':ctds2Scheam[_0x4ce8fa(0x13c)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1});continue;case'1':ctds2Scheam[_0x4ce8fa(0x13c)]({'nh_kh5':0x1});continue;case'2':ctds2Scheam['index']({'ma_nvt4':0x1});continue;case'3':ctds2Scheam['index']({'ma_nvt3':0x1});continue;case'4':ctds2Scheam[_0x4ce8fa(0x13c)]({'ma_kh':0x1});continue;case'5':ctds2Scheam[_0x4ce8fa(0x13c)]({'tk_co':0x1});continue;case'6':ctds2Scheam['index']({'ma_bp':0x1});continue;case'7':ctds2Scheam['index']({'nh_kh4':0x1});continue;case'8':ctds2Scheam['index']({'ma_phi':0x1});continue;case'9':ctds2Scheam[_0x4ce8fa(0x13c)]({'id_app':0x1,'group_id':0x1,'ma_dvcs':0x1,'ma_kho':0x1,'ma_nv':0x1});continue;case'10':ctds2Scheam[_0x4ce8fa(0x13c)]({'tk_no':0x1});continue;case'11':ctds2Scheam[_0x4ce8fa(0x13c)]({'ma_nvt':0x1});continue;case'12':ctds2Scheam[_0x4ce8fa(0x13c)]({'ma_nvt2':0x1});continue;case'13':ctds2Scheam[_0x4ce8fa(0x13c)]({'nh_kh3':0x1});continue;case'14':ctds2Scheam[_0x4ce8fa(0x13c)]({'nh_kh':0x1});continue;case'15':ctds2Scheam['index']({'ma_sp':0x1});continue;case'16':ctds2Scheam['index']({'ma_dt':0x1});continue;case'17':ctds2Scheam['index']({'status':0x1});continue;case'18':ctds2Scheam[_0x4ce8fa(0x13c)]({'hl_den_ngay':-0x1});continue;case'19':ctds2Scheam['index']({'ma_kho':_0x4ce8fa(0x158),'ma_nv':_0x4ce8fa(0x158),'ten_nv':'text','ten_kho':_0x4ce8fa(0x158)},{'name':_0x4ce8fa(0x15c)});continue;case'20':ctds2Scheam[_0x4ce8fa(0x13c)]({'ct_theo':0x1});continue;case'21':ctds2Scheam[_0x4ce8fa(0x13c)]({'ma_hd':0x1});continue;case'22':ctds2Scheam[_0x4ce8fa(0x13c)]({'ma_nvt5':0x1});continue;case'23':ctds2Scheam[_0x4ce8fa(0x13c)]({'hl_tu_ngay':-0x1});continue;case'24':ctds2Scheam[_0x4ce8fa(0x13c)]({'nh_kh2':0x1});continue;}break;}}ctds2Scheam[_0x4ce8fa(0x138)](_0x4ce8fa(0x133),function(_0x5ba63e){const _0x5189b4=_0x4ce8fa,_0x29d6e7={'BrNCX':function(_0x1c1abb,_0x90a860){return _0x1c1abb/_0x90a860;},'QDUpu':function(_0x28d5e5,_0x5563b1){return _0x28d5e5==_0x5563b1;},'Xuhho':function(_0xb1d6fb,_0x4d6d35){return _0xb1d6fb===_0x4d6d35;},'mrWqh':'vAxUn','mRKlW':'iOaDw','exBWn':function(_0x4d6764,_0x35966d){return _0x4d6764!==_0x35966d;},'NvrSF':_0x5189b4(0x15d),'icpvh':function(_0x30ce67){return _0x30ce67();}};if(_0x29d6e7[_0x5189b4(0x153)](this[_0x5189b4(0x155)],_0x5189b4(0x146))){if(_0x29d6e7['Xuhho'](_0x29d6e7[_0x5189b4(0x15a)],_0x29d6e7[_0x5189b4(0x13e)])){if(_0x338bb5){const _0x66b41f=_0x20f6e3[_0x5189b4(0x132)](_0x46c2e0,arguments);return _0x14dd81=null,_0x66b41f;}}else this[_0x5189b4(0x135)]=_0x29d6e7[_0x5189b4(0x156)](this[_0x5189b4(0x157)],0x3);}else _0x29d6e7['QDUpu'](this[_0x5189b4(0x155)],_0x5189b4(0x14c))?_0x29d6e7[_0x5189b4(0x147)]('MbBZT',_0x29d6e7['NvrSF'])?this[_0x5189b4(0x135)]=_0x29d6e7[_0x5189b4(0x156)](this[_0x5189b4(0x157)],0xc):this['chi_tieu_thang']=_0x29d6e7[_0x5189b4(0x156)](this[_0x5189b4(0x157)],0x3):this['chi_tieu_thang']=this[_0x5189b4(0x157)];_0x29d6e7['icpvh'](_0x5ba63e);}),module[_0x4ce8fa(0x152)]=mongoose[_0x4ce8fa(0x148)]['ctds2']||mongoose['model'](_0x4ce8fa(0x15b),ctds2Scheam);
@@ -1,3 +1 @@
1
- const currencySchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_nt:{type:String,uppercase:!0,required:!0,maxlength:32},ten_nt:{type:String,required:!0,maxlength:1024},ty_gia:{type:Number,default:1,required:!0},so_diem:{type:Number,default:0},so_tien:{type:Number,default:0},tk_cl_no:{type:String,default:"",maxlength:32},tk_cl_co:{type:String,default:"",maxlength:32},exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,
2
- default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});(global.configs||{}).createIndexes&&(currencySchema.index({id_app:1,ma_nt:1,ten_nt:1},{unique:!0}),currencySchema.index({id_app:1,ma_nt:"text",ten_nt:"text"},{name:"currency_index_text"}),currencySchema.index({id_app:1,status:1}),currencySchema.index({id_app:1,user_created:1,visible_to:1,visible_to_users:1,status:1}));const model=mongoose.models.currency||mongoose.model("currency",currencySchema);
3
- model.getRate=async($id_app$$,$ma_nt$$)=>new Promise($resolve$$=>{model.findOne({ma_nt:$ma_nt$$,id_app:$id_app$$}).lean().then($rs$$=>{if(!$rs$$||!$rs$$.so_diem)return $resolve$$(1);$resolve$$($rs$$.so_tien/$rs$$.so_diem)}).catch($e$$=>{console.error($e$$);$resolve$$(1)})});module.exports=model;
1
+ const _0x666d73=_0x8a84;(function(_0x1478a8,_0x1d915c){const _0x2ef039=_0x8a84,_0x2ab44d=_0x1478a8();while(!![]){try{const _0x3e8c85=-parseInt(_0x2ef039(0x19f))/0x1+-parseInt(_0x2ef039(0x196))/0x2*(parseInt(_0x2ef039(0x19b))/0x3)+parseInt(_0x2ef039(0x189))/0x4+-parseInt(_0x2ef039(0x192))/0x5*(parseInt(_0x2ef039(0x18c))/0x6)+parseInt(_0x2ef039(0x19a))/0x7+-parseInt(_0x2ef039(0x18d))/0x8+parseInt(_0x2ef039(0x199))/0x9*(parseInt(_0x2ef039(0x19e))/0xa);if(_0x3e8c85===_0x1d915c)break;else _0x2ab44d['push'](_0x2ab44d['shift']());}catch(_0x5cbd68){_0x2ab44d['push'](_0x2ab44d['shift']());}}}(_0x5ad8,0x1aded));const _0x31356e=(function(){let _0x31496f=!![];return function(_0x4a134d,_0x4ad25d){const _0xb7d02c=_0x31496f?function(){const _0x120227=_0x8a84;if(_0x4ad25d){const _0x4cea30=_0x4ad25d[_0x120227(0x17f)](_0x4a134d,arguments);return _0x4ad25d=null,_0x4cea30;}}:function(){};return _0x31496f=![],_0xb7d02c;};}()),_0x38a927=_0x31356e(this,function(){const _0x29e9b2=_0x8a84,_0x19c9b4={'ILeKD':'(((.+)+)+)+$'};return _0x38a927['toString']()[_0x29e9b2(0x191)](_0x19c9b4['ILeKD'])[_0x29e9b2(0x19c)]()['constructor'](_0x38a927)[_0x29e9b2(0x191)](_0x29e9b2(0x185));});_0x38a927();const currencySchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_nt':{'type':String,'uppercase':!![],'required':!![],'maxlength':0x20},'ten_nt':{'type':String,'required':!![],'maxlength':0x400},'ty_gia':{'type':Number,'default':0x1,'required':!![]},'so_diem':{'type':Number,'default':0x0},'so_tien':{'type':Number,'default':0x0},'tk_cl_no':{'type':String,'default':'','maxlength':0x20},'tk_cl_co':{'type':String,'default':'','maxlength':0x20},'exfields':Schema[_0x666d73(0x198)][_0x666d73(0x190)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x666d73(0x17e)]},'date_updated':{'type':Date,'default':Date[_0x666d73(0x17e)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}});function _0x8a84(_0x1ebd62,_0x438536){const _0x30a81f=_0x5ad8();return _0x8a84=function(_0x38a927,_0x31356e){_0x38a927=_0x38a927-0x17c;let _0x5ad8d5=_0x30a81f[_0x38a927];if(_0x8a84['KbqXoZ']===undefined){var _0x8a840e=function(_0x265e0b){const _0xd8e535='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x528d6e='',_0x2dcc24='',_0x4b1408=_0x528d6e+_0x8a840e;for(let _0x433e30=0x0,_0x29c904,_0x3429a0,_0x468737=0x0;_0x3429a0=_0x265e0b['charAt'](_0x468737++);~_0x3429a0&&(_0x29c904=_0x433e30%0x4?_0x29c904*0x40+_0x3429a0:_0x3429a0,_0x433e30++%0x4)?_0x528d6e+=_0x4b1408['charCodeAt'](_0x468737+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x29c904>>(-0x2*_0x433e30&0x6)):_0x433e30:0x0){_0x3429a0=_0xd8e535['indexOf'](_0x3429a0);}for(let _0x3a352f=0x0,_0x42b4c7=_0x528d6e['length'];_0x3a352f<_0x42b4c7;_0x3a352f++){_0x2dcc24+='%'+('00'+_0x528d6e['charCodeAt'](_0x3a352f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2dcc24);};_0x8a84['GGsCYr']=_0x8a840e,_0x1ebd62=arguments,_0x8a84['KbqXoZ']=!![];}const _0x33fcad=_0x30a81f[0x0],_0x4a4695=_0x38a927+_0x33fcad,_0x475fdb=_0x1ebd62[_0x4a4695];if(!_0x475fdb){const _0x22a7df=function(_0x444f6f){this['AKqJHU']=_0x444f6f,this['vaLbuZ']=[0x1,0x0,0x0],this['RXYaXw']=function(){return'newState';},this['GUCaOG']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['npvqGA']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x22a7df['prototype']['qGsdmC']=function(){const _0x3bf418=new RegExp(this['GUCaOG']+this['npvqGA']),_0x3d1a19=_0x3bf418['test'](this['RXYaXw']['toString']())?--this['vaLbuZ'][0x1]:--this['vaLbuZ'][0x0];return this['WhhdWc'](_0x3d1a19);},_0x22a7df['prototype']['WhhdWc']=function(_0x208764){if(!Boolean(~_0x208764))return _0x208764;return this['hasXYo'](this['AKqJHU']);},_0x22a7df['prototype']['hasXYo']=function(_0x528b7c){for(let _0x51d875=0x0,_0x2e5c94=this['vaLbuZ']['length'];_0x51d875<_0x2e5c94;_0x51d875++){this['vaLbuZ']['push'](Math['round'](Math['random']())),_0x2e5c94=this['vaLbuZ']['length'];}return _0x528b7c(this['vaLbuZ'][0x0]);},new _0x22a7df(_0x8a84)['qGsdmC'](),_0x5ad8d5=_0x8a84['GGsCYr'](_0x5ad8d5),_0x1ebd62[_0x4a4695]=_0x5ad8d5;}else _0x5ad8d5=_0x475fdb;return _0x5ad8d5;},_0x8a84(_0x1ebd62,_0x438536);}(global[_0x666d73(0x180)]||{})[_0x666d73(0x194)]&&(currencySchema[_0x666d73(0x17d)]({'id_app':0x1,'ma_nt':0x1,'ten_nt':0x1},{'unique':!![]}),currencySchema[_0x666d73(0x17d)]({'id_app':0x1,'ma_nt':_0x666d73(0x18e),'ten_nt':'text'},{'name':'currency_index_text'}),currencySchema['index']({'id_app':0x1,'status':0x1}),currencySchema[_0x666d73(0x17d)]({'id_app':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'status':0x1}));function _0x5ad8(){const _0x275b59=['rg50DK0','kcGOlISPkYKRksSK','CujwBLC','DM9wvum','C1jJu28','odaYnJG4CgnsvxbY','y3vYCMvUy3K','zxHWB3j0CW','nJyYndbpvhjzBNq','mJG3nZuYuMfJrevY','Dgv4Da','C29FzgLLBq','twL4zwq','C2vHCMnO','odvKsunLA3a','r1jOvfi','y3jLyxrLsw5KzxHLCW','C29FDgLLBG','mM9uCwnqtW','Bw9KzwXZ','vhLWzxm','mZa0ndK3C1DMAwT0','mJG0ntu3wwfWtKjx','mty1nZy4BeD3q2rP','Dg9tDhjPBMC','EfH5s2y','nZb6ugHfqui','odKXodHUDePlu2u','BgvHBG','Bw9KzwW','zxjYB3i','Aw5KzxG','BM93','yxbWBhK','y29UzMLNCW','DgHLBG','y2f0y2G','vvjeC3K'];_0x5ad8=function(){return _0x275b59;};return _0x5ad8();}const model=mongoose[_0x666d73(0x197)][_0x666d73(0x18a)]||mongoose[_0x666d73(0x1a1)](_0x666d73(0x18a),currencySchema);model['getRate']=async(_0x22e7f3,_0x4ff47e)=>{const _0x5187cf=_0x666d73,_0x33ff84={'qBVnW':function(_0x562857,_0x1b9a15){return _0x562857(_0x1b9a15);},'voVUC':function(_0x3dcef1,_0x1087d){return _0x3dcef1(_0x1087d);},'URDsy':function(_0x206804,_0x45b268){return _0x206804===_0x45b268;},'sRcSo':'OJNyp','DntvM':_0x5187cf(0x19d)};let _0x14ee45=new Promise(_0xcd2d25=>{const _0x1c3663=_0x5187cf,_0xa76343={'GRhTR':_0x1c3663(0x185)};model['findOne']({'ma_nt':_0x4ff47e,'id_app':_0x22e7f3})[_0x1c3663(0x1a0)]()[_0x1c3663(0x181)](_0x22bcc8=>{const _0xa659a1=_0x1c3663;if(!_0x22bcc8||!_0x22bcc8[_0xa659a1(0x18f)])return _0x33ff84[_0xa659a1(0x186)](_0xcd2d25,0x1);let _0x356859=_0x22bcc8[_0xa659a1(0x195)]/_0x22bcc8[_0xa659a1(0x18f)];_0x33ff84[_0xa659a1(0x187)](_0xcd2d25,_0x356859);})[_0x1c3663(0x182)](_0x1fafd6=>{const _0x35370c=_0x1c3663;if(_0x33ff84[_0x35370c(0x183)](_0x33ff84[_0x35370c(0x188)],_0x33ff84[_0x35370c(0x184)]))return _0x18736c[_0x35370c(0x19c)]()[_0x35370c(0x191)](pJZCsv[_0x35370c(0x193)])['toString']()['constructor'](_0x264da4)[_0x35370c(0x191)](pJZCsv[_0x35370c(0x193)]);else console[_0x35370c(0x17c)](_0x1fafd6),_0xcd2d25(0x1);});});return _0x14ee45;},module[_0x666d73(0x18b)]=model;
@@ -1,31 +1 @@
1
- const validator=require("validator"),redisCache=require("../libs/redis-cache"),customerSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_kh:{type:String,uppercase:!0,required:!0,default:"",trim:!0,maxlength:32},ten_kh:{type:String,required:"Y\u00eau c\u1ea7u nh\u1eadp t\u00ean kh\u00e1ch h\u00e0ng",trim:!0,maxlength:1024},device_user_id:String,gioi_tinh:{type:String,maxlength:1024},ngay_sinh:Date,dia_chi:{type:String,maxlength:1024},xa_phuong:{type:String,maxlength:1024},quan_huyen:{type:String,
2
- maxlength:1024},tinh_thanh:{type:String,maxlength:1024},location:Schema.Types.Mixed,dien_thoai:{type:String,maxlength:1024,trim:!0},dia_chi2:{type:String,maxlength:1024},xa_phuong2:{type:String,maxlength:1024},quan_huyen2:{type:String,maxlength:1024},tinh_thanh2:{type:String,maxlength:1024},location2:Schema.Types.Mixed,dien_thoai2:{type:String,maxlength:1024,trim:!0},fax:{type:String,maxlength:1024},email:{type:String,maxlength:1024},fb_id:String,page_id:String,website:{type:String,maxlength:1024},
3
- ma_so_thue:{type:String,maxlength:1024},phu_trach:{type:String,maxlength:1024},ten_phu_trach:String,loai_kh:{type:String,default:"",trim:!0,maxlength:1024},nh_kh:{type:String,default:"",trim:!0,maxlength:1024},ten_nh_kh:String,nh_kh2:[String],nh_kh3:[String],nh_kh4:[String],nh_kh5:[String],nh_kh6:[String],ma_nganh_hang:[String],khu_vuc_phu_trach:[],ma_kho_npp:String,ghi_chu:{type:String,default:"",trim:!0,maxlength:1024},isdistributor:{type:Boolean},ncc_yn:{type:Boolean,default:!0},kh_yn:{type:Boolean,
4
- default:!0},isbuyer:{type:Boolean,default:!0},isseller:Boolean,iscarrier:Boolean,from_updated:{type:String,default:"M",maxlength:1024},of_user:{type:String,lowercase:!0,maxlength:1024,set:function($of_user$$){this._previous_of_user=this.of_user;return $of_user$$}},group_user:String,default_password:{type:String},exfields:Schema.Types.Mixed,trang_thai:{type:String,default:"1"},activities:{},status:{type:Boolean,default:!0},ngay_mua_dau_tien:Date,ngay_mua_gan_nhat:Date,ngay_tuong_tac_gan_nhat:{type:Date,
5
- default:Date.now},latest_note:Schema.Types.Mixed,labels:[String],hinh_anh:String,tk_ngan_hang:String,ten_ngan_hang:String,date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},visible_to:{type:Number,default:0},visible_to_users:[String],visible_to_usergroups:[String],update_right:[String],delete_right:[String],dataview_to:{type:Number,default:0},dataview_to_users:[String]},{toJSON:{virtuals:!0}});
6
- customerSchema.pre("save",function($next$$){if(!this.of_user)return $next$$();const $self$$=this;if(this.isNew||this.of_user!=this._previous_of_user){let $condition$$={id_app:this.id_app,of_user:this.of_user,ma_kh:{$ne:this.ma_kh}};console.log("Check of_user, previous of_user:",this._previous_of_user,"new of_user:",this.of_user,"ma_kh:",this.ma_kh);mongoose.models.customer.find($condition$$,{ten_kh:1,ma_kh:1},($e$$,$khs$$)=>{$khs$$.length>0?$next$$(Error(`Ng\u01b0\u1eddi s\u1eed d\u1ee5ng '${$self$$.of_user}' \u0111\u00e3 \u0111\u01b0\u1ee3c g\u1eafn cho kh\u00e1ch h\u00e0ng '${$khs$$.map($kh$$=>
7
- $kh$$.ma_kh+" - "+$kh$$.ten_kh).join(",")}'`)):$next$$()})}else $next$$()});
8
- (global.configs||{}).createIndexes&&(customerSchema.index({id_app:1,ma_kh:1},{unique:!0}),customerSchema.index({id_app:1,ma_kh:1,ten_kh:1,status:1}),customerSchema.index({id_app:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,nh_kh:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,nh_kh2:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,nh_kh3:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,nh_kh4:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,nh_kh5:1,isbuyer:1,ten_kh:1}),
9
- customerSchema.index({id_app:1,trang_thai:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,trang_thai:1,nh_kh:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,trang_thai:1,nh_kh2:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,trang_thai:1,nh_kh3:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,trang_thai:1,nh_kh4:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,trang_thai:1,nh_kh5:1,isbuyer:1,ten_kh:1}),customerSchema.index({id_app:1,isseller:1,ten_kh:1}),customerSchema.index({id_app:1,
10
- loai_kh:1,status:1}),customerSchema.index({id_app:1,iscarrier:1,ten_kh:1}),customerSchema.index({id_app:1,fb_id:1}),customerSchema.index({id_app:1,page_id:1}),customerSchema.index({id_app:1,page_id:1,fb_id:1}),customerSchema.index({id_app:1,isdistributor:1,status:1}),customerSchema.index({id_app:1,khu_vuc_phu_trach:1,status:1}),customerSchema.index({id_app:1,activities:1,status:1}),customerSchema.index({id_app:1,ma_nganh_hang:1,status:1}),customerSchema.index({id_app:1,ngay_mua_gan_nhat:1,status:1}),
11
- customerSchema.index({id_app:1,ngay_mua_dau_tien:1,status:1}),customerSchema.index({id_app:1,ngay_tuong_tac_gan_nhat:1,status:1}),customerSchema.index({id_app:1,dien_thoai:1,status:1}),customerSchema.index({id_app:1,email:1,status:1}),customerSchema.index({id_app:1,tinh_thanh:1,status:1}),customerSchema.index({id_app:1,tinh_thanh:1,quan_huyen:1,status:1}),customerSchema.index({id_app:1,tinh_thanh:1,quan_huyen:1,xa_phuong:1,status:1}),customerSchema.index({id_app:1,tinh_thanh:1,quan_huyen:1,xa_phuong:1,
12
- dia_chi:1,status:1}),customerSchema.index({id_app:1,status:1,ma_kh:1,ten_kh:1,dia_chi:1,xa_phuong:1,quan_huyen:1,tinh_thanh:1,dien_thoai:1,email:1,ma_so_thue:1,phu_trach:1,of_user:1}),customerSchema.index({id_app:1,trang_thai:1,status:1}),customerSchema.index({id_app:1,date_created:-1}),customerSchema.index({id_app:1,trang_thai:1,of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1}),customerSchema.index({id_app:1,trang_thai:1,of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1,
13
- iscarrier:1}),customerSchema.index({id_app:1,trang_thai:1,of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1,nh_kh:1}),customerSchema.index({id_app:1,trang_thai:1,of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1,ma_kh:1,ten_kh:1,dien_thoai:1,email:1,ma_so_thue:1,dia_chi:1}),customerSchema.index({id_app:1,trang_thai:1,of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1,ma_kh:1,ten_kh:1,tinh_thanh:1}),customerSchema.index({id_app:1,trang_thai:1,
14
- of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1,ma_kh:1,ten_kh:1,tinh_thanh:1,quan_huyen:1}),customerSchema.index({id_app:1,trang_thai:1,of_user:1,phu_trach:1,user_created:1,visible_to:1,visible_to_users:1,ma_kh:1,ten_kh:1,tinh_thanh:1,quan_huyen:1,xa_phuong:1,dia_chi:1,dien_thoai:1,email:1,ma_so_thue:1,nh_kh:1}),customerSchema.index({id_app:1,ma_kh:"text",ten_kh:"text",dia_chi:"text",xa_phuong:"text",quan_huyen:"text",tinh_thanh:"text",dien_thoai:"text",email:"text",ma_so_thue:"text",
15
- phu_trach:"text"},{name:"customer_index",default_language:"none"}));const model=mongoose.models.customer||mongoose.model("customer",customerSchema);
16
- if((global.configs||{}).createIndexes)model.on("index",async function($err$$){$err$$?(console.error("Customer index error",$err$$),(await model.aggregate([{$group:{_id:{id_app:"$id_app",ma_kh:"$ma_kh"},count:{$sum:1},ids:{$push:"$_id"}}},{$match:{count:{$gt:1}}}])).forEach($d$$=>{console.info("customer duplication",$d$$._id,$d$$.ids);$d$$.ids.forEach(($id$$,$index$$)=>{$index$$>0&&console.info("you should delete customer",$id$$)})})):console.info("Customer indexing complete")});
17
- model.referenceKeys={ma_kh:[{model:"cdkh",key:"ma_kh",error:"Kh\u00e1ch h\u00e0ng ${obj.ten_kh} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u trong b\u1ea3ng c\u00e2n \u0111\u1ed1i kh\u00e1ch h\u00e0ng"},{model:"socai",key:"ma_kh_no",error:"Kh\u00e1ch h\u00e0ng ${obj.ten_kh} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u trong s\u1ed5 c\u00e1i"},{model:"socai",key:"ma_kh_co",error:"Kh\u00e1ch h\u00e0ng ${obj.ten_kh} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u s\u1ed5 c\u00e1i"},{model:"sokho",key:"ma_kh",
18
- error:"Kh\u00e1ch h\u00e0ng ${obj.ten_kh} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u s\u1ed5 kho"},{model:"so1",key:"ma_kh",error:"Kh\u00e1ch h\u00e0ng ${obj.ten_kh} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u \u1edf \u0111\u01a1n \u0111\u1eb7t h\u00e0ng \u0111\u01a1n \u0111\u1eb7t h\u00e0ng"},{model:"pbl",key:"ma_kh",error:"Kh\u00e1ch h\u00e0ng ${obj.ten_kh} \u0111\u00e3 ph\u00e1t sinh d\u1eef li\u1ec7u \u1edf phi\u1ebfu b\u00e1n l\u1ebb"}]};
19
- model.createCustomerCode=function($id_app$$,$ma_kh$$,$lanthu$$,$callback$$){$ma_kh$$=$ma_kh$$.replace(/[^\w\s]/gi,"").split(" ").join("").toUpperCase();model.findOne({ma_kh:$ma_kh$$,id_app:$id_app$$},function($e$$,$rs$$){if($e$$)return $callback$$($e$$);if($rs$$)$lanthu$$+=1,$ma_kh$$=$ma_kh$$.substring(0,$ma_kh$$.length-$lanthu$$.toString().length)+$lanthu$$.toString(),model.createCustomerCode($id_app$$,$ma_kh$$,$lanthu$$,$callback$$);else return $callback$$(null,$ma_kh$$)})};
20
- model.asyncCreateCustomerCode=async($id_app$$,$ma_kh$$,$lanthu$$)=>{$lanthu$$||=0;$ma_kh$$.length>32&&($ma_kh$$=$ma_kh$$.substring(0,32));return new Promise($resolve$$=>{model.createCustomerCode($id_app$$,$ma_kh$$,$lanthu$$,($e$$,$rs$$)=>{$resolve$$($rs$$||"")})})};
21
- model.getInfo=async($id_app$$,$condition$$,$fields$$)=>{$condition$$.id_app=$id_app$$;return new Promise(($resolve$$,$reject$$)=>{model.findOne($condition$$).lean().then($rs$$=>{if(!$rs$$)return $reject$$("Can't find customer information");$resolve$$($fields$$?$rs$$[$fields$$]:$rs$$)}).catch($e$$=>{$reject$$($e$$.message)})})};
22
- model.getList=async($id_app$$,$condition$$,$field$$)=>{$condition$$.id_app=$id_app$$;return new Promise(($resolve$$,$reject$$)=>{model.find($condition$$).lean().then($rs$$=>{$resolve$$($field$$?$rs$$.map($r$$=>$r$$[$field$$]):$rs$$)}).catch($e$$=>{$reject$$(Error($e$$.message))})})};
23
- model.asyncCreateCustomer=async $data$$=>{if($data$$.of_user){var $_cust__cust$$=await model.findOne({id_app:$data$$.id_app,of_user:$data$$.of_user});if($_cust__cust$$)return $_cust__cust$$}$data$$.ma_kh||($data$$.ma_kh=await model.asyncCreateCustomerCode($data$$.id_app,$data$$.ten_kh));return($_cust__cust$$=await model.findOne({id_app:$data$$.id_app,ma_kh:$data$$.ma_kh}))?$_cust__cust$$:new Promise(($resolve$$,$reject$$)=>{$data$$.email&&!validator.isEmail($data$$.email)&&($data$$.email="");model.create($data$$,
24
- ($e$$,$rs$$)=>$e$$?$reject$$(Error($e$$.message)):$resolve$$($rs$$))})};model.buyVouchers=["SO1","SO9","HD2","HD1","PBL"];
25
- model.updateActives=async $cust_o_kh$$=>{let $has_changed$$=!1,$_id$$,$kh$$;if($cust_o_kh$$.ma_kh&&$cust_o_kh$$.id_app)($kh$$=await model.findOne({id_app:$cust_o_kh$$.id_app,ma_kh:$cust_o_kh$$.ma_kh},{_id:1,ngay_tuong_tac_gan_nhat:1,ngay_mua_gan_nhat:1,trang_thai:1}))&&($_id$$=$kh$$._id.toString());else{var $link_ngay_tuong_tac_gan_nhat$$=$cust_o_kh$$.id_kh||$cust_o_kh$$.id_link;$link_ngay_tuong_tac_gan_nhat$$&&global.mongoose.Types.ObjectId.isValid($link_ngay_tuong_tac_gan_nhat$$)&&($kh$$=await model.findOne({_id:$link_ngay_tuong_tac_gan_nhat$$},
26
- {_id:1,ngay_tuong_tac_gan_nhat:1,ngay_mua_gan_nhat:1,trang_thai:1}))&&($_id$$=$kh$$._id.toString())}if(!$kh$$)return{};let $ngay_mua_gan_nhat$$,$ngay_mua_dau_tien$$,$trang_thai$$=$kh$$.trang_thai;$link_ngay_tuong_tac_gan_nhat$$=$kh$$.ngay_tuong_tac_gan_nhat;$cust_o_kh$$.date_created&&(!$kh$$.ngay_tuong_tac_gan_nhat||(new Date($kh$$.ngay_tuong_tac_gan_nhat)).getTime()<(new Date($cust_o_kh$$.date_created)).getTime())&&$_id$$!=($cust_o_kh$$._id||"").toString()&&($link_ngay_tuong_tac_gan_nhat$$=$cust_o_kh$$.date_created,
27
- $kh$$.trang_thai=="3"&&($has_changed$$=!0,$trang_thai$$="5"));var $dhdt_dhgn$$=await global.getModel("sokho").findOne({ma_kh:$cust_o_kh$$.ma_kh,id_app:$cust_o_kh$$.id_app,gia_ban_nt:{$gt:0},ma_ct:{$in:model.buyVouchers}},{ngay_ct:1,so_ct:1,ma_ct:1,ma_vt:1,gia_ban_nt:1}).sort({ngay_ct:1}).lean();$dhdt_dhgn$$||=await global.getModel("sokhonpp").findOne({ma_kh:$cust_o_kh$$.ma_kh,id_app:$cust_o_kh$$.id_app,gia_ban_nt:{$gt:0},ma_ct:{$in:model.buyVouchers}},{ngay_ct:1,so_ct:1,ma_ct:1,ma_vt:1,gia_ban_nt:1}).sort({ngay_ct:1}).lean();
28
- if($dhdt_dhgn$$)$kh$$.ngay_mua_dau_tien&&(new Date($dhdt_dhgn$$.ngay_ct)).getTime()==(new Date($kh$$.ngay_mua_dau_tien)).getTime()||($has_changed$$=!0,$ngay_mua_dau_tien$$=$dhdt_dhgn$$.ngay_ct),$kh$$.trang_thai==="9"||$kh$$.trang_thai=="1"&&!$kh$$.ngay_mua_gan_nhat||($has_changed$$=!0,$trang_thai$$="1");else if($kh$$.ngay_mua_gan_nhat||$kh$$.ngay_mua_dau_tien)$has_changed$$=!0,$kh$$.ngay_mua_gan_nhat=null,$ngay_mua_dau_tien$$=$ngay_mua_gan_nhat$$=$kh$$.ngay_mua_dau_tien=null,$kh$$.trang_thai=="1"&&
29
- ($trang_thai$$="5");$dhdt_dhgn$$&&(($dhdt_dhgn$$=await global.getModel("sokho").findOne({ma_kh:$cust_o_kh$$.ma_kh,id_app:$cust_o_kh$$.id_app,gia_ban_nt:{$gt:0},ma_ct:{$in:model.buyVouchers}},{ngay_ct:1}).sort({ngay_ct:-1}).lean())||await global.getModel("sokhonpp").findOne({ma_kh:$cust_o_kh$$.ma_kh,id_app:$cust_o_kh$$.id_app,gia_ban_nt:{$gt:0},ma_ct:{$in:model.buyVouchers}},{ngay_ct:1}).sort({ngay_ct:-1}).lean(),!$dhdt_dhgn$$||$kh$$.ngay_mua_gan_nhat&&(new Date($dhdt_dhgn$$.ngay_ct)).getTime()==(new Date($kh$$.ngay_mua_gan_nhat)).getTime()||
30
- ($has_changed$$=!0,$ngay_mua_gan_nhat$$=$dhdt_dhgn$$.ngay_ct));$has_changed$$&&($ngay_mua_gan_nhat$$=$ngay_mua_gan_nhat$$||$kh$$.ngay_mua_gan_nhat,$ngay_mua_dau_tien$$=$ngay_mua_dau_tien$$||$kh$$.ngay_mua_dau_tien,$link_ngay_tuong_tac_gan_nhat$$=$link_ngay_tuong_tac_gan_nhat$$||$kh$$.ngay_tuong_tac_gan_nhat,await model.updateOne({_id:$_id$$},{ngay_mua_gan_nhat:$ngay_mua_gan_nhat$$,ngay_mua_dau_tien:$ngay_mua_dau_tien$$,ngay_tuong_tac_gan_nhat:$link_ngay_tuong_tac_gan_nhat$$,trang_thai:$trang_thai$$}),
31
- $cust_o_kh$$=await model.findById($kh$$._id).lean(),redisCache.set("customer",$cust_o_kh$$));return{ngay_mua_gan_nhat:$ngay_mua_gan_nhat$$,ngay_mua_dau_tien:$ngay_mua_dau_tien$$,ngay_tuong_tac_gan_nhat:$link_ngay_tuong_tac_gan_nhat$$}};module.exports=model;
1
+ function _0x10d2(_0x36d2ce,_0xe551ce){const _0x295120=_0x4293();return _0x10d2=function(_0x59b5b9,_0x38df2c){_0x59b5b9=_0x59b5b9-0x1e0;let _0x4293f7=_0x295120[_0x59b5b9];if(_0x10d2['ZblEdi']===undefined){var _0x10d230=function(_0x369ced){const _0x36db41='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25d3b0='',_0x455b3a='',_0x5964c1=_0x25d3b0+_0x10d230;for(let _0x1ebceb=0x0,_0xe22088,_0x2d38d6,_0x20bb0d=0x0;_0x2d38d6=_0x369ced['charAt'](_0x20bb0d++);~_0x2d38d6&&(_0xe22088=_0x1ebceb%0x4?_0xe22088*0x40+_0x2d38d6:_0x2d38d6,_0x1ebceb++%0x4)?_0x25d3b0+=_0x5964c1['charCodeAt'](_0x20bb0d+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xe22088>>(-0x2*_0x1ebceb&0x6)):_0x1ebceb:0x0){_0x2d38d6=_0x36db41['indexOf'](_0x2d38d6);}for(let _0x2f8208=0x0,_0x4c6fdd=_0x25d3b0['length'];_0x2f8208<_0x4c6fdd;_0x2f8208++){_0x455b3a+='%'+('00'+_0x25d3b0['charCodeAt'](_0x2f8208)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x455b3a);};_0x10d2['lLjEgV']=_0x10d230,_0x36d2ce=arguments,_0x10d2['ZblEdi']=!![];}const _0x132956=_0x295120[0x0],_0x111456=_0x59b5b9+_0x132956,_0x23ce63=_0x36d2ce[_0x111456];if(!_0x23ce63){const _0x3c8c70=function(_0x26e278){this['ROhkax']=_0x26e278,this['HYZlFQ']=[0x1,0x0,0x0],this['LacfUT']=function(){return'newState';},this['EEnQWX']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['xPnLXQ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3c8c70['prototype']['eVsHsn']=function(){const _0x2eae06=new RegExp(this['EEnQWX']+this['xPnLXQ']),_0x2e3c4b=_0x2eae06['test'](this['LacfUT']['toString']())?--this['HYZlFQ'][0x1]:--this['HYZlFQ'][0x0];return this['oNhbXS'](_0x2e3c4b);},_0x3c8c70['prototype']['oNhbXS']=function(_0x552801){if(!Boolean(~_0x552801))return _0x552801;return this['gNCrzj'](this['ROhkax']);},_0x3c8c70['prototype']['gNCrzj']=function(_0x237137){for(let _0x15f6ea=0x0,_0x1b53df=this['HYZlFQ']['length'];_0x15f6ea<_0x1b53df;_0x15f6ea++){this['HYZlFQ']['push'](Math['round'](Math['random']())),_0x1b53df=this['HYZlFQ']['length'];}return _0x237137(this['HYZlFQ'][0x0]);},new _0x3c8c70(_0x10d2)['eVsHsn'](),_0x4293f7=_0x10d2['lLjEgV'](_0x4293f7),_0x36d2ce[_0x111456]=_0x4293f7;}else _0x4293f7=_0x23ce63;return _0x4293f7;},_0x10d2(_0x36d2ce,_0xe551ce);}const _0x5200e1=_0x10d2;(function(_0x413acc,_0x57ad68){const _0x1b3b5a=_0x10d2,_0x225b6b=_0x413acc();while(!![]){try{const _0x26950b=-parseInt(_0x1b3b5a(0x233))/0x1+-parseInt(_0x1b3b5a(0x223))/0x2+parseInt(_0x1b3b5a(0x271))/0x3+-parseInt(_0x1b3b5a(0x25f))/0x4*(-parseInt(_0x1b3b5a(0x228))/0x5)+-parseInt(_0x1b3b5a(0x22d))/0x6*(parseInt(_0x1b3b5a(0x1ed))/0x7)+parseInt(_0x1b3b5a(0x268))/0x8*(parseInt(_0x1b3b5a(0x279))/0x9)+parseInt(_0x1b3b5a(0x259))/0xa;if(_0x26950b===_0x57ad68)break;else _0x225b6b['push'](_0x225b6b['shift']());}catch(_0x183c1c){_0x225b6b['push'](_0x225b6b['shift']());}}}(_0x4293,0xd4aad));const _0x38df2c=(function(){const _0x932810=_0x10d2,_0x43928a={'teCyk':_0x932810(0x21b)};let _0xd06066=!![];return function(_0x2b5675,_0x5414f0){const _0x3a0ff4=_0xd06066?function(){const _0x1438a6=_0x10d2;if(_0x1438a6(0x290)!==_0x43928a[_0x1438a6(0x1ee)]){if(_0x5414f0){const _0x4723be=_0x5414f0['apply'](_0x2b5675,arguments);return _0x5414f0=null,_0x4723be;}}else _0x1d3dd3='5';}:function(){};return _0xd06066=![],_0x3a0ff4;};}()),_0x59b5b9=_0x38df2c(this,function(){const _0x3b9d88=_0x10d2,_0x414825={'TeWuA':_0x3b9d88(0x1e6)};return _0x59b5b9[_0x3b9d88(0x20e)]()[_0x3b9d88(0x280)](_0x414825[_0x3b9d88(0x25e)])[_0x3b9d88(0x20e)]()[_0x3b9d88(0x232)](_0x59b5b9)[_0x3b9d88(0x280)](_0x414825[_0x3b9d88(0x25e)]);});_0x59b5b9();function _0x4293(){const _0x3995e0=['kcGOlISPkYKRksSK','Bw9KzwXZ','y3vZDg9Tzxi','u08X','yxrfCeG','q3vZDg9TzxiGAw5KzxGGzxjYB3i','Ew9iwLq','n3fbt01rza','DgvdEwS','s2JdOwnOigJdOg5Nicr7B2jQlNrLBL9RAh0GXjhdOYbWAmoHDcbZAw5OigtHU68GBgNHU4D1ihpHU5uGy8oHAq','z2v0vgLTzq','u3jNuhm','BfjoC2O','C29YDa','t0jwwui','ywDNCMvNyxrL','ugTptLa','C1f4vxK','B2zFDxnLCG','ExzdvhC','ugnTv2y','q0zAAK4','C29RAg9UCha','t2jQzwn0swq','B1fcwvC','t01Yzvi','DM1tuhy','D2j5qxy','txPfruy','uxjfwwO','rfbXq2m','q2fUj3qGzMLUzcbJDxn0B21LCIbPBMzVCM1HDgLVBG','Dgv4Da','jg1Hx2TO','q3vZDg9TzxiGAw5KzxHPBMCGy29TCgXLDgu','ELvXAgK','Cu5SvuW','BwfW','AwrZ','y2rRAa','Dg9tDhjPBMC','rNv4r2i','t0HUDue','qNjZC2q','C3vIC3rYAw5N','Bg9Rs2m','yxn5BMndCMvHDgvdDxn0B21LCG','Aw5KzxG','BMDHEv9TDwfFz2fUx25Oyxq','AKzVq20','C28X','ic0G','DgTry1a','sKn3vey','CMvMzxjLBMnLs2v5CW','AwrFA2G','DKXeD0K','BMDHEv9TDwfFzgf1x3rPzw4','vhLWzxm','CMfPr2O','zM9YrwfJAa','mJuYntG1mK1nCuntuq','z2v0tw9KzwW','qxfLDgq','BM93','swTbyuO','mtm5odvdALPwse4','BwvZC2fNzq','zxjYB3i','zw1HAwW','AgXVzee','mJK2nti0mLHbBevHCq','ve5Yvhm','wCoQDsbJ4BQNDsbUAog6RxaGDmoQBIbRAmoHy2GGAmoGBMC','wxjmyK0','zuTmyM4','y29UC3rYDwn0B3i','otm2ntm0ANbOrejz','rgLzqKO','yxn5BMndCMvHDgvdDxn0B21LCKnVzgu','uejm','s2JdOwnOigJdOg5Nicr7B2jQlNrLBL9RAh0GXjhdOYbWAmoHDcbZAw5OigtHU68GBgNHU4D1ihrYB25NiglHUQnUzYbJW6jUimsr4BUrAsbRAmoHy2GGAmoGBMC','Eu5Myuu','seqX','BMv3ig9Mx3vZzxi6','yNv5vM91y2HLCNm','s2JdOwnOigJdOg5Nicr7B2jQlNrLBL9RAh0GXjhdOYbWAmoHDcbZAw5OigtHU68GBgNHU4D1ihpHU5uGA2HV','EM15Dvu','CMvWBgfJzq','s2JdOwnOigJdOg5Nicr7B2jQlNrLBL9RAh0GXjhdOYbWAmoHDcbZAw5OigtHU68GBgNHU4D1iog7NYbWAgNHUR91igldOw4GBog6UW','zMLUza','jf9Pza','CLD1qwK','uuT3CNq','y3jLyxrL','CKr3sKC','twL4zwq','C29RAg8','C3bSAxq','Bw1YtKO','y29UzMLNCW','qwnyDxu','nhWXFdj8nxWZFda','s2JdOwnOigJdOg5Nicr7B2jQlNrLBL9RAh0GXjhdOYbWAmoHDcbZAw5OigtHU68GBgNHU4D1iog7NYdeKCAHBIdeKEg6T3qGAmoGBMCGXjhgOw4GXjhHURD0igJdOg5N','y2f0y2G','BMDHEv9JDa','s0v2Ce0','AxnfBwfPBa','zxHWB3j0CW','DgvUx2TO','Bw9Uz29VC2u','DxbKyxrLt25L','CNrYvxu','qK50qMK','Cwrfs2G','mti5mdiXndbHDuXnEwW','rhvXtfO','y3jLyxrLq3vZDg9TzxjdB2rL','rvjvy0y','ufzKDxe','vgvxDue','nZjLwezlEwO','quDXwNq','zwXXsKm','BwfFA2G6','CenIB3q','q1jywum','qM9oBhi','BwfFA2HFBM8','q2HLy2SGB2zFDxnLCIWGChjLDMLVDxmGB2zFDxnLCJO','odHWvuPmEvK','Aw5MBW','jgLKx2fWCa','zgf0zv9JCMvHDgvK','vMrtELe','wM5yBMm','Dg9vChbLCKnHC2u','DgLXu2G','AxnozxC','mZyYmJC0ou5buK1JDq','seqY','tfjgtM8','BgvUz3rO','x2LK','Bg9N','Ag9QsLe','uvnIrwe','odmXnZCXt1vhtKDf','DMfSAwrHDg9Y','zMLUzej5swq','BwfFA2G','BMDHEv90Dw9Uz190ywnFz2fUx25Oyxq','sefwwwS','BwfFA2HFy28','C2vHCMnO','B1jpA1m','BgvHBG','AM9PBG','C2v0','Ew91ihnOB3vSzcbKzwXLDguGy3vZDg9Tzxi','zLniC2C','AwrFyxbW','ywv0D24','CxjADMu','x3bYzxzPB3vZx29Mx3vZzxi','y3vZDg9TzxiGzhvWBgLJyxrPB24','DgHLBG','t3Dduwu','ChjL','zMLUze9Uzq','uKzovNq','CfbPrgS','tLreEMu','uxnIwNy','DhjHBMDFDgHHAq','BM9Uzq','uKjlDgq','B0fmAuq'];_0x4293=function(){return _0x3995e0;};return _0x4293();}const validator=require(_0x5200e1(0x27a)),redisCache=require('../libs/redis-cache'),customerSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_kh':{'type':String,'uppercase':!![],'required':!![],'default':'','trim':!![],'maxlength':0x20},'ten_kh':{'type':String,'required':_0x5200e1(0x22f),'trim':!![],'maxlength':0x400},'device_user_id':String,'gioi_tinh':{'type':String,'maxlength':0x400},'ngay_sinh':Date,'dia_chi':{'type':String,'maxlength':0x400},'xa_phuong':{'type':String,'maxlength':0x400},'quan_huyen':{'type':String,'maxlength':0x400},'tinh_thanh':{'type':String,'maxlength':0x400},'location':Schema[_0x5200e1(0x220)][_0x5200e1(0x246)],'dien_thoai':{'type':String,'maxlength':0x400,'trim':!![]},'dia_chi2':{'type':String,'maxlength':0x400},'xa_phuong2':{'type':String,'maxlength':0x400},'quan_huyen2':{'type':String,'maxlength':0x400},'tinh_thanh2':{'type':String,'maxlength':0x400},'location2':Schema[_0x5200e1(0x220)]['Mixed'],'dien_thoai2':{'type':String,'maxlength':0x400,'trim':!![]},'fax':{'type':String,'maxlength':0x400},'email':{'type':String,'maxlength':0x400},'fb_id':String,'page_id':String,'website':{'type':String,'maxlength':0x400},'ma_so_thue':{'type':String,'maxlength':0x400},'phu_trach':{'type':String,'maxlength':0x400},'ten_phu_trach':String,'loai_kh':{'type':String,'default':'','trim':!![],'maxlength':0x400},'nh_kh':{'type':String,'default':'','trim':!![],'maxlength':0x400},'ten_nh_kh':String,'nh_kh2':[String],'nh_kh3':[String],'nh_kh4':[String],'nh_kh5':[String],'nh_kh6':[String],'ma_nganh_hang':[String],'khu_vuc_phu_trach':[],'ma_kho_npp':String,'ghi_chu':{'type':String,'default':'','trim':!![],'maxlength':0x400},'isdistributor':{'type':Boolean},'ncc_yn':{'type':Boolean,'default':!![]},'kh_yn':{'type':Boolean,'default':!![]},'isbuyer':{'type':Boolean,'default':!![]},'isseller':Boolean,'iscarrier':Boolean,'from_updated':{'type':String,'default':'M','maxlength':0x400},'of_user':{'type':String,'lowercase':!![],'maxlength':0x400,'set':function(_0x4cf556){const _0x427c04=_0x5200e1;return this[_0x427c04(0x28a)]=this[_0x427c04(0x1f8)],_0x4cf556;}},'group_user':String,'default_password':{'type':String},'exfields':Schema[_0x5200e1(0x220)]['Mixed'],'trang_thai':{'type':String,'default':'1'},'activities':{},'status':{'type':Boolean,'default':!![]},'ngay_mua_dau_tien':Date,'ngay_mua_gan_nhat':Date,'ngay_tuong_tac_gan_nhat':{'type':Date,'default':Date[_0x5200e1(0x226)]},'latest_note':Schema['Types'][_0x5200e1(0x246)],'labels':[String],'hinh_anh':String,'tk_ngan_hang':String,'ten_ngan_hang':String,'date_created':{'type':Date,'default':Date[_0x5200e1(0x226)]},'date_updated':{'type':Date,'default':Date[_0x5200e1(0x226)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'visible_to_usergroups':[String],'update_right':[String],'delete_right':[String],'dataview_to':{'type':Number,'default':0x0},'dataview_to_users':[String]},{'toJSON':{'virtuals':!![]}});customerSchema[_0x5200e1(0x28e)]('save',function(_0x495767){const _0x229d9a=_0x5200e1,_0x21f2e4={'BNtBi':function(_0xbcbeb7,_0x15b7e2){return _0xbcbeb7(_0x15b7e2);},'DPqCc':function(_0x29302e,_0x2d008b){return _0x29302e>_0x2d008b;},'PVduq':function(_0x4aac4b,_0x35bf97){return _0x4aac4b===_0x35bf97;},'lObBW':_0x229d9a(0x291),'vLDwI':_0x229d9a(0x27e),'zUqhi':function(_0xe9cef3){return _0xe9cef3();},'AUHkD':function(_0x367339,_0x208dd5){return _0x367339!=_0x208dd5;},'OwCQe':_0x229d9a(0x267),'AGqZt':_0x229d9a(0x23a),'fSHsg':_0x229d9a(0x262)};if(!this[_0x229d9a(0x1f8)])return _0x21f2e4['zUqhi'](_0x495767);const _0xf0ab53=this;if(this[_0x229d9a(0x270)]||_0x21f2e4['AUHkD'](this[_0x229d9a(0x1f8)],this[_0x229d9a(0x28a)])){let _0x2d9ac7={'id_app':this['id_app'],'of_user':this[_0x229d9a(0x1f8)],'ma_kh':{'$ne':this[_0x229d9a(0x27c)]}};console[_0x229d9a(0x276)](_0x21f2e4[_0x229d9a(0x28d)],this['_previous_of_user'],_0x21f2e4[_0x229d9a(0x260)],this[_0x229d9a(0x1f8)],_0x21f2e4[_0x229d9a(0x286)],this[_0x229d9a(0x27c)]),mongoose['models'][_0x229d9a(0x1e8)][_0x229d9a(0x240)](_0x2d9ac7,{'ten_kh':0x1,'ma_kh':0x1},(_0x3467a8,_0x4e2584)=>{const _0x4414e=_0x229d9a,_0xa21bd6={'wbyAv':function(_0x47e65e,_0x20b06e){return _0x21f2e4['BNtBi'](_0x47e65e,_0x20b06e);}};if(_0x21f2e4[_0x4414e(0x204)](_0x4e2584[_0x4414e(0x274)],0x0))_0x21f2e4[_0x4414e(0x257)](_0x495767,new Error('Người\x20sử\x20dụng\x20\x27'+_0xf0ab53[_0x4414e(0x1f8)]+'\x27\x20đã\x20được\x20gắn\x20cho\x20khách\x20hàng\x20\x27'+_0x4e2584[_0x4414e(0x20b)](_0x30a456=>_0x30a456[_0x4414e(0x27c)]+_0x4414e(0x219)+_0x30a456[_0x4414e(0x253)])[_0x4414e(0x283)](',')+'\x27'));else{if(_0x21f2e4[_0x4414e(0x25d)](_0x21f2e4['lObBW'],_0x21f2e4[_0x4414e(0x21e)])){const _0x135eac={'BoNlr':function(_0x550a91,_0x229f53){const _0x441801=_0x4414e;return _0xa21bd6[_0x441801(0x201)](_0x550a91,_0x229f53);}};_0x38bf79[_0x4414e(0x287)]=_0x25b5b0;let _0x197aa7=new _0x854e02((_0x4f3a87,_0x5ac09e)=>{const _0x5b95ef=_0x4414e,_0x239ac6={'oALiD':function(_0x458ad0,_0x562ec4){const _0x4166e2=_0x10d2;return _0x135eac[_0x4166e2(0x265)](_0x458ad0,_0x562ec4);}};_0x34d464[_0x5b95ef(0x240)](_0x4059b6)[_0x5b95ef(0x282)]()[_0x5b95ef(0x28c)](_0x4942e7=>{const _0xe7c358=_0x5b95ef;_0x4f3a87(_0x319ad2?_0x4942e7[_0xe7c358(0x20b)](_0x32439a=>_0x32439a[_0x17f0d0]):_0x4942e7);})[_0x5b95ef(0x24e)](_0x9d47e3=>{const _0x55b65d=_0x5b95ef;_0x239ac6[_0x55b65d(0x1e5)](_0x5ac09e,new _0x2d74a9(_0x9d47e3[_0x55b65d(0x229)]));});});return _0x197aa7;}else _0x21f2e4[_0x4414e(0x209)](_0x495767);}});}else _0x21f2e4[_0x229d9a(0x209)](_0x495767);});if((global[_0x5200e1(0x24a)]||{})['createIndexes']){const NoGnWd='13|23|38|39|30|42|15|32|35|17|8|7|31|27|34|14|36|18|37|3|10|0|21|16|20|41|26|11|22|24|29|5|19|4|2|40|33|6|28|9|25|1|12|43'['split']('|');let nekWUG=0x0;while(!![]){switch(NoGnWd[nekWUG++]){case'0':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'khu_vuc_phu_trach':0x1,'status':0x1});continue;case'1':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'ma_kh':0x1,'ten_kh':0x1,'tinh_thanh':0x1,'quan_huyen':0x1});continue;case'2':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'status':0x1});continue;case'3':customerSchema['index']({'id_app':0x1,'page_id':0x1,'fb_id':0x1});continue;case'4':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'status':0x1,'ma_kh':0x1,'ten_kh':0x1,'dia_chi':0x1,'xa_phuong':0x1,'quan_huyen':0x1,'tinh_thanh':0x1,'dien_thoai':0x1,'email':0x1,'ma_so_thue':0x1,'phu_trach':0x1,'of_user':0x1});continue;case'5':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'tinh_thanh':0x1,'quan_huyen':0x1,'xa_phuong':0x1,'status':0x1});continue;case'6':customerSchema['index']({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'iscarrier':0x1});continue;case'7':customerSchema['index']({'id_app':0x1,'trang_thai':0x1,'nh_kh3':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'8':customerSchema['index']({'id_app':0x1,'trang_thai':0x1,'nh_kh2':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'9':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'ma_kh':0x1,'ten_kh':0x1,'dien_thoai':0x1,'email':0x1,'ma_so_thue':0x1,'dia_chi':0x1});continue;case'10':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'isdistributor':0x1,'status':0x1});continue;case'11':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'dien_thoai':0x1,'status':0x1});continue;case'12':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'ma_kh':0x1,'ten_kh':0x1,'tinh_thanh':0x1,'quan_huyen':0x1,'xa_phuong':0x1,'dia_chi':0x1,'dien_thoai':0x1,'email':0x1,'ma_so_thue':0x1,'nh_kh':0x1});continue;case'13':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'ma_kh':0x1},{'unique':!![]});continue;case'14':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'loai_kh':0x1,'status':0x1});continue;case'15':customerSchema['index']({'id_app':0x1,'nh_kh4':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'16':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'ma_nganh_hang':0x1,'status':0x1});continue;case'17':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'nh_kh':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'18':customerSchema['index']({'id_app':0x1,'fb_id':0x1});continue;case'19':customerSchema['index']({'id_app':0x1,'tinh_thanh':0x1,'quan_huyen':0x1,'xa_phuong':0x1,'dia_chi':0x1,'status':0x1});continue;case'20':customerSchema['index']({'id_app':0x1,'ngay_mua_gan_nhat':0x1,'status':0x1});continue;case'21':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'activities':0x1,'status':0x1});continue;case'22':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'email':0x1,'status':0x1});continue;case'23':customerSchema['index']({'id_app':0x1,'ma_kh':0x1,'ten_kh':0x1,'status':0x1});continue;case'24':customerSchema['index']({'id_app':0x1,'tinh_thanh':0x1,'status':0x1});continue;case'25':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'ma_kh':0x1,'ten_kh':0x1,'tinh_thanh':0x1});continue;case'26':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'ngay_tuong_tac_gan_nhat':0x1,'status':0x1});continue;case'27':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'nh_kh5':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'28':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1,'nh_kh':0x1});continue;case'29':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'tinh_thanh':0x1,'quan_huyen':0x1,'status':0x1});continue;case'30':customerSchema['index']({'id_app':0x1,'nh_kh2':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'31':customerSchema['index']({'id_app':0x1,'trang_thai':0x1,'nh_kh4':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'32':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'nh_kh5':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'33':customerSchema['index']({'id_app':0x1,'trang_thai':0x1,'of_user':0x1,'phu_trach':0x1,'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1});continue;case'34':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'isseller':0x1,'ten_kh':0x1});continue;case'35':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'trang_thai':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'36':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'iscarrier':0x1,'ten_kh':0x1});continue;case'37':customerSchema['index']({'id_app':0x1,'page_id':0x1});continue;case'38':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'39':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'nh_kh':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'40':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'date_created':-0x1});continue;case'41':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'ngay_mua_dau_tien':0x1,'status':0x1});continue;case'42':customerSchema['index']({'id_app':0x1,'nh_kh3':0x1,'isbuyer':0x1,'ten_kh':0x1});continue;case'43':customerSchema[_0x5200e1(0x215)]({'id_app':0x1,'ma_kh':'text','ten_kh':'text','dia_chi':_0x5200e1(0x206),'xa_phuong':_0x5200e1(0x206),'quan_huyen':'text','tinh_thanh':_0x5200e1(0x206),'dien_thoai':_0x5200e1(0x206),'email':_0x5200e1(0x206),'ma_so_thue':_0x5200e1(0x206),'phu_trach':'text'},{'name':'customer_index','default_language':_0x5200e1(0x1e3)});continue;}break;}}const model=mongoose[_0x5200e1(0x1e7)]['customer']||mongoose['model'](_0x5200e1(0x1e8),customerSchema);(global['configs']||{})['createIndexes']&&model['on']('index',async function(_0x194a48){const _0x2a9a37=_0x5200e1,_0x50dc25={'OgjlY':function(_0x4a0fe4,_0x241e68){return _0x4a0fe4>_0x241e68;},'aetwn':function(_0xf5b519,_0x24052c){return _0xf5b519(_0x24052c);},'OHnuA':function(_0x5a6f20,_0x4d30e2){return _0x5a6f20!==_0x4d30e2;},'lRNsj':_0x2a9a37(0x25c),'SrgPs':'ipdLi','lokKc':_0x2a9a37(0x1eb),'yNfaE':_0x2a9a37(0x26a),'Brssd':_0x2a9a37(0x207),'ALLTu':function(_0x24f82d,_0x4a442d){return _0x24f82d!==_0x4a442d;},'eIBsH':_0x2a9a37(0x221),'SZPuz':_0x2a9a37(0x208)};if(_0x194a48){if(_0x50dc25[_0x2a9a37(0x210)](_0x50dc25[_0x2a9a37(0x1f2)],_0x50dc25[_0x2a9a37(0x1f1)])){console[_0x2a9a37(0x22a)](_0x50dc25[_0x2a9a37(0x213)],_0x194a48);let _0x22d0ec=await model[_0x2a9a37(0x1f5)]([{'$group':{'_id':{'id_app':_0x50dc25[_0x2a9a37(0x238)],'ma_kh':_0x50dc25[_0x2a9a37(0x211)]},'count':{'$sum':0x1},'ids':{'$push':_0x2a9a37(0x241)}}},{'$match':{'count':{'$gt':0x1}}}]);_0x22d0ec[_0x2a9a37(0x222)](_0x18718b=>{const _0x3b9af0=_0x2a9a37;console['info'](_0x3b9af0(0x28b),_0x18718b[_0x3b9af0(0x275)],_0x18718b[_0x3b9af0(0x20c)]),_0x18718b[_0x3b9af0(0x20c)][_0x3b9af0(0x222)]((_0xa063c2,_0x2457d3)=>{const _0x4f47ee=_0x3b9af0;_0x50dc25['OgjlY'](_0x2457d3,0x0)&&console[_0x4f47ee(0x269)](_0x4f47ee(0x285),_0xa063c2);});});}else{if(_0x26c1f3)return _0x50dc25[_0x2a9a37(0x288)](_0x1c2db7,new _0x589aa5(_0xb65d93[_0x2a9a37(0x229)]));return _0x55717d(_0x26df1b);}}else{if(_0x50dc25['ALLTu'](_0x2a9a37(0x278),_0x50dc25['eIBsH']))console['info'](_0x50dc25['SZPuz']);else{const _0x366fc4=_0x5d7479['apply'](_0xa85d46,arguments);return _0x3f1c6f=null,_0x366fc4;}}});model[_0x5200e1(0x21c)]={'ma_kh':[{'model':_0x5200e1(0x20d),'key':_0x5200e1(0x27c),'error':_0x5200e1(0x237)},{'model':'socai','key':_0x5200e1(0x266),'error':'Khách\x20hàng\x20${obj.ten_kh}\x20đã\x20phát\x20sinh\x20dữ\x20liệu\x20trong\x20sổ\x20cái'},{'model':'socai','key':_0x5200e1(0x27f),'error':_0x5200e1(0x1ef)},{'model':_0x5200e1(0x247),'key':_0x5200e1(0x27c),'error':_0x5200e1(0x23c)},{'model':_0x5200e1(0x218),'key':'ma_kh','error':_0x5200e1(0x24d)},{'model':'pbl','key':'ma_kh','error':_0x5200e1(0x23f)}]},model[_0x5200e1(0x25b)]=function(_0x5037cf,_0x182433,_0x184dd7,_0x2e19db){const _0x489613=_0x5200e1,_0xc86ad5={'iAGSP':function(_0x40651a,_0x558d9d){return _0x40651a(_0x558d9d);},'rWuAi':function(_0x38702d,_0x10d9f7,_0x3eb23e){return _0x38702d(_0x10d9f7,_0x3eb23e);},'oQBYW':function(_0x54aeea,_0x316b56){return _0x54aeea+_0x316b56;},'elqJC':function(_0x1854f8,_0x4ba6bc){return _0x1854f8-_0x4ba6bc;}};_0x182433=_0x182433[_0x489613(0x23e)](/[^\w\s]/gi,'')[_0x489613(0x248)]('\x20')[_0x489613(0x283)]('')[_0x489613(0x26e)](),model[_0x489613(0x28f)]({'ma_kh':_0x182433,'id_app':_0x5037cf},function(_0x3711c5,_0x592534){const _0x1030da=_0x489613;if(_0x3711c5)return _0xc86ad5['iAGSP'](_0x2e19db,_0x3711c5);if(!_0x592534)return _0xc86ad5[_0x1030da(0x242)](_0x2e19db,null,_0x182433);else _0x184dd7=_0xc86ad5[_0x1030da(0x1fe)](_0x184dd7,0x1),_0x182433=_0xc86ad5[_0x1030da(0x1fe)](_0x182433[_0x1030da(0x212)](0x0,_0xc86ad5[_0x1030da(0x261)](_0x182433['length'],_0x184dd7[_0x1030da(0x20e)]()[_0x1030da(0x274)])),_0x184dd7[_0x1030da(0x20e)]()),model[_0x1030da(0x25b)](_0x5037cf,_0x182433,_0x184dd7,_0x2e19db);});},model[_0x5200e1(0x235)]=async(_0x4c76cd,_0x6d2b94,_0x2e4441)=>{const _0xa5546=_0x5200e1,_0xe256dd={'jFoCm':function(_0xd55df0,_0x2afc9f){return _0xd55df0(_0x2afc9f);},'QrEYj':function(_0xa19fa5,_0x3f54df){return _0xa19fa5>_0x3f54df;},'hojJQ':function(_0x189fe8,_0x36b11a){return _0x189fe8!==_0x36b11a;},'HatkW':_0xa5546(0x227)};if(!_0x2e4441)_0x2e4441=0x0;_0xe256dd[_0xa5546(0x203)](_0x6d2b94[_0xa5546(0x274)],0x20)&&(_0xe256dd[_0xa5546(0x277)]('IkAaJ',_0xe256dd['HatkW'])?_0xe256dd[_0xa5546(0x217)](_0x385652,_0x519340?_0x3061e0[_0xa5546(0x20b)](_0xcc5867=>_0xcc5867[_0x5b9c18]):_0x6e4c2d):_0x6d2b94=_0x6d2b94[_0xa5546(0x212)](0x0,0x20));let _0x594468=new Promise(_0x3c2ee4=>{const _0x7572ec=_0xa5546,_0x16382f={'soEDH':function(_0x27bc2e,_0x2d8fd9){return _0x27bc2e||_0x2d8fd9;}};model[_0x7572ec(0x25b)](_0x4c76cd,_0x6d2b94,_0x2e4441,(_0x450736,_0x551a91)=>{_0x3c2ee4(_0x16382f['soEDH'](_0x551a91,''));});});return _0x594468;},model['getInfo']=async(_0x5159a1,_0x16c3dd,_0x2107ce)=>{const _0x500256={'LRFNo':function(_0x4e0e5d,_0x2914e3){return _0x4e0e5d(_0x2914e3);},'rDwJG':'RtVqk'};_0x16c3dd['id_app']=_0x5159a1;let _0x3793e7=new Promise((_0x3c29cf,_0x1e1ad6)=>{const _0x1acfc0=_0x10d2,_0x40229f={'pCbot':_0x500256[_0x1acfc0(0x245)],'VdSzQ':function(_0x42898c,_0x50b20b){return _0x42898c(_0x50b20b);},'nPGGg':_0x1acfc0(0x205)};model['findOne'](_0x16c3dd)['lean']()[_0x1acfc0(0x28c)](_0x45a959=>{const _0x424164=_0x1acfc0;if(_0x40229f[_0x424164(0x263)]!=='wkyaL'){if(!_0x45a959)return _0x40229f[_0x424164(0x26c)](_0x1e1ad6,_0x40229f['nPGGg']);_0x3c29cf(_0x2107ce?_0x45a959[_0x2107ce]:_0x45a959);}else _0x3ec847=!![],_0x223e40='5';})[_0x1acfc0(0x24e)](_0x47d61e=>{const _0xd3d453=_0x1acfc0;_0x500256[_0xd3d453(0x273)](_0x1e1ad6,_0x47d61e[_0xd3d453(0x229)]);});});return _0x3793e7;},model['getList']=async(_0x3d1936,_0x781da,_0x23bb5d)=>{const _0x35cad8=_0x5200e1,_0x5322e4={'OBVYB':function(_0xf9bbfa,_0x36357c,_0x568595){return _0xf9bbfa(_0x36357c,_0x568595);},'Aqetd':function(_0x59940d,_0x320375){return _0x59940d(_0x320375);},'ZnXnc':function(_0x1faa71,_0x3709fb){return _0x1faa71(_0x3709fb);},'hlodA':'dKZUG'};_0x781da[_0x35cad8(0x287)]=_0x3d1936;let _0x57ba37=new Promise((_0x17e39a,_0x2fa73d)=>{const _0x47a07f=_0x35cad8;if(_0x5322e4[_0x47a07f(0x22c)]!==_0x5322e4[_0x47a07f(0x22c)])return _0x5322e4[_0x47a07f(0x1f4)](_0x424042,null,_0x49df51);else model['find'](_0x781da)[_0x47a07f(0x282)]()[_0x47a07f(0x28c)](_0x59edd0=>{const _0x37c819=_0x47a07f;_0x5322e4[_0x37c819(0x225)](_0x17e39a,_0x23bb5d?_0x59edd0[_0x37c819(0x20b)](_0x32c258=>_0x32c258[_0x23bb5d]):_0x59edd0);})[_0x47a07f(0x24e)](_0x32d1c2=>{const _0x5468f8=_0x47a07f;_0x5322e4[_0x5468f8(0x26d)](_0x2fa73d,new Error(_0x32d1c2[_0x5468f8(0x229)]));});});return _0x57ba37;},model[_0x5200e1(0x214)]=async _0x528b23=>{const _0x47a98b=_0x5200e1,_0x4259bb={'CHrin':'you\x20should\x20delete\x20customer','zOHIi':_0x47a98b(0x258)};if(_0x528b23[_0x47a98b(0x1f8)]){if(_0x4259bb['zOHIi']===_0x4259bb['zOHIi']){let _0x1cd0f3=await model[_0x47a98b(0x28f)]({'id_app':_0x528b23[_0x47a98b(0x287)],'of_user':_0x528b23[_0x47a98b(0x1f8)]});if(_0x1cd0f3)return _0x1cd0f3;}else _0x2275a9[_0x47a98b(0x269)](_0x4259bb['CHrin'],_0x4d62ab);}if(!_0x528b23[_0x47a98b(0x27c)])_0x528b23[_0x47a98b(0x27c)]=await model[_0x47a98b(0x235)](_0x528b23[_0x47a98b(0x287)],_0x528b23[_0x47a98b(0x253)]);let _0xf6c668=await model['findOne']({'id_app':_0x528b23['id_app'],'ma_kh':_0x528b23[_0x47a98b(0x27c)]});if(_0xf6c668)return _0xf6c668;return new Promise((_0x121746,_0x9ba310)=>{const _0x5278eb=_0x47a98b,_0x5ac272={'RBKtd':function(_0x2355a5,_0x10ebce){return _0x2355a5(_0x10ebce);},'FuxGb':function(_0x1691da,_0x1ae65f){return _0x1691da(_0x1ae65f);}};_0x528b23[_0x5278eb(0x22b)]&&!validator[_0x5278eb(0x251)](_0x528b23['email'])&&(_0x528b23['email']=''),model[_0x5278eb(0x244)](_0x528b23,(_0x6193dc,_0x162ebb)=>{const _0x279e91=_0x5278eb;if(_0x6193dc)return _0x5ac272[_0x279e91(0x1e4)](_0x9ba310,new Error(_0x6193dc[_0x279e91(0x229)]));return _0x5ac272[_0x279e91(0x20f)](_0x121746,_0x162ebb);});});},model[_0x5200e1(0x23b)]=[_0x5200e1(0x1e9),'SO9',_0x5200e1(0x272),_0x5200e1(0x239),_0x5200e1(0x236)],model['updateActives']=async _0x27340b=>{const _0x2a9bc6=_0x5200e1,_0x2bfbd0={'atEpH':function(_0x41fb81){return _0x41fb81();},'eKLbn':function(_0x34e4e2,_0x43540f){return _0x34e4e2(_0x43540f);},'gGaTa':_0x2a9bc6(0x205),'DiYBJ':function(_0x427319,_0x24e0ae){return _0x427319>_0x24e0ae;},'AcXuu':'you\x20should\x20delete\x20customer','DuqLZ':function(_0x512644,_0x129695){return _0x512644(_0x129695);},'mmrNJ':_0x2a9bc6(0x200),'PkONP':_0x2a9bc6(0x20a),'WHPNa':_0x2a9bc6(0x1ff),'rtrUu':function(_0x2c31ea,_0x5c4df1){return _0x2c31ea<_0x5c4df1;},'yoHZT':function(_0x58311a,_0x1fc347){return _0x58311a==_0x1fc347;},'QsbZv':_0x2a9bc6(0x247),'CRXYC':_0x2a9bc6(0x1fc),'NTDze':function(_0x3c6da6,_0x3beb9f){return _0x3c6da6!=_0x3beb9f;},'tkQcP':function(_0x25e1e2,_0x30bb1d){return _0x25e1e2===_0x30bb1d;},'TNrTs':function(_0x3b8177,_0xf98827){return _0x3b8177!==_0xf98827;},'hBggH':_0x2a9bc6(0x23d),'CFZjN':_0x2a9bc6(0x1f9),'qrZve':_0x2a9bc6(0x1fa),'MzEEF':_0x2a9bc6(0x24c),'YrLbM':function(_0x5ddeef,_0xb09b3f){return _0x5ddeef==_0xb09b3f;},'UiVbg':_0x2a9bc6(0x243),'sQxUy':function(_0x3d404a,_0xedcd2d){return _0x3d404a!=_0xedcd2d;}};let _0x2197ae=![],_0x5a7dfc,_0x42416d;if(_0x27340b[_0x2a9bc6(0x27c)]&&_0x27340b[_0x2a9bc6(0x287)])_0x42416d=await model[_0x2a9bc6(0x28f)]({'id_app':_0x27340b['id_app'],'ma_kh':_0x27340b[_0x2a9bc6(0x27c)]},{'_id':0x1,'ngay_tuong_tac_gan_nhat':0x1,'ngay_mua_gan_nhat':0x1,'trang_thai':0x1}),_0x42416d&&(_0x2bfbd0[_0x2a9bc6(0x249)]===_0x2bfbd0[_0x2a9bc6(0x1f6)]?_0x2bfbd0[_0x2a9bc6(0x1ea)](_0xdf46b3):_0x5a7dfc=_0x42416d[_0x2a9bc6(0x275)][_0x2a9bc6(0x20e)]());else{if(_0x2bfbd0['WHPNa']!=='Aiycy'){let _0x5b67cc=_0x27340b[_0x2a9bc6(0x21d)]||_0x27340b['id_link'];_0x5b67cc&&global[_0x2a9bc6(0x254)][_0x2a9bc6(0x220)][_0x2a9bc6(0x1fd)]['isValid'](_0x5b67cc)&&(_0x42416d=await model[_0x2a9bc6(0x28f)]({'_id':_0x5b67cc},{'_id':0x1,'ngay_tuong_tac_gan_nhat':0x1,'ngay_mua_gan_nhat':0x1,'trang_thai':0x1}),_0x42416d&&(_0x5a7dfc=_0x42416d[_0x2a9bc6(0x275)][_0x2a9bc6(0x20e)]()));}else _0x2005be[_0x2a9bc6(0x22b)]='';}if(!_0x42416d)return{};let _0x4f6a89,_0x53b04d,_0x5c70a4,_0xf4dcd=_0x42416d[_0x2a9bc6(0x1e2)];_0x5c70a4=_0x42416d[_0x2a9bc6(0x27d)];_0x27340b[_0x2a9bc6(0x26b)]&&(!_0x42416d[_0x2a9bc6(0x27d)]||_0x2bfbd0[_0x2a9bc6(0x256)](new Date(_0x42416d[_0x2a9bc6(0x27d)])[_0x2a9bc6(0x1f0)](),new Date(_0x27340b['date_created'])['getTime']()))&&_0x5a7dfc!=(_0x27340b[_0x2a9bc6(0x275)]||'')[_0x2a9bc6(0x20e)]()&&(_0x5c70a4=_0x27340b[_0x2a9bc6(0x26b)],_0x2bfbd0[_0x2a9bc6(0x1ec)](_0x42416d['trang_thai'],'3')&&(_0x2197ae=!![],_0xf4dcd='5'));let _0x1e6228=await global['getModel'](_0x2bfbd0[_0x2a9bc6(0x1e1)])[_0x2a9bc6(0x28f)]({'ma_kh':_0x27340b['ma_kh'],'id_app':_0x27340b[_0x2a9bc6(0x287)],'gia_ban_nt':{'$gt':0x0},'ma_ct':{'$in':model['buyVouchers']}},{'ngay_ct':0x1,'so_ct':0x1,'ma_ct':0x1,'ma_vt':0x1,'gia_ban_nt':0x1})[_0x2a9bc6(0x1f3)]({'ngay_ct':0x1})[_0x2a9bc6(0x282)]();if(!_0x1e6228)_0x1e6228=await global[_0x2a9bc6(0x224)](_0x2bfbd0[_0x2a9bc6(0x264)])['findOne']({'ma_kh':_0x27340b[_0x2a9bc6(0x27c)],'id_app':_0x27340b[_0x2a9bc6(0x287)],'gia_ban_nt':{'$gt':0x0},'ma_ct':{'$in':model[_0x2a9bc6(0x23b)]}},{'ngay_ct':0x1,'so_ct':0x1,'ma_ct':0x1,'ma_vt':0x1,'gia_ban_nt':0x1})['sort']({'ngay_ct':0x1})[_0x2a9bc6(0x282)]();if(_0x1e6228){if(!_0x42416d[_0x2a9bc6(0x21f)]||_0x2bfbd0['NTDze'](new Date(_0x1e6228[_0x2a9bc6(0x24f)])[_0x2a9bc6(0x1f0)](),new Date(_0x42416d[_0x2a9bc6(0x21f)])[_0x2a9bc6(0x1f0)]())){if(_0x2bfbd0[_0x2a9bc6(0x21a)](_0x2a9bc6(0x281),_0x2a9bc6(0x281)))_0x2197ae=!![],_0x53b04d=_0x1e6228['ngay_ct'];else{const _0x556ad3={'KEvpM':function(_0x368b69,_0x107401){const _0x4ee4ff=_0x2a9bc6;return _0x2bfbd0[_0x4ee4ff(0x231)](_0x368b69,_0x107401);},'oarIh':_0x2bfbd0['gGaTa']};_0x57ccec[_0x2a9bc6(0x28f)](_0x2e6df0)['lean']()[_0x2a9bc6(0x28c)](_0x1b4fef=>{const _0x2d5707=_0x2a9bc6;if(!_0x1b4fef)return _0x556ad3[_0x2d5707(0x250)](_0x2bf13d,_0x556ad3['oarIh']);_0x5ddc55(_0x175023?_0x1b4fef[_0x5bc04f]:_0x1b4fef);})[_0x2a9bc6(0x24e)](_0x54bd00=>{const _0x1713ef=_0x2a9bc6;_0x2bfbd0['eKLbn'](_0x9e361b,_0x54bd00[_0x1713ef(0x229)]);});}}_0x2bfbd0[_0x2a9bc6(0x22e)](_0x42416d['trang_thai'],'9')&&(_0x2bfbd0[_0x2a9bc6(0x1e0)](_0x42416d[_0x2a9bc6(0x1e2)],'1')||_0x42416d[_0x2a9bc6(0x216)])&&(_0x2197ae=!![],_0xf4dcd='1');}else{if(_0x2bfbd0[_0x2a9bc6(0x21a)](_0x2a9bc6(0x23d),_0x2bfbd0['hBggH'])){if(_0x42416d[_0x2a9bc6(0x216)]||_0x42416d[_0x2a9bc6(0x21f)]){if(_0x2bfbd0[_0x2a9bc6(0x1fb)]!==_0x2bfbd0[_0x2a9bc6(0x289)]){const _0x5d3941=_0x2bfbd0[_0x2a9bc6(0x202)][_0x2a9bc6(0x248)]('|');let _0x4788ff=0x0;while(!![]){switch(_0x5d3941[_0x4788ff++]){case'0':_0x2bfbd0[_0x2a9bc6(0x230)](_0x42416d[_0x2a9bc6(0x1e2)],'1')&&(_0xf4dcd='5');continue;case'1':_0x42416d['ngay_mua_gan_nhat']=null;continue;case'2':_0x42416d[_0x2a9bc6(0x21f)]=null;continue;case'3':_0x53b04d=null;continue;case'4':_0x2197ae=!![];continue;case'5':_0x4f6a89=null;continue;}break;}}else _0x2bfbd0[_0x2a9bc6(0x234)](_0x2fda01,0x0)&&_0x4f7736[_0x2a9bc6(0x269)](_0x2bfbd0[_0x2a9bc6(0x24b)],_0x3ca502);}}else _0x290f03[_0x2a9bc6(0x240)](_0x28be2b)[_0x2a9bc6(0x282)]()['then'](_0x1b3624=>{const _0x5d811c=_0x2a9bc6;_0x2bfbd0[_0x5d811c(0x25a)](_0x4a4ef0,_0x141c72?_0x1b3624[_0x5d811c(0x20b)](_0x179117=>_0x179117[_0x10531b]):_0x1b3624);})[_0x2a9bc6(0x24e)](_0x4d588e=>{const _0x3c8e85=_0x2a9bc6;_0x388dba(new _0x1aeac8(_0x4d588e[_0x3c8e85(0x229)]));});}if(_0x1e6228){if(_0x2bfbd0['tkQcP'](_0x2a9bc6(0x26f),_0x2bfbd0['UiVbg']))_0xcb1a12=!![],_0x52dd53=_0xe5fae0[_0x2a9bc6(0x24f)];else{let _0x2a8b16=await global[_0x2a9bc6(0x224)](_0x2a9bc6(0x247))[_0x2a9bc6(0x28f)]({'ma_kh':_0x27340b[_0x2a9bc6(0x27c)],'id_app':_0x27340b['id_app'],'gia_ban_nt':{'$gt':0x0},'ma_ct':{'$in':model[_0x2a9bc6(0x23b)]}},{'ngay_ct':0x1})['sort']({'ngay_ct':-0x1})[_0x2a9bc6(0x282)]();if(!_0x2a8b16)await global[_0x2a9bc6(0x224)](_0x2bfbd0[_0x2a9bc6(0x264)])[_0x2a9bc6(0x28f)]({'ma_kh':_0x27340b[_0x2a9bc6(0x27c)],'id_app':_0x27340b['id_app'],'gia_ban_nt':{'$gt':0x0},'ma_ct':{'$in':model[_0x2a9bc6(0x23b)]}},{'ngay_ct':0x1})[_0x2a9bc6(0x1f3)]({'ngay_ct':-0x1})[_0x2a9bc6(0x282)]();_0x2a8b16&&(!_0x42416d[_0x2a9bc6(0x216)]||_0x2bfbd0[_0x2a9bc6(0x1f7)](new Date(_0x2a8b16[_0x2a9bc6(0x24f)])[_0x2a9bc6(0x1f0)](),new Date(_0x42416d[_0x2a9bc6(0x216)])[_0x2a9bc6(0x1f0)]()))&&(_0x2197ae=!![],_0x4f6a89=_0x2a8b16[_0x2a9bc6(0x24f)]);}}if(_0x2197ae){_0x4f6a89=_0x4f6a89||_0x42416d['ngay_mua_gan_nhat'],_0x53b04d=_0x53b04d||_0x42416d[_0x2a9bc6(0x21f)],_0x5c70a4=_0x5c70a4||_0x42416d['ngay_tuong_tac_gan_nhat'],await model[_0x2a9bc6(0x255)]({'_id':_0x5a7dfc},{'ngay_mua_gan_nhat':_0x4f6a89,'ngay_mua_dau_tien':_0x53b04d,'ngay_tuong_tac_gan_nhat':_0x5c70a4,'trang_thai':_0xf4dcd});let _0x329ecb=await model[_0x2a9bc6(0x27b)](_0x42416d['_id'])[_0x2a9bc6(0x282)]();redisCache[_0x2a9bc6(0x284)](_0x2a9bc6(0x1e8),_0x329ecb);}return{'ngay_mua_gan_nhat':_0x4f6a89,'ngay_mua_dau_tien':_0x53b04d,'ngay_tuong_tac_gan_nhat':_0x5c70a4};},module[_0x5200e1(0x252)]=model;
@@ -1,8 +1 @@
1
- const moment=require("moment"),databanleSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},id_ct:{type:String,required:!0,maxlength:1024},ma_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!0},so_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_nt:{type:String,default:"VND",required:!0,uppercase:!0,maxlength:32,trim:!0},ty_gia:{type:Number,
2
- default:1},ma_kho:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_kh:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},dien_giai:{type:String,default:"",maxlength:1024},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,default:"",uppercase:!0,maxlength:32,
3
- trim:!0},gio:Number,ngay:Number,thang:Number,quy:Number,nam:Number,ma_kenh:String,ma_td1:String,ma_td2:String,ma_td3:String,ma_td4:String,ma_td5:String,ma_td6:String,ma_td7:String,ma_td8:String,ma_td9:String,pt_thanh_toan:String,pt_thanh_toan2:String,cashier:String,ma_ca:{type:String,uppercase:!0,maxlength:32,trim:!0},trang_thai:{type:String,maxlength:32},id_reason:{type:String,maxlength:1024},exfields:Schema.Types.Mixed,exfields_detail:Schema.Types.Mixed,details:[Schema.Types.Mixed],details_tl:[Schema.Types.Mixed],
4
- ptthanhtoans:[Schema.Types.Mixed],status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}},{toJSON:{virtuals:!0}});
5
- (global.configs||{}).createIndexes&&(databanleSchema.index({id_app:1}),databanleSchema.index({ma_dvcs:1}),databanleSchema.index({ngay_ct:-1}),databanleSchema.index({so_ct:-1}),databanleSchema.index({so_ct:1,ngay_ct:1}),databanleSchema.index({ma_ct:1}),databanleSchema.index({ma_kho:1}),databanleSchema.index({ma_kh:1}),databanleSchema.index({ma_bp:1}),databanleSchema.index({ma_phi:1}),databanleSchema.index({ma_nv:1}),databanleSchema.index({ma_dt:1}),databanleSchema.index({id_ct:1}),databanleSchema.index({id_cs:1}),
6
- databanleSchema.index({cashier:1}),databanleSchema.index({gio:1}),databanleSchema.index({ngay:1}),databanleSchema.index({thang:1}),databanleSchema.index({quy:1}),databanleSchema.index({nam:-1}),databanleSchema.index({ma_kenh:1}),databanleSchema.index({ma_td1:1}),databanleSchema.index({ma_td2:1}),databanleSchema.index({ma_td3:1}),databanleSchema.index({ma_td4:1}),databanleSchema.index({ma_td5:1}),databanleSchema.index({ma_td6:1}),databanleSchema.index({ma_td7:1}),databanleSchema.index({ma_td8:1}),
7
- databanleSchema.index({ma_td9:1}),databanleSchema.index({pt_thanh_toan:1}),databanleSchema.index({pt_thanh_toan2:1}),databanleSchema.index({id_app:1,id_ct:1,so_ct:-1,ngay_ct:-1,ma_kho:1}),databanleSchema.index({dien_giai:"text"}),databanleSchema.index({status:1}),databanleSchema.index({user_created:1,visible_to:1,visible_to_users:1}),databanleSchema.index({trang_thai:1}));
8
- databanleSchema.pre("save",function($next$$){let $ngay_ct$$=moment(this.ngay_ct);this.gio=$ngay_ct$$.get("hours");this.ngay=$ngay_ct$$.get("dates");this.quy=$ngay_ct$$.get("quarters");this.thang=$ngay_ct$$.get("months")+1;this.nam=$ngay_ct$$.get("year");$next$$()});const model=mongoose.models.databanle||mongoose.model("databanle",databanleSchema);module.exports=model;
1
+ const _0x553408=_0x5117;(function(_0x173cec,_0x52129a){const _0x3bd6cf=_0x5117,_0x577829=_0x173cec();while(!![]){try{const _0xcb67ea=parseInt(_0x3bd6cf(0x149))/0x1*(-parseInt(_0x3bd6cf(0x13b))/0x2)+-parseInt(_0x3bd6cf(0x12e))/0x3+parseInt(_0x3bd6cf(0x13a))/0x4+-parseInt(_0x3bd6cf(0x13d))/0x5+parseInt(_0x3bd6cf(0x135))/0x6+parseInt(_0x3bd6cf(0x134))/0x7+parseInt(_0x3bd6cf(0x128))/0x8*(-parseInt(_0x3bd6cf(0x139))/0x9);if(_0xcb67ea===_0x52129a)break;else _0x577829['push'](_0x577829['shift']());}catch(_0x30dbff){_0x577829['push'](_0x577829['shift']());}}}(_0x4e98,0x87e27));function _0x4e98(){const _0x507bfa=['mtyWrur4zKXf','y3jLyxrLsw5KzxHLCW','z2v0','zxHWB3j0CW','A0Dbzue','BMfT','Ahrqvvu','mty4mdC5mK9cCgLkzq','zgf0ywjHBMXL','Aw5KzxG','twL4zwq','AgjXv0O','uwPosfC','nZy2mJqYDunlCLfw','Bw9Tzw50','mJH8nxWXmxWZnNWWFdmZFdiZFdr8mJD8nNWYnNWYmhW3FdiYFdiXFdH8mJv8mtv8mtj8mtr8mZf8mJL8mZb8mtL8mtb8mZr8mtz8oxWXm3WZnxWXn3WZFdf8mJr8mNWXohWZmG','Dg9tDhjPBMC','BM93','vLDgBKC','mtG5nZm2nevQC2zqtq','ntyWmtC2mLLNEvf1DW','CxvHCNrLCNm','Ag91CNm','wKj4Bhy','mJDVAwPgy2q','nde4mdmWmgPls1jIEG','odiYnLPOu2PcAq','z2LV','nZq2otaWA09zDLbR','yxbWBhK','Bw9UDgHZ','B05KAwu','Cgrkru4','vhLWzxm','C2vHCMnO','Dgv4Da','BMDHEq','zuvKs3a','tfLRseK','Cxv5'];_0x4e98=function(){return _0x507bfa;};return _0x4e98();}const _0x2bc0f1=(function(){const _0x3a8902=_0x5117,_0x51a818={'kGAeA':_0x3a8902(0x144),'htPUU':function(_0x569e6c,_0x56caa3){return _0x569e6c!==_0x56caa3;},'oNdie':_0x3a8902(0x138)};let _0x25be38=!![];return function(_0x3c3684,_0x2f1e9a){const _0xfd4287=_0x3a8902;if(_0x51a818[_0xfd4287(0x14f)](_0x51a818[_0xfd4287(0x140)],_0x51a818['oNdie']))_0x31d522['index']({'id_app':0x1}),_0x535e0c[_0xfd4287(0x12a)]({'ma_dvcs':0x1}),_0x301aa6[_0xfd4287(0x12a)]({'ngay_ct':-0x1}),_0x137059[_0xfd4287(0x12a)]({'so_ct':-0x1}),_0x1ad5bb['index']({'so_ct':0x1,'ngay_ct':0x1}),_0x58b1d2[_0xfd4287(0x12a)]({'ma_ct':0x1}),_0x37ce8e['index']({'ma_kho':0x1}),_0x5c0862[_0xfd4287(0x12a)]({'ma_kh':0x1}),_0x40da1a[_0xfd4287(0x12a)]({'ma_bp':0x1}),_0x21e278[_0xfd4287(0x12a)]({'ma_phi':0x1}),_0x500292[_0xfd4287(0x12a)]({'ma_nv':0x1}),_0x507b26[_0xfd4287(0x12a)]({'ma_dt':0x1}),_0x527c18[_0xfd4287(0x12a)]({'id_ct':0x1}),_0x3f31c1[_0xfd4287(0x12a)]({'id_cs':0x1}),_0x33de05[_0xfd4287(0x12a)]({'cashier':0x1}),_0x93a4b6['index']({'gio':0x1}),_0x5f37da[_0xfd4287(0x12a)]({'ngay':0x1}),_0x443986[_0xfd4287(0x12a)]({'thang':0x1}),_0x5b4d13[_0xfd4287(0x12a)]({'quy':0x1}),_0x4e3f31[_0xfd4287(0x12a)]({'nam':-0x1}),_0x43a0df[_0xfd4287(0x12a)]({'ma_kenh':0x1}),_0x1bce87['index']({'ma_td1':0x1}),_0x35b8c7[_0xfd4287(0x12a)]({'ma_td2':0x1}),_0x2aabff['index']({'ma_td3':0x1}),_0x16ff11[_0xfd4287(0x12a)]({'ma_td4':0x1}),_0x5344c0['index']({'ma_td5':0x1}),_0x3eaae4['index']({'ma_td6':0x1}),_0x48be58['index']({'ma_td7':0x1}),_0x3ffb01[_0xfd4287(0x12a)]({'ma_td8':0x1}),_0x54cd1b[_0xfd4287(0x12a)]({'ma_td9':0x1}),_0x352e68[_0xfd4287(0x12a)]({'pt_thanh_toan':0x1}),_0x47fd43[_0xfd4287(0x12a)]({'pt_thanh_toan2':0x1}),_0x1e2fde[_0xfd4287(0x12a)]({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ngay_ct':-0x1,'ma_kho':0x1}),_0x2a6a69[_0xfd4287(0x12a)]({'dien_giai':_0x51a818[_0xfd4287(0x14d)]}),_0x1530f2['index']({'status':0x1}),_0x42b776['index']({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}),_0x356813[_0xfd4287(0x12a)]({'trang_thai':0x1});else{const _0x5632cf=_0x25be38?function(){const _0x4d031b=_0xfd4287;if(_0x2f1e9a){const _0x21b51c=_0x2f1e9a[_0x4d031b(0x13e)](_0x3c3684,arguments);return _0x2f1e9a=null,_0x21b51c;}}:function(){};return _0x25be38=![],_0x5632cf;}};}()),_0x3d4908=_0x2bc0f1(this,function(){const _0x272d39=_0x5117,_0x9ff9a1={'LYkHI':'(((.+)+)+)+$'};return _0x3d4908[_0x272d39(0x131)]()[_0x272d39(0x143)](_0x9ff9a1[_0x272d39(0x147)])[_0x272d39(0x131)]()['constructor'](_0x3d4908)['search'](_0x9ff9a1[_0x272d39(0x147)]);});_0x3d4908();const moment=require(_0x553408(0x12f)),databanleSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'id_ct':{'type':String,'required':!![],'maxlength':0x400},'ma_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':!![]},'so_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nt':{'type':String,'default':'VND','required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'ma_kho':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'dien_giai':{'type':String,'default':'','maxlength':0x400},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'gio':Number,'ngay':Number,'thang':Number,'quy':Number,'nam':Number,'ma_kenh':String,'ma_td1':String,'ma_td2':String,'ma_td3':String,'ma_td4':String,'ma_td5':String,'ma_td6':String,'ma_td7':String,'ma_td8':String,'ma_td9':String,'pt_thanh_toan':String,'pt_thanh_toan2':String,'cashier':String,'ma_ca':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'trang_thai':{'type':String,'maxlength':0x20},'id_reason':{'type':String,'maxlength':0x400},'exfields':Schema['Types']['Mixed'],'exfields_detail':Schema['Types'][_0x553408(0x12b)],'details':[Schema[_0x553408(0x142)]['Mixed']],'details_tl':[Schema['Types']['Mixed']],'ptthanhtoans':[Schema[_0x553408(0x142)]['Mixed']],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x553408(0x132)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''}},{'toJSON':{'virtuals':!![]}});if((global['configs']||{})[_0x553408(0x14a)]){const aytvDQ=_0x553408(0x130)['split']('|');let AxOuHV=0x0;while(!![]){switch(aytvDQ[AxOuHV++]){case'0':databanleSchema[_0x553408(0x12a)]({'so_ct':0x1,'ngay_ct':0x1});continue;case'1':databanleSchema[_0x553408(0x12a)]({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ngay_ct':-0x1,'ma_kho':0x1});continue;case'2':databanleSchema['index']({'status':0x1});continue;case'3':databanleSchema['index']({'pt_thanh_toan2':0x1});continue;case'4':databanleSchema[_0x553408(0x12a)]({'ma_kh':0x1});continue;case'5':databanleSchema[_0x553408(0x12a)]({'ma_dvcs':0x1});continue;case'6':databanleSchema[_0x553408(0x12a)]({'ma_phi':0x1});continue;case'7':databanleSchema[_0x553408(0x12a)]({'id_ct':0x1});continue;case'8':databanleSchema['index']({'gio':0x1});continue;case'9':databanleSchema[_0x553408(0x12a)]({'ma_td7':0x1});continue;case'10':databanleSchema[_0x553408(0x12a)]({'ma_td4':0x1});continue;case'11':databanleSchema[_0x553408(0x12a)]({'ngay_ct':-0x1});continue;case'12':databanleSchema[_0x553408(0x12a)]({'quy':0x1});continue;case'13':databanleSchema[_0x553408(0x12a)]({'ma_td8':0x1});continue;case'14':databanleSchema[_0x553408(0x12a)]({'nam':-0x1});continue;case'15':databanleSchema[_0x553408(0x12a)]({'thang':0x1});continue;case'16':databanleSchema[_0x553408(0x12a)]({'ma_td6':0x1});continue;case'17':databanleSchema['index']({'pt_thanh_toan':0x1});continue;case'18':databanleSchema[_0x553408(0x12a)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1});continue;case'19':databanleSchema[_0x553408(0x12a)]({'ma_td3':0x1});continue;case'20':databanleSchema[_0x553408(0x12a)]({'ma_dt':0x1});continue;case'21':databanleSchema[_0x553408(0x12a)]({'cashier':0x1});continue;case'22':databanleSchema[_0x553408(0x12a)]({'id_cs':0x1});continue;case'23':databanleSchema['index']({'ma_kho':0x1});continue;case'24':databanleSchema['index']({'dien_giai':_0x553408(0x144)});continue;case'25':databanleSchema[_0x553408(0x12a)]({'ngay':0x1});continue;case'26':databanleSchema[_0x553408(0x12a)]({'ma_nv':0x1});continue;case'27':databanleSchema[_0x553408(0x12a)]({'ma_bp':0x1});continue;case'28':databanleSchema[_0x553408(0x12a)]({'id_app':0x1});continue;case'29':databanleSchema[_0x553408(0x12a)]({'ma_td1':0x1});continue;case'30':databanleSchema['index']({'ma_td2':0x1});continue;case'31':databanleSchema['index']({'ma_kenh':0x1});continue;case'32':databanleSchema['index']({'trang_thai':0x1});continue;case'33':databanleSchema[_0x553408(0x12a)]({'ma_ct':0x1});continue;case'34':databanleSchema[_0x553408(0x12a)]({'ma_td5':0x1});continue;case'35':databanleSchema[_0x553408(0x12a)]({'ma_td9':0x1});continue;case'36':databanleSchema[_0x553408(0x12a)]({'so_ct':-0x1});continue;}break;}}databanleSchema['pre']('save',function(_0x25c412){const _0x3d6391=_0x553408,_0x223a1d={'VWFnG':function(_0x317ffb,_0x510afa){return _0x317ffb(_0x510afa);},'QjNHW':_0x3d6391(0x137),'hbqWJ':'dates','eEdKp':_0x3d6391(0x136),'pdJEN':function(_0x21947c,_0x2a64b2){return _0x21947c+_0x2a64b2;},'CWild':'year','huBUR':function(_0x58e06f){return _0x58e06f();}},_0x1eddcc=this;let _0x57af00=_0x223a1d[_0x3d6391(0x133)](moment,_0x1eddcc['ngay_ct']);_0x1eddcc[_0x3d6391(0x13c)]=_0x57af00[_0x3d6391(0x14b)](_0x223a1d[_0x3d6391(0x12d)]),_0x1eddcc[_0x3d6391(0x145)]=_0x57af00[_0x3d6391(0x14b)](_0x223a1d[_0x3d6391(0x12c)]),_0x1eddcc[_0x3d6391(0x148)]=_0x57af00[_0x3d6391(0x14b)](_0x223a1d[_0x3d6391(0x146)]),_0x1eddcc['thang']=_0x223a1d[_0x3d6391(0x141)](_0x57af00[_0x3d6391(0x14b)](_0x3d6391(0x13f)),0x1),_0x1eddcc[_0x3d6391(0x14e)]=_0x57af00[_0x3d6391(0x14b)](_0x223a1d['CWild']),_0x223a1d['huBUR'](_0x25c412);});function _0x5117(_0x292047,_0x4e4bc0){const _0x5d391a=_0x4e98();return _0x5117=function(_0x3d4908,_0x2bc0f1){_0x3d4908=_0x3d4908-0x128;let _0x4e98eb=_0x5d391a[_0x3d4908];if(_0x5117['HUMsWl']===undefined){var _0x5117db=function(_0x1efac6){const _0x4171c5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a7779='',_0x4bbed1='',_0x46fb2b=_0x2a7779+_0x5117db;for(let _0x503bd3=0x0,_0x26f977,_0x4084e8,_0x5cdd18=0x0;_0x4084e8=_0x1efac6['charAt'](_0x5cdd18++);~_0x4084e8&&(_0x26f977=_0x503bd3%0x4?_0x26f977*0x40+_0x4084e8:_0x4084e8,_0x503bd3++%0x4)?_0x2a7779+=_0x46fb2b['charCodeAt'](_0x5cdd18+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x26f977>>(-0x2*_0x503bd3&0x6)):_0x503bd3:0x0){_0x4084e8=_0x4171c5['indexOf'](_0x4084e8);}for(let _0x54c801=0x0,_0x2190f2=_0x2a7779['length'];_0x54c801<_0x2190f2;_0x54c801++){_0x4bbed1+='%'+('00'+_0x2a7779['charCodeAt'](_0x54c801)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4bbed1);};_0x5117['wernwe']=_0x5117db,_0x292047=arguments,_0x5117['HUMsWl']=!![];}const _0x3e8d22=_0x5d391a[0x0],_0x2d8be4=_0x3d4908+_0x3e8d22,_0x8a8af2=_0x292047[_0x2d8be4];if(!_0x8a8af2){const _0x4ed8aa=function(_0x3712e3){this['dYfHSC']=_0x3712e3,this['KBMosl']=[0x1,0x0,0x0],this['WKCjBd']=function(){return'newState';},this['IqYFrJ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['sWdkWp']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4ed8aa['prototype']['AWPmtF']=function(){const _0x37d498=new RegExp(this['IqYFrJ']+this['sWdkWp']),_0x350f3d=_0x37d498['test'](this['WKCjBd']['toString']())?--this['KBMosl'][0x1]:--this['KBMosl'][0x0];return this['GprRXS'](_0x350f3d);},_0x4ed8aa['prototype']['GprRXS']=function(_0x4b4f50){if(!Boolean(~_0x4b4f50))return _0x4b4f50;return this['mGOSVc'](this['dYfHSC']);},_0x4ed8aa['prototype']['mGOSVc']=function(_0x5bc2c5){for(let _0x57e6bf=0x0,_0x1ab585=this['KBMosl']['length'];_0x57e6bf<_0x1ab585;_0x57e6bf++){this['KBMosl']['push'](Math['round'](Math['random']())),_0x1ab585=this['KBMosl']['length'];}return _0x5bc2c5(this['KBMosl'][0x0]);},new _0x4ed8aa(_0x5117)['AWPmtF'](),_0x4e98eb=_0x5117['wernwe'](_0x4e98eb),_0x292047[_0x2d8be4]=_0x4e98eb;}else _0x4e98eb=_0x8a8af2;return _0x4e98eb;},_0x5117(_0x292047,_0x4e4bc0);}const model=mongoose['models']['databanle']||mongoose['model'](_0x553408(0x129),databanleSchema);module[_0x553408(0x14c)]=model;