flexbiz-server 12.4.21 → 12.4.23
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.
- package/package.json +2 -1
- package/server/app.js +1 -22
- package/server/auths/bearer.js +1 -3
- package/server/auths/facebook.js +1 -12
- package/server/auths/google.js +1 -13
- package/server/auths/local.js +1 -64
- package/server/cluster.js +1 -27
- package/server/controllers/controller.js +1 -107
- package/server/controllers/controllerRPT.js +1 -27
- package/server/controllers/controllerUtils.js +1 -76
- package/server/controllers/createHandler.js +1 -35
- package/server/controllers/createRouteHandler.js +1 -4
- package/server/controllers/deleteHandler.js +1 -11
- package/server/controllers/deleteManyHandler.js +1 -2
- package/server/controllers/exportHandler.js +1 -17
- package/server/controllers/findHandler.js +1 -53
- package/server/controllers/handlers.js +1 -3
- package/server/controllers/historyHandler.js +1 -5
- package/server/controllers/importFromExcelHandler.js +1 -14
- package/server/controllers/importFromGsHandler.js +1 -10
- package/server/controllers/importFromJsonHandler.js +1 -7
- package/server/controllers/importHandler.js +1 -21
- package/server/controllers/logHandler.js +1 -5
- package/server/controllers/rptCreateRouteHandler.js +1 -4
- package/server/controllers/rptExcelHandler.js +1 -32
- package/server/controllers/rptHandler.js +1 -13
- package/server/controllers/updateBookHandler.js +1 -10
- package/server/controllers/updateFieldHandler.js +1 -12
- package/server/controllers/updateHandler.js +1 -39
- package/server/controllers/updateKeyHandler.js +1 -14
- package/server/controllers/viewHandler.js +1 -13
- package/server/flow/FlowEngine.js +1 -64
- package/server/flow/WebhookManager.js +1 -26
- package/server/flow/handlers.js +1 -3
- package/server/flow/nodes/aiAnalysis.js +1 -9
- package/server/flow/nodes/customer.js +1 -15
- package/server/flow/nodes/data.js +1 -14
- package/server/flow/nodes/debug.js +1 -2
- package/server/flow/nodes/delay.js +1 -3
- package/server/flow/nodes/email.js +1 -9
- package/server/flow/nodes/event.js +1 -11
- package/server/flow/nodes/facebook.js +1 -3
- package/server/flow/nodes/facebookConversations.js +1 -5
- package/server/flow/nodes/facebookCreatePost.js +1 -10
- package/server/flow/nodes/facebookSendMessage.js +1 -12
- package/server/flow/nodes/forEachItem.js +1 -8
- package/server/flow/nodes/function.js +1 -4
- package/server/flow/nodes/httprequest.js +1 -7
- package/server/flow/nodes/inject.js +1 -12
- package/server/flow/nodes/pushNotification.js +1 -5
- package/server/flow/nodes/report.js +1 -6
- package/server/flow/nodes/saveData.js +1 -2
- package/server/flow/nodes/switch.js +1 -20
- package/server/flow/nodes/webhook.js +1 -1
- package/server/flow/nodes/zaloSendMessage.js +1 -4
- package/server/flow/utils.js +1 -2
- package/server/global.js +1 -23
- package/server/libs/BlockchainTransactionPool.js +1 -3
- package/server/libs/WorkerPool.js +1 -4
- package/server/libs/WorkerStaticPool.js +1 -16
- package/server/libs/WorkerStaticPool_v1.js +1 -5
- package/server/libs/assbonus.js +1 -7
- package/server/libs/backup.js +1 -2
- package/server/libs/blockchainconnect.js +1 -12
- package/server/libs/cdpsdiem.js +1 -5
- package/server/libs/cdpsdt.js +1 -7
- package/server/libs/cdpskh.js +1 -9
- package/server/libs/cdpsnphep.js +1 -6
- package/server/libs/cdpstk.js +1 -11
- package/server/libs/ckcn.js +1 -12
- package/server/libs/ckdiem.js +1 -5
- package/server/libs/ckdt.js +1 -6
- package/server/libs/cknphep.js +1 -6
- package/server/libs/cktk.js +1 -4
- package/server/libs/cktt.js +1 -9
- package/server/libs/ckvt.js +1 -12
- package/server/libs/ckvtcapphat.js +1 -6
- package/server/libs/ckvtnpp.js +1 -8
- package/server/libs/ckvttt.js +1 -11
- package/server/libs/createSocaitheongay.js +1 -9
- package/server/libs/ctdiem.js +1 -5
- package/server/libs/ctvt.js +1 -7
- package/server/libs/ctvtnpp.js +1 -7
- package/server/libs/ctvttt.js +1 -7
- package/server/libs/databanle.js +1 -17
- package/server/libs/databanlenpp.js +1 -8
- package/server/libs/databanletheongay.js +1 -27
- package/server/libs/dkcn.js +1 -10
- package/server/libs/dkdiem.js +1 -5
- package/server/libs/dkdt.js +1 -6
- package/server/libs/dknphep.js +1 -7
- package/server/libs/dktk.js +1 -4
- package/server/libs/dktt.js +1 -8
- package/server/libs/dkvt.js +1 -9
- package/server/libs/dkvtnpp.js +1 -7
- package/server/libs/dkvttt.js +1 -7
- package/server/libs/dncn.js +1 -6
- package/server/libs/dntk.js +1 -4
- package/server/libs/dntt.js +1 -6
- package/server/libs/docs.js +1 -452
- package/server/libs/dstkcn.js +1 -1
- package/server/libs/dstktt.js +1 -1
- package/server/libs/dtbanletheonpp.js +1 -17
- package/server/libs/dtbanletheosp.js +1 -15
- package/server/libs/dtbanletheospnpp.js +1 -15
- package/server/libs/email.js +1 -3
- package/server/libs/excel.js +1 -2
- package/server/libs/getGiaban.js +1 -67
- package/server/libs/getGiabanAsync.js +1 -1
- package/server/libs/getNotifies.js +1 -1
- package/server/libs/htmlReport.js +1 -9
- package/server/libs/initDatabase.js +1 -9
- package/server/libs/invoiceEasy.js +1 -109
- package/server/libs/invoiceViettel.js +1 -29
- package/server/libs/invoiceVnpt.js +1 -22
- package/server/libs/kpistatus.js +1 -32
- package/server/libs/load-template.js +1 -3
- package/server/libs/mailmanagement.js +1 -13
- package/server/libs/mongooseDeletePost.js +1 -6
- package/server/libs/mongooseLeanId.js +1 -1
- package/server/libs/mongoosePatch.js +1 -8
- package/server/libs/onepay-payment.js +1 -4
- package/server/libs/optimizeBookkeeping.js +1 -14
- package/server/libs/parse-template.js +1 -5
- package/server/libs/permission.js +1 -51
- package/server/libs/phanbokh.js +1 -3
- package/server/libs/post-book.js +1 -23
- package/server/libs/post-socai.js +1 -25
- package/server/libs/post-sokho.js +1 -27
- package/server/libs/prototypes.js +1 -29
- package/server/libs/psdt.js +1 -1
- package/server/libs/pskh.js +1 -1
- package/server/libs/pstk.js +1 -1
- package/server/libs/redis-cache.js +1 -17
- package/server/libs/restore.js +1 -1
- package/server/libs/schedule.js +1 -18
- package/server/libs/sessionContext.js +2 -14
- package/server/libs/textReport.js +1 -3
- package/server/libs/thnxt.js +1 -9
- package/server/libs/thnxtnpp.js +1 -9
- package/server/libs/thnxttt.js +1 -8
- package/server/libs/tinhGt.js +1 -7
- package/server/libs/tinhGtCapnhatPNK.js +1 -7
- package/server/libs/tinhGtPhanboHeSo.js +1 -12
- package/server/libs/tinhGtPhanboSltp.js +1 -10
- package/server/libs/tinhGtPhanboYtcp.js +1 -11
- package/server/libs/tinhGtSltk.js +1 -9
- package/server/libs/tinhGtThcppstk.js +1 -10
- package/server/libs/tinhGtTrucTiep.js +1 -7
- package/server/libs/tinhGtXoa.js +1 -3
- package/server/libs/tinhgiatb.js +1 -38
- package/server/libs/tinhgiatb1vt.js +1 -5
- package/server/libs/tinhhoahong.js +1 -64
- package/server/libs/tinhhoahongnpp.js +1 -46
- package/server/libs/tinhkhauhao1ts.js +1 -12
- package/server/libs/tinhkhauhaots.js +1 -8
- package/server/libs/tuoinophaithu.js +1 -10
- package/server/libs/tuoinophaitra.js +1 -11
- package/server/libs/utils.js +1 -78
- package/server/libs/validate.js +1 -4
- package/server/libs/validator-acc-cust.js +1 -1
- package/server/libs/validator-account.js +1 -4
- package/server/libs/validator-vt.js +1 -2
- package/server/libs/validator.js +1 -11
- package/server/libs/vsocai.js +1 -8
- package/server/models/account.js +1 -7
- package/server/models/afflink.js +1 -2
- package/server/models/app.js +1 -15
- package/server/models/approve.js +1 -93
- package/server/models/assabcihandler.js +1 -35
- package/server/models/assbank.js +1 -19
- package/server/models/assbooking.js +1 -4
- package/server/models/assbuy.js +1 -3
- package/server/models/asscashwithdraw.js +1 -4
- package/server/models/assfindhash.js +1 -2
- package/server/models/assinvestment.js +1 -13
- package/server/models/assissue.js +1 -2
- package/server/models/asskey.js +1 -15
- package/server/models/assneedtobuy.js +1 -6
- package/server/models/assperiod.js +1 -7
- package/server/models/assproduct.js +1 -13
- package/server/models/assprofitsharing.js +1 -4
- package/server/models/assreceiver.js +1 -2
- package/server/models/assrequest.js +1 -11
- package/server/models/asssell.js +1 -7
- package/server/models/asstransaction.js +1 -3
- package/server/models/asstransfer.js +1 -4
- package/server/models/assuser_identity.js +1 -4
- package/server/models/asswithdraw.js +1 -4
- package/server/models/attend.js +1 -2
- package/server/models/banggiaban.js +1 -8
- package/server/models/bangtinhluong.js +1 -6
- package/server/models/base.js +1 -1
- package/server/models/bds_area.js +1 -4
- package/server/models/bds_block.js +1 -3
- package/server/models/bds_building.js +1 -4
- package/server/models/bds_floor.js +1 -3
- package/server/models/bds_floordetail.js +1 -9
- package/server/models/bds_nhadat.js +1 -11
- package/server/models/bds_nhomnhadat.js +1 -4
- package/server/models/bds_phanloainhadat.js +1 -3
- package/server/models/bg1.js +1 -9
- package/server/models/bg2.js +1 -10
- package/server/models/cache.js +1 -3
- package/server/models/calllog.js +1 -4
- package/server/models/campaign.js +1 -6
- package/server/models/cart.js +1 -5
- package/server/models/cddiem.js +1 -2
- package/server/models/cddt.js +1 -3
- package/server/models/cdkh.js +1 -5
- package/server/models/cdkhtheongay.js +1 -5
- package/server/models/cdnphep.js +1 -2
- package/server/models/cdtk.js +1 -3
- package/server/models/cdtktheongay.js +1 -3
- package/server/models/cdvt.js +1 -5
- package/server/models/cdvtnpp.js +1 -6
- package/server/models/cdvttheongay.js +1 -5
- package/server/models/chamcong.js +1 -7
- package/server/models/checkin.js +1 -4
- package/server/models/checkinactivity.js +1 -3
- package/server/models/checkinkpi.js +1 -4
- package/server/models/checkinlocation.js +1 -2
- package/server/models/chitieukpi.js +1 -3
- package/server/models/chudethaoluan.js +1 -3
- package/server/models/ckgtluong.js +1 -2
- package/server/models/colleague.js +1 -2
- package/server/models/comment.js +1 -4
- package/server/models/congdoansx.js +1 -4
- package/server/models/congtacvien.js +1 -4
- package/server/models/congthuctinhgiaban.js +1 -8
- package/server/models/consultant.js +1 -4
- package/server/models/contract.js +1 -6
- package/server/models/counter.js +1 -2
- package/server/models/ctds.js +1 -5
- package/server/models/ctds2.js +1 -6
- package/server/models/currency.js +1 -3
- package/server/models/customer.js +1 -31
- package/server/models/databanle.js +1 -8
- package/server/models/datlich.js +1 -4
- package/server/models/department.js +1 -4
- package/server/models/dh2.js +1 -20
- package/server/models/diagram.js +1 -2
- package/server/models/dinhmucsx.js +1 -8
- package/server/models/dkhoc.js +1 -6
- package/server/models/dknphep.js +1 -2
- package/server/models/dmban.js +1 -4
- package/server/models/dmbp.js +1 -12
- package/server/models/dmca.js +1 -2
- package/server/models/dmchietkhau.js +1 -9
- package/server/models/dmchietkhauhd.js +1 -20
- package/server/models/dmcpmh.js +1 -2
- package/server/models/dmdiemthuong.js +1 -5
- package/server/models/dmdoi.js +1 -4
- package/server/models/dmdoituongdanhgia.js +1 -2
- package/server/models/dmdt.js +1 -8
- package/server/models/dmdvt.js +1 -3
- package/server/models/dmgiaban.js +1 -9
- package/server/models/dmgiamua.js +1 -5
- package/server/models/dmgiathitruong.js +1 -5
- package/server/models/dmgiathitruong_ngay.js +1 -2
- package/server/models/dmgiathitruong_theodoi.js +1 -2
- package/server/models/dmhoahonghd.js +1 -9
- package/server/models/dmhoahongnpp.js +1 -9
- package/server/models/dmkc.js +1 -3
- package/server/models/dmkho.js +1 -6
- package/server/models/dmkhuyenmai.js +1 -9
- package/server/models/dmkhuyenmaihd.js +1 -11
- package/server/models/dmletet.js +1 -2
- package/server/models/dmlo.js +1 -4
- package/server/models/dmloaicong.js +1 -4
- package/server/models/dmloaitask.js +1 -2
- package/server/models/dmloaits.js +1 -2
- package/server/models/dmnckkm.js +1 -4
- package/server/models/dmnghiepvu.js +1 -4
- package/server/models/dmnguonvon.js +1 -2
- package/server/models/dmnhnv.js +1 -4
- package/server/models/dmnv.js +1 -17
- package/server/models/dmnvt.js +1 -9
- package/server/models/dmphatdichvu.js +1 -5
- package/server/models/dmphi.js +1 -3
- package/server/models/dmqct.js +1 -3
- package/server/models/dmqddvt.js +1 -3
- package/server/models/dmtanggiamts.js +1 -3
- package/server/models/dmto.js +1 -4
- package/server/models/dmtt.js +1 -6
- package/server/models/dmvt.js +1 -17
- package/server/models/dmyt.js +1 -4
- package/server/models/dn0.js +1 -13
- package/server/models/dnm.js +1 -11
- package/server/models/dokho.js +1 -2
- package/server/models/domain.js +1 -2
- package/server/models/dvcs.js +1 -3
- package/server/models/ecomcategories.js +1 -3
- package/server/models/ecomcategories_cty.js +1 -3
- package/server/models/ecomproductlines.js +1 -2
- package/server/models/ecompromotion_flashsales.js +1 -2
- package/server/models/ecompromotion_freeships.js +1 -2
- package/server/models/email.js +1 -2
- package/server/models/endpoint.js +1 -1
- package/server/models/events.js +1 -3
- package/server/models/evoucher.js +1 -5
- package/server/models/experiencejourney.js +1 -2
- package/server/models/experiencejourneydata.js +1 -4
- package/server/models/experiencejourneypersona.js +1 -3
- package/server/models/experiencejourneystage.js +1 -2
- package/server/models/exportexceltemplate.js +1 -2
- package/server/models/fbconversation.js +1 -15
- package/server/models/fbmessage.js +1 -2
- package/server/models/fbpage.js +1 -2
- package/server/models/fbpost.js +1 -2
- package/server/models/fieldright.js +1 -2
- package/server/models/file.js +1 -4
- package/server/models/financialroadmap.js +1 -3
- package/server/models/flow.js +1 -2
- package/server/models/flowdata.js +1 -3
- package/server/models/folder.js +1 -4
- package/server/models/follow.js +1 -2
- package/server/models/form.js +1 -3
- package/server/models/forminfo.js +1 -5
- package/server/models/formvalue.js +1 -3
- package/server/models/giaoca.js +1 -4
- package/server/models/giatb.js +1 -3
- package/server/models/group.js +1 -11
- package/server/models/gt_ctgt.js +1 -4
- package/server/models/gt_hspb.js +1 -3
- package/server/models/gt_sltk.js +1 -3
- package/server/models/gt_thcppstk.js +1 -3
- package/server/models/hanmucton.js +1 -4
- package/server/models/hd1.js +1 -11
- package/server/models/hd2.js +1 -27
- package/server/models/hd3.js +1 -18
- package/server/models/hd4.js +1 -13
- package/server/models/hd7.js +1 -17
- package/server/models/hd8.js +1 -12
- package/server/models/hde.js +1 -11
- package/server/models/hlink.js +1 -2
- package/server/models/hlinkvalue.js +1 -2
- package/server/models/hmcn.js +1 -3
- package/server/models/hmcnct.js +1 -2
- package/server/models/hspbts.js +1 -4
- package/server/models/htl.js +1 -13
- package/server/models/importexceltemplate.js +1 -2
- package/server/models/introducebonus.js +1 -4
- package/server/models/introducecode.js +1 -3
- package/server/models/introducer.js +1 -4
- package/server/models/kbbtpb.js +1 -7
- package/server/models/kbmPttct.js +1 -4
- package/server/models/kbmTkgtgt.js +1 -5
- package/server/models/kbm_bcdkt.js +1 -4
- package/server/models/kbm_kqhdkd.js +1 -3
- package/server/models/kbm_lcttgt.js +1 -5
- package/server/models/kbm_lctttt.js +1 -4
- package/server/models/kbm_pttct.js +1 -4
- package/server/models/kbm_tkgtgt.js +1 -5
- package/server/models/kbmbcdkt.js +1 -4
- package/server/models/kbmbcqt.js +1 -4
- package/server/models/kbmkqhdkd.js +1 -3
- package/server/models/kbmlcttgt.js +1 -6
- package/server/models/kbmlctttt.js +1 -4
- package/server/models/kbmtmbctc.js +1 -4
- package/server/models/kehoachdtcp.js +1 -3
- package/server/models/kehoachmh.js +1 -8
- package/server/models/keyresult.js +1 -7
- package/server/models/khunghangthanhvien.js +1 -3
- package/server/models/label.js +1 -2
- package/server/models/labelinfo.js +1 -2
- package/server/models/lenhcapphat.js +1 -8
- package/server/models/lenhsx.js +1 -8
- package/server/models/lienhe.js +1 -4
- package/server/models/like_module.js +1 -2
- package/server/models/link.js +1 -2
- package/server/models/loaidiem.js +1 -2
- package/server/models/lock.js +1 -2
- package/server/models/log.js +1 -5
- package/server/models/mailaccount.js +1 -3
- package/server/models/mailgroup.js +1 -3
- package/server/models/mailreceived.js +1 -2
- package/server/models/mailschedule.js +1 -2
- package/server/models/mailsent.js +1 -2
- package/server/models/mailtemplate.js +1 -2
- package/server/models/maudanhgia.js +1 -2
- package/server/models/menuinfo.js +1 -2
- package/server/models/message.js +1 -8
- package/server/models/message2.js +1 -4
- package/server/models/message2setting.js +1 -3
- package/server/models/moduleinfo.js +1 -4
- package/server/models/momo.js +1 -17
- package/server/models/news.js +1 -3
- package/server/models/newsfeed.js +1 -4
- package/server/models/note.js +1 -2
- package/server/models/notification.js +1 -7
- package/server/models/okr.js +1 -4
- package/server/models/okrdiagram.js +1 -3
- package/server/models/onepay.js +1 -24
- package/server/models/opportunity.js +1 -4
- package/server/models/options.js +1 -2
- package/server/models/originimportid.js +1 -1
- package/server/models/otp.js +1 -1
- package/server/models/parameter.js +1 -2
- package/server/models/participant.js +1 -20
- package/server/models/partner.js +1 -1
- package/server/models/payload.js +1 -1
- package/server/models/pbl.js +1 -16
- package/server/models/pc0.js +1 -13
- package/server/models/pc1.js +1 -14
- package/server/models/pc2.js +1 -13
- package/server/models/pc3.js +1 -13
- package/server/models/pc5.js +1 -8
- package/server/models/pc6.js +1 -14
- package/server/models/pcl.js +1 -6
- package/server/models/pdn.js +1 -9
- package/server/models/pdx.js +1 -9
- package/server/models/pgh.js +1 -5
- package/server/models/phieudanhgia.js +1 -3
- package/server/models/pht.js +1 -8
- package/server/models/phucap.js +1 -4
- package/server/models/pkc.js +1 -6
- package/server/models/pkh.js +1 -6
- package/server/models/pkk.js +1 -10
- package/server/models/pkt.js +1 -12
- package/server/models/pn1.js +1 -17
- package/server/models/pn2.js +1 -11
- package/server/models/pn3.js +1 -13
- package/server/models/pn5.js +1 -14
- package/server/models/pn6.js +1 -14
- package/server/models/pn9.js +1 -17
- package/server/models/pnc.js +1 -10
- package/server/models/pnh.js +1 -12
- package/server/models/pnk.js +1 -10
- package/server/models/po1.js +1 -19
- package/server/models/ppb.js +1 -6
- package/server/models/profile.js +1 -4
- package/server/models/pt1.js +1 -12
- package/server/models/pt5.js +1 -8
- package/server/models/ptl.js +1 -6
- package/server/models/ptthanhtoan.js +1 -6
- package/server/models/purchase_contract.js +1 -17
- package/server/models/pxc.js +1 -9
- package/server/models/pxh.js +1 -12
- package/server/models/pxk.js +1 -10
- package/server/models/qts.js +1 -14
- package/server/models/qts_dieuchinh.js +1 -3
- package/server/models/qts_dieuchuyen.js +1 -4
- package/server/models/quanhuyen.js +1 -2
- package/server/models/reason.js +1 -2
- package/server/models/receivedinvoice.js +1 -2
- package/server/models/reportinfo.js +1 -5
- package/server/models/right.js +1 -4
- package/server/models/rpt.js +1 -2
- package/server/models/rptform.js +1 -5
- package/server/models/rptobject.js +1 -2
- package/server/models/sale_contract.js +1 -9
- package/server/models/schedule.js +1 -16
- package/server/models/schedule_log.js +1 -2
- package/server/models/service.js +1 -4
- package/server/models/shipbook.js +1 -12
- package/server/models/shortcut.js +1 -2
- package/server/models/smsaccount.js +1 -10
- package/server/models/smssend.js +1 -2
- package/server/models/so1.js +1 -22
- package/server/models/so2.js +1 -10
- package/server/models/so3.js +1 -9
- package/server/models/so5.js +1 -15
- package/server/models/so9.js +1 -19
- package/server/models/socai.js +1 -26
- package/server/models/socainpp.js +1 -18
- package/server/models/socaitc.js +1 -6
- package/server/models/socaitmp.js +1 -16
- package/server/models/socaitt.js +1 -4
- package/server/models/sodiemthuong.js +1 -4
- package/server/models/sokho.js +1 -28
- package/server/models/sokhocapphat.js +1 -18
- package/server/models/sokhokhongton.js +1 -19
- package/server/models/sokhonpp.js +1 -19
- package/server/models/sokhotc.js +1 -8
- package/server/models/sokhott.js +1 -18
- package/server/models/sophanbokh.js +1 -3
- package/server/models/sosanxuat.js +1 -5
- package/server/models/sotinhkh.js +1 -2
- package/server/models/spdd_ck.js +1 -3
- package/server/models/spdd_dk.js +1 -3
- package/server/models/step.js +1 -2
- package/server/models/strategicdiagram.js +1 -3
- package/server/models/strategicgoal.js +1 -4
- package/server/models/strategickpi.js +1 -6
- package/server/models/strategicobjective.js +1 -5
- package/server/models/strategicplan.js +1 -5
- package/server/models/subscribe.js +1 -2
- package/server/models/support.js +1 -2
- package/server/models/synctime.js +1 -2
- package/server/models/sysconfig.js +1 -2
- package/server/models/sysgroup.js +1 -2
- package/server/models/tableinfo.js +1 -3
- package/server/models/task.js +1 -9
- package/server/models/taskreg.js +1 -4
- package/server/models/tc.js +1 -2
- package/server/models/tdttco.js +1 -8
- package/server/models/tdttco_tt.js +1 -5
- package/server/models/tdttno.js +1 -8
- package/server/models/tdttno_tt.js +1 -5
- package/server/models/templaterpt.js +1 -2
- package/server/models/templatestore.js +1 -3
- package/server/models/templatevoucher.js +1 -3
- package/server/models/tinhthanh.js +1 -2
- package/server/models/tokens.js +1 -2
- package/server/models/tontucthoi.js +1 -9
- package/server/models/trangthai.js +1 -4
- package/server/models/trangthaiapp.js +1 -4
- package/server/models/transaction.js +1 -16
- package/server/models/trialinfo.js +1 -2
- package/server/models/user.js +1 -38
- package/server/models/usergroup.js +1 -7
- package/server/models/vanchuyen.js +1 -12
- package/server/models/vat.js +1 -3
- package/server/models/vatra.js +1 -6
- package/server/models/vatvao.js +1 -6
- package/server/models/versioninfo.js +1 -2
- package/server/models/vietqrbanks.js +1 -2
- package/server/models/vsocai.js +1 -6
- package/server/models/waitevent.js +1 -2
- package/server/models/wallet.js +1 -8
- package/server/models/warranty.js +1 -3
- package/server/models/warrantyclaim.js +1 -2
- package/server/models/warrantypolicy.js +1 -1
- package/server/models/xaphuong.js +1 -2
- package/server/models/xhd.js +1 -10
- package/server/models/ytdd_ck.js +1 -4
- package/server/models/ytdd_dk.js +1 -4
- package/server/models/zalo.js +1 -17
- package/server/modules/lists/bg-cddiem.js +1 -6
- package/server/modules/lists/bg-cddt.js +1 -7
- package/server/modules/lists/bg-cdkh.js +1 -11
- package/server/modules/lists/bg-cdnphep.js +1 -6
- package/server/modules/lists/bg-cdtk.js +1 -9
- package/server/modules/lists/bg-cdvt.js +1 -8
- package/server/modules/lists/bg-cdvtnpp.js +1 -8
- package/server/modules/lists/ls-account.js +1 -4
- package/server/modules/lists/ls-afflink.js +1 -3
- package/server/modules/lists/ls-approve.js +1 -4
- package/server/modules/lists/ls-assabcihandler.js +1 -3
- package/server/modules/lists/ls-assbank.js +1 -3
- package/server/modules/lists/ls-assbooking.js +1 -20
- package/server/modules/lists/ls-assbuy.js +1 -8
- package/server/modules/lists/ls-asscashwithdraw.js +1 -8
- package/server/modules/lists/ls-assinvestment.js +1 -31
- package/server/modules/lists/ls-assissue.js +1 -3
- package/server/modules/lists/ls-asskey.js +1 -41
- package/server/modules/lists/ls-assneedtobuy.js +1 -10
- package/server/modules/lists/ls-assperiod.js +1 -19
- package/server/modules/lists/ls-assproduct.js +1 -9
- package/server/modules/lists/ls-assprofitsharing.js +1 -8
- package/server/modules/lists/ls-assreceiver.js +1 -3
- package/server/modules/lists/ls-assrequest.js +1 -4
- package/server/modules/lists/ls-asssell.js +1 -13
- package/server/modules/lists/ls-asstransaction.js +1 -3
- package/server/modules/lists/ls-asstransfer.js +1 -3
- package/server/modules/lists/ls-assuser_identity.js +1 -1
- package/server/modules/lists/ls-asswithdraw.js +1 -12
- package/server/modules/lists/ls-bangtinhluong.js +1 -2
- package/server/modules/lists/ls-bds_area.js +1 -3
- package/server/modules/lists/ls-bds_block.js +1 -1
- package/server/modules/lists/ls-bds_building.js +1 -3
- package/server/modules/lists/ls-bds_dmnhbds.js +1 -6
- package/server/modules/lists/ls-bds_floor.js +1 -2
- package/server/modules/lists/ls-bds_floordetail.js +1 -19
- package/server/modules/lists/ls-bds_nhadat.js +1 -16
- package/server/modules/lists/ls-bds_nhomnhadat.js +1 -1
- package/server/modules/lists/ls-bds_phanloainhadat.js +1 -1
- package/server/modules/lists/ls-calllog.js +1 -4
- package/server/modules/lists/ls-campaign.js +1 -1
- package/server/modules/lists/ls-cart.js +1 -14
- package/server/modules/lists/ls-chamcong.js +1 -3
- package/server/modules/lists/ls-checkin.js +1 -12
- package/server/modules/lists/ls-checkinactivity.js +1 -8
- package/server/modules/lists/ls-checkinkpi.js +1 -3
- package/server/modules/lists/ls-checkinlocation.js +1 -1
- package/server/modules/lists/ls-chitieukpi.js +1 -1
- package/server/modules/lists/ls-chudethaoluan.js +1 -1
- package/server/modules/lists/ls-ckgtluong.js +1 -1
- package/server/modules/lists/ls-comment.js +1 -9
- package/server/modules/lists/ls-congdoansx.js +1 -3
- package/server/modules/lists/ls-congtacvien.js +1 -5
- package/server/modules/lists/ls-consultant.js +1 -2
- package/server/modules/lists/ls-contract.js +1 -7
- package/server/modules/lists/ls-ctds.js +1 -4
- package/server/modules/lists/ls-ctds2.js +1 -4
- package/server/modules/lists/ls-currency.js +1 -1
- package/server/modules/lists/ls-customer.js +1 -21
- package/server/modules/lists/ls-datlich.js +1 -9
- package/server/modules/lists/ls-dckhauhaots.js +1 -3
- package/server/modules/lists/ls-department.js +1 -3
- package/server/modules/lists/ls-diagram.js +1 -1
- package/server/modules/lists/ls-dkhoc.js +1 -6
- package/server/modules/lists/ls-dknphep.js +1 -1
- package/server/modules/lists/ls-dmban.js +1 -4
- package/server/modules/lists/ls-dmbp.js +1 -7
- package/server/modules/lists/ls-dmca.js +1 -1
- package/server/modules/lists/ls-dmchietkhau.js +1 -19
- package/server/modules/lists/ls-dmchietkhauhd.js +1 -4
- package/server/modules/lists/ls-dmchucvu.js +1 -2
- package/server/modules/lists/ls-dmcpmh.js +1 -1
- package/server/modules/lists/ls-dmdiemthuong.js +1 -4
- package/server/modules/lists/ls-dmdoi.js +1 -4
- package/server/modules/lists/ls-dmdoituongdanhgia.js +1 -1
- package/server/modules/lists/ls-dmdt.js +1 -11
- package/server/modules/lists/ls-dmdvt.js +1 -2
- package/server/modules/lists/ls-dmgiaban.js +1 -4
- package/server/modules/lists/ls-dmgiamua.js +1 -4
- package/server/modules/lists/ls-dmgiathitruong.js +1 -15
- package/server/modules/lists/ls-dmgiathitruong_ngay.js +1 -2
- package/server/modules/lists/ls-dmgiathitruong_theodoi.js +1 -1
- package/server/modules/lists/ls-dmhoahonghd.js +1 -1
- package/server/modules/lists/ls-dmhoahongnpp.js +1 -1
- package/server/modules/lists/ls-dmkc.js +1 -3
- package/server/modules/lists/ls-dmkho.js +1 -1
- package/server/modules/lists/ls-dmkhuyenmai.js +1 -5
- package/server/modules/lists/ls-dmkhuyenmaihd.js +1 -3
- package/server/modules/lists/ls-dmletet.js +1 -1
- package/server/modules/lists/ls-dmlo.js +1 -1
- package/server/modules/lists/ls-dmloaicong.js +1 -1
- package/server/modules/lists/ls-dmloaits.js +1 -1
- package/server/modules/lists/ls-dmnckkm.js +1 -7
- package/server/modules/lists/ls-dmnghiepvu.js +1 -1
- package/server/modules/lists/ls-dmnguonvon.js +1 -1
- package/server/modules/lists/ls-dmnhnv.js +1 -6
- package/server/modules/lists/ls-dmnhtask.js +1 -5
- package/server/modules/lists/ls-dmnkh.js +1 -6
- package/server/modules/lists/ls-dmntt.js +1 -6
- package/server/modules/lists/ls-dmnv.js +1 -17
- package/server/modules/lists/ls-dmnvt.js +1 -8
- package/server/modules/lists/ls-dmphatdichvu.js +1 -3
- package/server/modules/lists/ls-dmphi.js +1 -6
- package/server/modules/lists/ls-dmqct.js +1 -2
- package/server/modules/lists/ls-dmqddvt.js +1 -3
- package/server/modules/lists/ls-dmtanggiamts.js +1 -1
- package/server/modules/lists/ls-dmto.js +1 -5
- package/server/modules/lists/ls-dmtt.js +1 -7
- package/server/modules/lists/ls-dmvt.js +1 -68
- package/server/modules/lists/ls-dmyt.js +1 -1
- package/server/modules/lists/ls-dokho.js +1 -1
- package/server/modules/lists/ls-dvcs.js +1 -1
- package/server/modules/lists/ls-ecomcategories.js +1 -5
- package/server/modules/lists/ls-ecomcategories_cty.js +1 -5
- package/server/modules/lists/ls-email.js +1 -4
- package/server/modules/lists/ls-events.js +1 -3
- package/server/modules/lists/ls-evoucher.js +1 -3
- package/server/modules/lists/ls-experiencejourney.js +1 -1
- package/server/modules/lists/ls-experiencejourneydata.js +1 -3
- package/server/modules/lists/ls-experiencejourneypersona.js +1 -4
- package/server/modules/lists/ls-experiencejourneystage.js +1 -1
- package/server/modules/lists/ls-fbconversation.js +1 -2
- package/server/modules/lists/ls-fbmessage.js +1 -2
- package/server/modules/lists/ls-fbpage.js +1 -11
- package/server/modules/lists/ls-fbpost.js +1 -2
- package/server/modules/lists/ls-file.js +1 -31
- package/server/modules/lists/ls-financialroadmap.js +1 -3
- package/server/modules/lists/ls-flow.js +1 -6
- package/server/modules/lists/ls-flowdata.js +1 -1
- package/server/modules/lists/ls-folder.js +1 -1
- package/server/modules/lists/ls-form.js +1 -1
- package/server/modules/lists/ls-forminfo.js +1 -1
- package/server/modules/lists/ls-formvalue.js +1 -1
- package/server/modules/lists/ls-giaoca.js +1 -4
- package/server/modules/lists/ls-group.js +1 -5
- package/server/modules/lists/ls-hlink.js +1 -1
- package/server/modules/lists/ls-hlinkvalue.js +1 -1
- package/server/modules/lists/ls-hmcn.js +1 -2
- package/server/modules/lists/ls-hspbts.js +1 -3
- package/server/modules/lists/ls-introducebonus.js +1 -4
- package/server/modules/lists/ls-introducecode.js +1 -10
- package/server/modules/lists/ls-introducer.js +1 -20
- package/server/modules/lists/ls-kbm-bcdkt.js +1 -1
- package/server/modules/lists/ls-kbm-bcqt.js +1 -5
- package/server/modules/lists/ls-kbm-kqhdkd.js +1 -1
- package/server/modules/lists/ls-kbm-lcttgt.js +1 -1
- package/server/modules/lists/ls-kbm-lctttt.js +1 -1
- package/server/modules/lists/ls-kbm-pttct.js +1 -3
- package/server/modules/lists/ls-kbm-tkgtgt.js +1 -3
- package/server/modules/lists/ls-kbm-tmbctc.js +1 -3
- package/server/modules/lists/ls-kehoachdtcp.js +1 -4
- package/server/modules/lists/ls-keyresult.js +1 -7
- package/server/modules/lists/ls-khunghangthanhvien.js +1 -1
- package/server/modules/lists/ls-kygui.js +1 -19
- package/server/modules/lists/ls-label.js +1 -1
- package/server/modules/lists/ls-lienhe.js +1 -4
- package/server/modules/lists/ls-like-module.js +1 -1
- package/server/modules/lists/ls-link.js +1 -1
- package/server/modules/lists/ls-loaidiem.js +1 -1
- package/server/modules/lists/ls-lock.js +1 -1
- package/server/modules/lists/ls-log.js +1 -3
- package/server/modules/lists/ls-mailaccount.js +1 -5
- package/server/modules/lists/ls-mailreceived.js +1 -5
- package/server/modules/lists/ls-mailschedule.js +1 -7
- package/server/modules/lists/ls-mailsent.js +1 -4
- package/server/modules/lists/ls-mailtemplate.js +1 -4
- package/server/modules/lists/ls-maudanhgia.js +1 -3
- package/server/modules/lists/ls-message2.js +1 -8
- package/server/modules/lists/ls-message2setting.js +1 -5
- package/server/modules/lists/ls-news.js +1 -7
- package/server/modules/lists/ls-newsfeed.js +1 -4
- package/server/modules/lists/ls-note.js +1 -6
- package/server/modules/lists/ls-okr.js +1 -5
- package/server/modules/lists/ls-okrdiagram.js +1 -1
- package/server/modules/lists/ls-opportunity.js +1 -5
- package/server/modules/lists/ls-options.js +1 -4
- package/server/modules/lists/ls-parameter.js +1 -3
- package/server/modules/lists/ls-participant.js +1 -10
- package/server/modules/lists/ls-phieudanhgia.js +1 -7
- package/server/modules/lists/ls-phucap.js +1 -2
- package/server/modules/lists/ls-profile.js +1 -1
- package/server/modules/lists/ls-ptthanhtoan.js +1 -3
- package/server/modules/lists/ls-qts-dieuchinh.js +1 -2
- package/server/modules/lists/ls-qts-dieuchuyen.js +1 -8
- package/server/modules/lists/ls-reason.js +1 -1
- package/server/modules/lists/ls-rpt.js +1 -5
- package/server/modules/lists/ls-rptform.js +1 -4
- package/server/modules/lists/ls-service.js +1 -3
- package/server/modules/lists/ls-shortcut.js +1 -1
- package/server/modules/lists/ls-smsaccount.js +1 -1
- package/server/modules/lists/ls-smssend.js +1 -3
- package/server/modules/lists/ls-sosanxuat.js +1 -4
- package/server/modules/lists/ls-step.js +1 -1
- package/server/modules/lists/ls-strategicdiagram.js +1 -1
- package/server/modules/lists/ls-strategicgoal.js +1 -3
- package/server/modules/lists/ls-strategickpi.js +1 -7
- package/server/modules/lists/ls-strategicobjective.js +1 -3
- package/server/modules/lists/ls-strategicplan.js +1 -6
- package/server/modules/lists/ls-support.js +1 -3
- package/server/modules/lists/ls-task.js +1 -34
- package/server/modules/lists/ls-taskreg.js +1 -2
- package/server/modules/lists/ls-tc.js +1 -1
- package/server/modules/lists/ls-templaterpt.js +1 -5
- package/server/modules/lists/ls-templatevoucher.js +1 -1
- package/server/modules/lists/ls-tontucthoi.js +1 -3
- package/server/modules/lists/ls-trangthaiapp.js +1 -3
- package/server/modules/lists/ls-transaction.js +1 -4
- package/server/modules/lists/ls-usergroup.js +1 -7
- package/server/modules/lists/ls-vat.js +1 -1
- package/server/modules/lists/ls-vatra.js +1 -5
- package/server/modules/lists/ls-vatvao.js +1 -6
- package/server/modules/lists/ls-waitevent.js +1 -1
- package/server/modules/lists/ls-warranty.js +1 -4
- package/server/modules/lists/ls_hanmucton.js +1 -3
- package/server/modules/lists/ls_hspb.js +1 -4
- package/server/modules/lists/ls_spdd_ck.js +1 -3
- package/server/modules/lists/ls_spdd_dk.js +1 -3
- package/server/modules/lists/ls_ytdd_ck.js +1 -4
- package/server/modules/lists/ls_ytdd_dk.js +1 -4
- package/server/modules/lists/sys-attend.js +1 -4
- package/server/modules/lists/sys-follow.js +1 -4
- package/server/modules/lists/sys-right.js +1 -2
- package/server/modules/public/app.js +1 -4
- package/server/modules/public/approve.js +1 -37
- package/server/modules/public/callin.js +1 -7
- package/server/modules/public/comment.js +1 -5
- package/server/modules/public/dmnvt.js +1 -4
- package/server/modules/public/dmvt.js +1 -9
- package/server/modules/public/file.js +1 -11
- package/server/modules/public/form.js +1 -7
- package/server/modules/public/forminfo.js +1 -1
- package/server/modules/public/group.js +1 -4
- package/server/modules/public/hlink.js +1 -3
- package/server/modules/public/introducecode.js +1 -1
- package/server/modules/public/listinfo.js +1 -1
- package/server/modules/public/media-webhook.js +1 -1
- package/server/modules/public/partner.js +1 -1
- package/server/modules/public/paymentCallback.js +1 -32
- package/server/modules/public/province.js +1 -1
- package/server/modules/public/ptthanhtoan.js +1 -4
- package/server/modules/public/subscribe.js +1 -30
- package/server/modules/public/support.js +1 -3
- package/server/modules/public/tableinfo.js +1 -1
- package/server/modules/public/trialinfo.js +1 -4
- package/server/modules/public/versioninfo.js +1 -1
- package/server/modules/reports/calc-tinhgiatb.js +1 -6
- package/server/modules/reports/calc-tinhgiathanh.js +1 -6
- package/server/modules/reports/calc-tinhkhauhaots.js +1 -3
- package/server/modules/reports/calc-tinhluong.js +1 -37
- package/server/modules/reports/rp-analyzedata.js +1 -6
- package/server/modules/reports/rp-assbonus.js +1 -4
- package/server/modules/reports/rp-assinterest.js +1 -8
- package/server/modules/reports/rp-assproductowners.js +1 -3
- package/server/modules/reports/rp-asssupply.js +1 -1
- package/server/modules/reports/rp-asstransferlog.js +1 -10
- package/server/modules/reports/rp-banggiatb.js +1 -3
- package/server/modules/reports/rp-bangtinhkhauhao.js +1 -6
- package/server/modules/reports/rp-baocaokhachhang.js +1 -6
- package/server/modules/reports/rp-bcdkt.js +1 -11
- package/server/modules/reports/rp-bcintroducebonus.js +1 -4
- package/server/modules/reports/rp-bckhtiemnang.js +1 -3
- package/server/modules/reports/rp-bcqt.js +1 -85
- package/server/modules/reports/rp-bkct.js +1 -13
- package/server/modules/reports/rp-bkshipbook.js +1 -8
- package/server/modules/reports/rp-bkvanchuyen.js +1 -8
- package/server/modules/reports/rp-bkvatra.js +1 -7
- package/server/modules/reports/rp-bkvatvao.js +1 -7
- package/server/modules/reports/rp-capnhatsocaitc.js +1 -4
- package/server/modules/reports/rp-cdpsdiem.js +1 -4
- package/server/modules/reports/rp-cdpsdt.js +1 -5
- package/server/modules/reports/rp-cdpskh.js +1 -7
- package/server/modules/reports/rp-cdpsnphep.js +1 -3
- package/server/modules/reports/rp-cdpstk.js +1 -4
- package/server/modules/reports/rp-chitietchitientheohoadon.js +1 -12
- package/server/modules/reports/rp-chitiettaisan.js +1 -13
- package/server/modules/reports/rp-chitietthutientheohoadon.js +1 -13
- package/server/modules/reports/rp-ckcn.js +1 -3
- package/server/modules/reports/rp-ckdiem.js +1 -2
- package/server/modules/reports/rp-cktk.js +1 -3
- package/server/modules/reports/rp-ckvt.js +1 -10
- package/server/modules/reports/rp-ckvttheokho.js +1 -4
- package/server/modules/reports/rp-ckvttheotg.js +1 -4
- package/server/modules/reports/rp-ckvttt.js +1 -3
- package/server/modules/reports/rp-congnophaithutheotuoino.js +1 -3
- package/server/modules/reports/rp-congnophaitratheotuoino.js +1 -3
- package/server/modules/reports/rp-congnosapthu.js +1 -4
- package/server/modules/reports/rp-congnosaptra.js +1 -4
- package/server/modules/reports/rp-congviectheobp.js +1 -9
- package/server/modules/reports/rp-congviectheodt.js +1 -8
- package/server/modules/reports/rp-congviectheokh.js +1 -8
- package/server/modules/reports/rp-congviectheonv.js +1 -9
- package/server/modules/reports/rp-congviectheotimeline.js +1 -6
- package/server/modules/reports/rp-ctbanle.js +1 -15
- package/server/modules/reports/rp-ctbanle2.js +1 -20
- package/server/modules/reports/rp-ctbanlectv.js +1 -20
- package/server/modules/reports/rp-ctbanlenpp.js +1 -24
- package/server/modules/reports/rp-ctdanhgianhanvien.js +1 -8
- package/server/modules/reports/rp-cthangbanbitralai.js +1 -4
- package/server/modules/reports/rp-ctmuahang.js +1 -7
- package/server/modules/reports/rp-cttralaihang.js +1 -4
- package/server/modules/reports/rp-databanle.js +1 -10
- package/server/modules/reports/rp-diemthuong.js +1 -2
- package/server/modules/reports/rp-dkcn.js +1 -3
- package/server/modules/reports/rp-dktk.js +1 -2
- package/server/modules/reports/rp-dsnhanviencm.js +1 -9
- package/server/modules/reports/rp-dsnhanvientb.js +1 -9
- package/server/modules/reports/rp-dtbanlekempk.js +1 -9
- package/server/modules/reports/rp-dtbanletheoct.js +1 -23
- package/server/modules/reports/rp-dtbanletheoctkempk.js +1 -25
- package/server/modules/reports/rp-dtbanletheokh.js +1 -20
- package/server/modules/reports/rp-dtbanletheokhnpp.js +1 -19
- package/server/modules/reports/rp-dtbanletheokho.js +1 -18
- package/server/modules/reports/rp-dtbanletheonam.js +1 -3
- package/server/modules/reports/rp-dtbanletheongay.js +1 -1
- package/server/modules/reports/rp-dtbanletheonpp.js +1 -23
- package/server/modules/reports/rp-dtbanletheonv.js +1 -19
- package/server/modules/reports/rp-dtbanletheoquy.js +1 -3
- package/server/modules/reports/rp-dtbanletheosp.js +1 -8
- package/server/modules/reports/rp-dtbanletheospnpp.js +1 -6
- package/server/modules/reports/rp-dtbanletheothang.js +1 -3
- package/server/modules/reports/rp-dtbanletheothungan.js +1 -12
- package/server/modules/reports/rp-dtbanletheovt.js +1 -2
- package/server/modules/reports/rp-dtbanletheovtnpp.js +1 -2
- package/server/modules/reports/rp-dutoanthuchitheodt.js +1 -4
- package/server/modules/reports/rp-getPXC2PNC.js +1 -8
- package/server/modules/reports/rp-getariseofaccountsbymonth.js +1 -4
- package/server/modules/reports/rp-getbtpb.js +1 -6
- package/server/modules/reports/rp-getcashbycashier.js +1 -7
- package/server/modules/reports/rp-getcschietkhau.js +1 -5
- package/server/modules/reports/rp-getdinhmuc4lenhcp.js +1 -7
- package/server/modules/reports/rp-getdinhmuc4pxk.js +1 -9
- package/server/modules/reports/rp-getdk4pht.js +1 -8
- package/server/modules/reports/rp-getdk4pkc.js +1 -9
- package/server/modules/reports/rp-getdttheoca.js +1 -5
- package/server/modules/reports/rp-getinvoice2pay.js +1 -4
- package/server/modules/reports/rp-getinvoice2receive.js +1 -4
- package/server/modules/reports/rp-getinvoice2return.js +1 -5
- package/server/modules/reports/rp-getinvoice2return_bl.js +1 -6
- package/server/modules/reports/rp-getkehoachmh4lenhcp.js +1 -4
- package/server/modules/reports/rp-getkhauhao.js +1 -7
- package/server/modules/reports/rp-getluong.js +1 -8
- package/server/modules/reports/rp-getluongchuyen.js +1 -5
- package/server/modules/reports/rp-getpn2fee.js +1 -5
- package/server/modules/reports/rp-getpn2return.js +1 -5
- package/server/modules/reports/rp-getthanhpham4pnk.js +1 -7
- package/server/modules/reports/rp-getvc2xhd.js +1 -11
- package/server/modules/reports/rp-gt_cpnvltt.js +1 -6
- package/server/modules/reports/rp-hangbanbitralai.js +1 -5
- package/server/modules/reports/rp-hangthanhvien.js +1 -3
- package/server/modules/reports/rp-hoadonbanhangtheohantt.js +1 -5
- package/server/modules/reports/rp-hoadonmuahangtheohantt.js +1 -5
- package/server/modules/reports/rp-hoahong.js +1 -15
- package/server/modules/reports/rp-kcsns.js +1 -19
- package/server/modules/reports/rp-kgchamcong.js +1 -7
- package/server/modules/reports/rp-khoaso.js +1 -12
- package/server/modules/reports/rp-kiemtrasocaitcvssocai.js +1 -6
- package/server/modules/reports/rp-kqdanhgianhanvien.js +1 -5
- package/server/modules/reports/rp-kqhdkd.js +1 -7
- package/server/modules/reports/rp-lcttgt.js +1 -17
- package/server/modules/reports/rp-lctttt.js +1 -11
- package/server/modules/reports/rp-linkslist.js +1 -4
- package/server/modules/reports/rp-phanbochitienchohoadon.js +1 -11
- package/server/modules/reports/rp-phanbothutienchohoadon.js +1 -10
- package/server/modules/reports/rp-ptbitralai.js +1 -7
- package/server/modules/reports/rp-ptcttct.js +1 -22
- package/server/modules/reports/rp-ptdonhang.js +1 -8
- package/server/modules/reports/rp-pttct.js +1 -49
- package/server/modules/reports/rp-pttctkho.js +1 -32
- package/server/modules/reports/rp-pttctkho2.js +1 -29
- package/server/modules/reports/rp-referredusers.js +1 -1
- package/server/modules/reports/rp-sctbhxh.js +1 -4
- package/server/modules/reports/rp-sctcnkh.js +1 -17
- package/server/modules/reports/rp-sctdiem.js +1 -3
- package/server/modules/reports/rp-sctdt.js +1 -7
- package/server/modules/reports/rp-sctdtcp.js +1 -11
- package/server/modules/reports/rp-sctluong.js +1 -4
- package/server/modules/reports/rp-sctthuetncn.js +1 -4
- package/server/modules/reports/rp-scttk.js +1 -7
- package/server/modules/reports/rp-sctvt.js +1 -5
- package/server/modules/reports/rp-sctvt_sl.js +1 -5
- package/server/modules/reports/rp-sctvtnpp.js +1 -6
- package/server/modules/reports/rp-sctvttt.js +1 -5
- package/server/modules/reports/rp-search.js +1 -4
- package/server/modules/reports/rp-socai.js +1 -6
- package/server/modules/reports/rp-socaitk.js +1 -7
- package/server/modules/reports/rp-sochut.js +1 -7
- package/server/modules/reports/rp-sokho.js +1 -7
- package/server/modules/reports/rp-sokhott.js +1 -5
- package/server/modules/reports/rp-sonkbh.js +1 -5
- package/server/modules/reports/rp-sonkc.js +1 -6
- package/server/modules/reports/rp-sonkct.js +1 -5
- package/server/modules/reports/rp-sonkmh.js +1 -5
- package/server/modules/reports/rp-sonktt.js +1 -5
- package/server/modules/reports/rp-soquy.js +1 -11
- package/server/modules/reports/rp-sosanhkhvatt.js +1 -13
- package/server/modules/reports/rp-sosanhkhvatt2.js +1 -6
- package/server/modules/reports/rp-sotaisan.js +1 -13
- package/server/modules/reports/rp-sotiengui.js +1 -7
- package/server/modules/reports/rp-taodinhmuctudkhoc.js +1 -5
- package/server/modules/reports/rp-thbanhangkempk.js +1 -28
- package/server/modules/reports/rp-thdanhgianhanvien.js +1 -9
- package/server/modules/reports/rp-thgt.js +1 -6
- package/server/modules/reports/rp-thnxt.js +1 -12
- package/server/modules/reports/rp-thnxt_sl.js +1 -9
- package/server/modules/reports/rp-thnxtnpp.js +1 -10
- package/server/modules/reports/rp-thnxttt.js +1 -9
- package/server/modules/reports/rp-tkbanhangtheogioithieu.js +1 -9
- package/server/modules/reports/rp-tkgioithieukh.js +1 -4
- package/server/modules/reports/rp-tkgtgt.js +1 -7
- package/server/modules/reports/rp-tmbctc.js +1 -20
- package/server/modules/reports/rp-tonghopbanhang.js +1 -6
- package/server/modules/reports/rp-tonghopmuahang.js +1 -5
- package/server/modules/reports/rp-tonghoptralaihang.js +1 -5
- package/server/modules/reports/rp-tongquanbanle.js +1 -20
- package/server/modules/reports/rp-tongquanbds.js +1 -3
- package/server/modules/reports/rp-tongquancongty.js +1 -6
- package/server/modules/reports/rp-tongquanctvnpp.js +1 -12
- package/server/modules/reports/rp-tongquannvbh.js +1 -14
- package/server/modules/reports/rp-tongquannvnpp.js +1 -5
- package/server/modules/reports/rp-uoctinhnvl.js +1 -11
- package/server/modules/reports/rp-wallet.js +1 -3
- package/server/modules/reports/rpt-tkdiemtichluy.js +1 -9
- package/server/modules/systems/sys-app.js +1 -30
- package/server/modules/systems/sys-colleague.js +1 -11
- package/server/modules/systems/sys-domain.js +1 -4
- package/server/modules/systems/sys-ecomproductlines.js +1 -1
- package/server/modules/systems/sys-exportexceltemplate.js +1 -4
- package/server/modules/systems/sys-fieldright.js +1 -3
- package/server/modules/systems/sys-importexceltemplate.js +1 -4
- package/server/modules/systems/sys-labelinfo.js +1 -4
- package/server/modules/systems/sys-listinfo.js +1 -10
- package/server/modules/systems/sys-menuinfo.js +1 -4
- package/server/modules/systems/sys-message.js +1 -14
- package/server/modules/systems/sys-moduleinfo.js +1 -4
- package/server/modules/systems/sys-notification.js +1 -8
- package/server/modules/systems/sys-quanhuyen.js +1 -4
- package/server/modules/systems/sys-reportinfo.js +1 -4
- package/server/modules/systems/sys-rptobject.js +1 -3
- package/server/modules/systems/sys-schedule.js +1 -11
- package/server/modules/systems/sys-sysconfig.js +1 -3
- package/server/modules/systems/sys-sysgroup.js +1 -3
- package/server/modules/systems/sys-tableinfo.js +1 -3
- package/server/modules/systems/sys-templatestore.js +1 -5
- package/server/modules/systems/sys-tinhthanh.js +1 -4
- package/server/modules/systems/sys-token.js +1 -3
- package/server/modules/systems/sys-trangthai.js +1 -4
- package/server/modules/systems/sys-trialinfo.js +1 -3
- package/server/modules/systems/sys-user.js +1 -45
- package/server/modules/systems/sys-users.js +1 -10
- package/server/modules/systems/sys-versioninfo.js +1 -3
- package/server/modules/systems/sys-vietqrbanks.js +1 -4
- package/server/modules/systems/sys-xaphuong.js +1 -4
- package/server/modules/vouchers/vo-banggiaban.js +1 -5
- package/server/modules/vouchers/vo-bc1.js +1 -33
- package/server/modules/vouchers/vo-bc5.js +1 -15
- package/server/modules/vouchers/vo-bg1.js +1 -10
- package/server/modules/vouchers/vo-bg2.js +1 -12
- package/server/modules/vouchers/vo-bn1.js +1 -35
- package/server/modules/vouchers/vo-bn5.js +1 -15
- package/server/modules/vouchers/vo-dh2.js +1 -35
- package/server/modules/vouchers/vo-dinhmucsx.js +1 -6
- package/server/modules/vouchers/vo-dkb.js +1 -21
- package/server/modules/vouchers/vo-dn0.js +1 -9
- package/server/modules/vouchers/vo-dnm.js +1 -21
- package/server/modules/vouchers/vo-hd1.js +1 -36
- package/server/modules/vouchers/vo-hd2.js +1 -107
- package/server/modules/vouchers/vo-hd3.js +1 -44
- package/server/modules/vouchers/vo-hd4.js +1 -13
- package/server/modules/vouchers/vo-hd7.js +1 -29
- package/server/modules/vouchers/vo-hd8.js +1 -29
- package/server/modules/vouchers/vo-hde.js +1 -40
- package/server/modules/vouchers/vo-htl.js +1 -11
- package/server/modules/vouchers/vo-kbbtpb.js +1 -6
- package/server/modules/vouchers/vo-kehoachmh.js +1 -13
- package/server/modules/vouchers/vo-lenhcapphat.js +1 -10
- package/server/modules/vouchers/vo-lenhsx.js +1 -12
- package/server/modules/vouchers/vo-pbl.js +1 -93
- package/server/modules/vouchers/vo-pc0.js +1 -14
- package/server/modules/vouchers/vo-pc1.js +1 -31
- package/server/modules/vouchers/vo-pc2.js +1 -24
- package/server/modules/vouchers/vo-pc3.js +1 -14
- package/server/modules/vouchers/vo-pc5.js +1 -15
- package/server/modules/vouchers/vo-pc6.js +1 -19
- package/server/modules/vouchers/vo-pcl.js +1 -7
- package/server/modules/vouchers/vo-pdn.js +1 -11
- package/server/modules/vouchers/vo-pdx.js +1 -9
- package/server/modules/vouchers/vo-pgh.js +1 -19
- package/server/modules/vouchers/vo-pht.js +1 -7
- package/server/modules/vouchers/vo-pkc.js +1 -7
- package/server/modules/vouchers/vo-pkh.js +1 -10
- package/server/modules/vouchers/vo-pkk.js +1 -12
- package/server/modules/vouchers/vo-pkt.js +1 -13
- package/server/modules/vouchers/vo-pn1.js +1 -33
- package/server/modules/vouchers/vo-pn2.js +1 -16
- package/server/modules/vouchers/vo-pn3.js +1 -18
- package/server/modules/vouchers/vo-pn5.js +1 -19
- package/server/modules/vouchers/vo-pn6.js +1 -18
- package/server/modules/vouchers/vo-pn9.js +1 -22
- package/server/modules/vouchers/vo-pnc.js +1 -20
- package/server/modules/vouchers/vo-pnh.js +1 -20
- package/server/modules/vouchers/vo-pnk.js +1 -14
- package/server/modules/vouchers/vo-pnknpp.js +1 -12
- package/server/modules/vouchers/vo-po1.js +1 -15
- package/server/modules/vouchers/vo-ppb.js +1 -8
- package/server/modules/vouchers/vo-pt1.js +1 -21
- package/server/modules/vouchers/vo-pt5.js +1 -15
- package/server/modules/vouchers/vo-ptl.js +1 -8
- package/server/modules/vouchers/vo-purchase_contract.js +1 -9
- package/server/modules/vouchers/vo-pxc.js +1 -22
- package/server/modules/vouchers/vo-pxh.js +1 -28
- package/server/modules/vouchers/vo-pxk.js +1 -15
- package/server/modules/vouchers/vo-pxknpp.js +1 -14
- package/server/modules/vouchers/vo-qts.js +1 -12
- package/server/modules/vouchers/vo-sale_contract.js +1 -11
- package/server/modules/vouchers/vo-shipbook.js +1 -17
- package/server/modules/vouchers/vo-so1.js +1 -126
- package/server/modules/vouchers/vo-so2.js +1 -37
- package/server/modules/vouchers/vo-so3.js +1 -41
- package/server/modules/vouchers/vo-so5.js +1 -57
- package/server/modules/vouchers/vo-so7.js +1 -97
- package/server/modules/vouchers/vo-so9.js +1 -119
- package/server/modules/vouchers/vo-vanchuyen.js +1 -14
- package/server/modules/vouchers/vo-xhd.js +1 -33
- package/server/route.js +1 -51
- package/server/services/invoiceFetcher.js +1 -15
- package/server/sslConfig.js +1 -2
- package/server/transactionMiddleware.js +1 -5
- package/server/workers/backupApp.js +1 -9
- package/server/workers/calcGrid.js +1 -9
- package/server/workers/customerOnImport.js +1 -8
- package/server/workers/dmvtOnImport.js +1 -9
- package/server/workers/excelParser.js +1 -9
- package/server/workers/inputWorker.js +1 -6
- package/server/workers/pushNotify.js +1 -10
- package/server/workers/reportWorker.js +1 -7
- package/server/workers/restoreApp.js +1 -23
- package/server/workers/runScript.js +1 -4
- package/server/workers/sendEmail.js +1 -13
- package/server/workers/webhook.js +1 -5
|
@@ -1,6 +1 @@
|
|
|
1
|
-
const sokhocapphat=global.getModel("sokhocapphat"),utils=require("./utils"),async=require("async"),underscore=require("underscore"),moment=require("moment");
|
|
2
|
-
module.exports=function($condition$$,$fn$$){!$condition$$.ngay&&$condition$$.den_ngay&&($condition$$.ngay=$condition$$.den_ngay);let $ma_dvcs$$=$condition$$.ma_dvcs,$ma_kho$$=$condition$$.ma_kho,$ma_vt$$=$condition$$.ma_vt;$ma_vt$$&&underscore.isArray($ma_vt$$)&&($ma_vt$$={$in:Object.assign($ma_vt$$)});let $ngay$$=moment($condition$$.ngay).endOf("date").toDate(),$id_app$$=$condition$$.id_app;async.series({dn:$callback$$=>{$callback$$(null,[])},ps:$callback$$=>{const $query$$={id_app:$id_app$$,ngay_ct:{$lte:$ngay$$}};
|
|
3
|
-
$ma_kho$$&&($query$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($query$$.ma_dvcs=$ma_dvcs$$);$ma_vt$$&&($query$$.ma_vt=$ma_vt$$);$condition$$.ma_lo&&($query$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($query$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($query$$.ma_tt1=$condition$$.ma_tt1);$condition$$.ma_tt2&&($query$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($query$$.ma_tt3=$condition$$.ma_tt3);$condition$$.id_ct&&($query$$.id_ct={$ne:$condition$$.id_ct});sokhocapphat.find($query$$).lean().then(function($pss$$){$pss$$=
|
|
4
|
-
$pss$$.map($ps$$=>{$ps$$.sl_nhap=utils.round($ps$$.sl_nhap_qd,4);$ps$$.sl_xuat=utils.round($ps$$.sl_xuat_qd,4);return $ps$$});$callback$$(null,$pss$$)}).catch($error$$=>{$callback$$($error$$)})}},($data_error$$,$groupBy_results$$)=>{if($data_error$$)$fn$$($data_error$$);else{$data_error$$=$groupBy_results$$.dn.concat($groupBy_results$$.ps);($groupBy_results$$=$condition$$.groupBy)||($groupBy_results$$=["ma_vt"]);if(underscore.isString($groupBy_results$$))if($groupBy_results$$.indexOf("[")>=0)try{$groupBy_results$$=
|
|
5
|
-
JSON.parse($groupBy_results$$)}catch($e$$){console.error($e$$)}else $groupBy_results$$=$groupBy_results$$.split(",");$data_error$$.groupBy($groupBy_results$$,"sl_nhap sl_xuat ton00 du00 tien_nhap tien_xuat".split(" "),($e$$,$groups$$)=>{if($e$$)return $fn$$($e$$);for(let $r$$ of $groups$$)$r$$.ton00=utils.round($r$$.ton00+$r$$.sl_nhap-$r$$.sl_xuat,4),$r$$.du00=Math.roundBy($r$$.du00,0)+Math.roundBy($r$$.tien_nhap,0)-Math.roundBy($r$$.tien_xuat,0),$r$$.sl_nhap=0,$r$$.sl_xuat=0,$r$$.tien_nhap=0,$r$$.tien_xuat=
|
|
6
|
-
0;$fn$$(null,$groups$$)})}})};
|
|
1
|
+
const _0xf4c44d=_0x1e1e;(function(_0x4c897b,_0xd7e062){const _0x23f9f0=_0x1e1e,_0xa749a6=_0x4c897b();while(!![]){try{const _0xb91098=parseInt(_0x23f9f0(0xa5))/0x1+-parseInt(_0x23f9f0(0xdd))/0x2*(-parseInt(_0x23f9f0(0xab))/0x3)+-parseInt(_0x23f9f0(0xe1))/0x4+-parseInt(_0x23f9f0(0xb8))/0x5*(parseInt(_0x23f9f0(0xe3))/0x6)+-parseInt(_0x23f9f0(0xdf))/0x7*(-parseInt(_0x23f9f0(0x9c))/0x8)+-parseInt(_0x23f9f0(0xb5))/0x9*(parseInt(_0x23f9f0(0xb7))/0xa)+-parseInt(_0x23f9f0(0xcb))/0xb*(-parseInt(_0x23f9f0(0xa6))/0xc);if(_0xb91098===_0xd7e062)break;else _0xa749a6['push'](_0xa749a6['shift']());}catch(_0x38293d){_0xa749a6['push'](_0xa749a6['shift']());}}}(_0xd326,0xc7598));const sokhocapphat=global[_0xf4c44d(0xc4)](_0xf4c44d(0xf1)),utils=require(_0xf4c44d(0xdb)),async=require('async'),underscore=require(_0xf4c44d(0xa7)),moment=require('moment');function _0x1e1e(_0x415343,_0x4b8e8c){const _0xd326ce=_0xd326();return _0x1e1e=function(_0x1e1e7e,_0x35c8e7){_0x1e1e7e=_0x1e1e7e-0x9c;let _0x57ddf8=_0xd326ce[_0x1e1e7e];if(_0x1e1e['AjZFTr']===undefined){var _0x3720f9=function(_0x32d844){const _0x559fb7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x24da6a='',_0x2d7104='';for(let _0x3d9642=0x0,_0xfd2f18,_0x521c5e,_0x127a48=0x0;_0x521c5e=_0x32d844['charAt'](_0x127a48++);~_0x521c5e&&(_0xfd2f18=_0x3d9642%0x4?_0xfd2f18*0x40+_0x521c5e:_0x521c5e,_0x3d9642++%0x4)?_0x24da6a+=String['fromCharCode'](0xff&_0xfd2f18>>(-0x2*_0x3d9642&0x6)):0x0){_0x521c5e=_0x559fb7['indexOf'](_0x521c5e);}for(let _0xfcb410=0x0,_0x553343=_0x24da6a['length'];_0xfcb410<_0x553343;_0xfcb410++){_0x2d7104+='%'+('00'+_0x24da6a['charCodeAt'](_0xfcb410)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d7104);};_0x1e1e['JZMlaZ']=_0x3720f9,_0x415343=arguments,_0x1e1e['AjZFTr']=!![];}const _0x1c208c=_0xd326ce[0x0],_0x54528f=_0x1e1e7e+_0x1c208c,_0x484bd9=_0x415343[_0x54528f];return!_0x484bd9?(_0x57ddf8=_0x1e1e['JZMlaZ'](_0x57ddf8),_0x415343[_0x54528f]=_0x57ddf8):_0x57ddf8=_0x484bd9,_0x57ddf8;},_0x1e1e(_0x415343,_0x4b8e8c);}module['exports']=function(_0x27f982,_0x58106d){const _0x1c674a=_0xf4c44d,_0x43489a={'ypJTp':function(_0x53850a,_0xe1e1ba,_0x23a4b1){return _0x53850a(_0xe1e1ba,_0x23a4b1);},'LDuhm':_0x1c674a(0xb4),'XKvaA':function(_0x55c115,_0x43878c){return _0x55c115(_0x43878c);},'gRseK':_0x1c674a(0xce),'OzkGY':function(_0x427488,_0x14f66f){return _0x427488-_0x14f66f;},'YvbTK':function(_0x28039c,_0x45ecac){return _0x28039c-_0x45ecac;},'gosvo':function(_0x6b6b32,_0x26b990){return _0x6b6b32+_0x26b990;},'IvQqV':function(_0x31e891,_0xd1f093,_0x5ac164){return _0x31e891(_0xd1f093,_0x5ac164);},'DvbBY':function(_0x44edf6,_0x2a731c){return _0x44edf6(_0x2a731c);},'EqMdO':function(_0x974eec,_0x512138){return _0x974eec!==_0x512138;},'iPKLP':_0x1c674a(0xbf),'EyTYB':function(_0x54ff8a,_0x4c2156){return _0x54ff8a===_0x4c2156;},'edIbQ':_0x1c674a(0xde),'psjop':_0x1c674a(0xae),'vVEmk':_0x1c674a(0xed),'aHXbo':_0x1c674a(0xeb),'PKXXc':_0x1c674a(0xe9),'yWmjM':function(_0x163fc4,_0x2fe188){return _0x163fc4!==_0x2fe188;},'bsWXL':'aARCX','ZNPJS':_0x1c674a(0xa9),'RXZbY':function(_0x541cfc,_0x5a0f20){return _0x541cfc+_0x5a0f20;},'zlCIb':_0x1c674a(0xd5),'WFRjJ':_0x1c674a(0xd4),'oafAH':function(_0x443b45,_0x398e80){return _0x443b45>=_0x398e80;},'FrDfZ':function(_0x7cf318,_0x4ad264){return _0x7cf318!==_0x4ad264;},'OcUzi':_0x1c674a(0xc7),'kzLni':_0x1c674a(0xc3),'PVNIw':_0x1c674a(0xcf),'wQnGX':_0x1c674a(0xec),'rIBNU':_0x1c674a(0xe0),'QwSOM':function(_0x210720,_0x292206){return _0x210720(_0x292206);}};!_0x27f982[_0x1c674a(0xc0)]&&_0x27f982[_0x1c674a(0xe7)]&&(_0x27f982['ngay']=_0x27f982[_0x1c674a(0xe7)]);let _0x34dd2f=_0x27f982['ma_dvcs'],_0x279453=_0x27f982[_0x1c674a(0xbd)],_0x246378=_0x27f982[_0x1c674a(0xd4)];if(_0x246378&&underscore[_0x1c674a(0xa1)](_0x246378)){let _0x345240=Object[_0x1c674a(0xbb)](_0x246378);_0x246378={'$in':_0x345240};}let _0xd24e48=_0x43489a[_0x1c674a(0xc5)](moment,_0x27f982[_0x1c674a(0xc0)])[_0x1c674a(0xda)]('date')[_0x1c674a(0xcc)](),_0x5e2028=_0x27f982[_0x1c674a(0xb1)];async[_0x1c674a(0xd6)]({'dn':_0x4db5df=>{const _0x2d9ae5=_0x1c674a,_0xa6e62={'lHZoR':function(_0x47b128,_0x5237dd,_0x5cf8d7){const _0x438192=_0x1e1e;return _0x43489a[_0x438192(0xd2)](_0x47b128,_0x5237dd,_0x5cf8d7);}};_0x43489a['LDuhm']===_0x43489a[_0x2d9ae5(0xee)]?_0x43489a[_0x2d9ae5(0xd2)](_0x4db5df,null,[]):(_0x58693c=_0xeef471[_0x2d9ae5(0xe6)](_0x5a8f2c=>{const _0x36aa5e=_0x2d9ae5;return _0x5a8f2c[_0x36aa5e(0xc3)]=_0x2bca49[_0x36aa5e(0xc6)](_0x5a8f2c[_0x36aa5e(0xd8)],0x4),_0x5a8f2c[_0x36aa5e(0xcf)]=_0x13150f[_0x36aa5e(0xc6)](_0x5a8f2c['sl_xuat_qd'],0x4),_0x5a8f2c;}),_0xa6e62['lHZoR'](_0x44bc1a,null,_0x1c0686));},'ps':_0x412e55=>{const _0x6602e5=_0x1c674a,_0x848fc1={'jcJtL':function(_0x3f58b6,_0x46c487,_0x13e6c3){return _0x3f58b6(_0x46c487,_0x13e6c3);}};if(_0x43489a['EqMdO'](_0x43489a['iPKLP'],_0x43489a['iPKLP']))_0xc0610e[_0x6602e5(0x9d)]={'$ne':_0x1d17bf[_0x6602e5(0x9d)]};else{const _0x2b2cd9={'id_app':_0x5e2028,'ngay_ct':{'$lte':_0xd24e48}};_0x279453&&(_0x2b2cd9[_0x6602e5(0xbd)]=_0x279453);if(_0x34dd2f){if(_0x43489a[_0x6602e5(0xca)](_0x43489a[_0x6602e5(0xad)],_0x43489a[_0x6602e5(0xa8)])){if(_0x46ccf5)return _0x43489a['XKvaA'](_0x52aa7e,_0x22e7fe);for(let _0x10195c of _0x14d70a){const _0x1daa9a=_0x43489a['gRseK'][_0x6602e5(0xd7)]('|');let _0x32c418=0x0;while(!![]){switch(_0x1daa9a[_0x32c418++]){case'0':_0x10195c[_0x6602e5(0xc3)]=0x0;continue;case'1':_0x10195c[_0x6602e5(0xec)]=_0x43489a['OzkGY'](_0x330c16[_0x6602e5(0xa3)](_0x10195c['du00'],0x0)+_0x5cb058[_0x6602e5(0xa3)](_0x10195c[_0x6602e5(0xe0)],0x0),_0x43a9d6[_0x6602e5(0xa3)](_0x10195c[_0x6602e5(0xb0)],0x0));continue;case'2':_0x10195c[_0x6602e5(0xe0)]=0x0;continue;case'3':_0x10195c[_0x6602e5(0xcf)]=0x0;continue;case'4':_0x10195c[_0x6602e5(0xb0)]=0x0;continue;case'5':_0x10195c[_0x6602e5(0xf2)]=_0x32b055[_0x6602e5(0xc6)](_0x43489a[_0x6602e5(0xb9)](_0x43489a[_0x6602e5(0xb2)](_0x10195c['ton00'],_0x10195c[_0x6602e5(0xc3)]),_0x10195c['sl_xuat']),0x4);continue;}break;}}_0x43489a[_0x6602e5(0xdc)](_0x3868af,null,_0xb28b2e);}else _0x2b2cd9['ma_dvcs']=_0x34dd2f;}_0x246378&&(_0x43489a[_0x6602e5(0xaf)](_0x43489a[_0x6602e5(0xc1)],_0x43489a[_0x6602e5(0xc1)])?_0xa7b384[_0x6602e5(0xa2)]=_0x1b1209:_0x2b2cd9['ma_vt']=_0x246378);if(_0x27f982[_0x6602e5(0xaa)])_0x2b2cd9[_0x6602e5(0xaa)]=_0x27f982[_0x6602e5(0xaa)];if(_0x27f982[_0x6602e5(0x9e)])_0x2b2cd9[_0x6602e5(0x9e)]=_0x27f982[_0x6602e5(0x9e)];if(_0x27f982[_0x6602e5(0xbc)])_0x2b2cd9[_0x6602e5(0xbc)]=_0x27f982[_0x6602e5(0xbc)];if(_0x27f982[_0x6602e5(0xb3)])_0x2b2cd9[_0x6602e5(0xb3)]=_0x27f982['ma_tt2'];if(_0x27f982[_0x6602e5(0xc8)])_0x2b2cd9['ma_tt3']=_0x27f982[_0x6602e5(0xc8)];_0x27f982[_0x6602e5(0x9d)]&&(_0x43489a[_0x6602e5(0xaf)](_0x43489a['aHXbo'],_0x43489a[_0x6602e5(0xb6)])?_0x2b2cd9[_0x6602e5(0x9d)]={'$ne':_0x27f982[_0x6602e5(0x9d)]}:_0x552d8c[_0x6602e5(0xbd)]=_0xcda75f),sokhocapphat[_0x6602e5(0xa0)](_0x2b2cd9)[_0x6602e5(0xc9)]()[_0x6602e5(0xd9)](function(_0x45b041){const _0x193c4c=_0x6602e5;_0x45b041=_0x45b041[_0x193c4c(0xe6)](_0x294123=>{const _0x502699=_0x193c4c;return _0x294123['sl_nhap']=utils[_0x502699(0xc6)](_0x294123[_0x502699(0xd8)],0x4),_0x294123[_0x502699(0xcf)]=utils[_0x502699(0xc6)](_0x294123[_0x502699(0xd3)],0x4),_0x294123;}),_0x848fc1[_0x193c4c(0xba)](_0x412e55,null,_0x45b041);})[_0x6602e5(0xc2)](_0x50295d=>{const _0x5e5a8f=_0x6602e5;_0x43489a[_0x5e5a8f(0xe4)](_0x412e55,_0x50295d);});}}},(_0x447f46,_0x3766ae)=>{const _0x49d2a8=_0x1c674a;if(_0x447f46){if(_0x43489a[_0x49d2a8(0xaf)](_0x43489a[_0x49d2a8(0xa4)],_0x43489a[_0x49d2a8(0xa4)]))_0x23f2c9=_0x36cda7[_0x49d2a8(0xcd)](_0x3dc12a);else{_0x58106d(_0x447f46);return;}}let _0x3089aa=_0x3766ae['dn']['concat'](_0x3766ae['ps']),_0x47af9f=_0x27f982[_0x49d2a8(0xf3)];if(!_0x47af9f)_0x47af9f=[_0x43489a[_0x49d2a8(0xf0)]];if(underscore[_0x49d2a8(0x9f)](_0x47af9f)){if(_0x43489a[_0x49d2a8(0xac)](_0x47af9f[_0x49d2a8(0xe2)]('['),0x0)){if(_0x43489a['FrDfZ'](_0x43489a[_0x49d2a8(0xea)],_0x49d2a8(0xc7)))try{_0x26adcb=_0x2e0e32['parse'](_0x1f5db6);}catch(_0x4d7d2a){_0x42468f['error'](_0x4d7d2a);}else try{_0x47af9f=JSON['parse'](_0x47af9f);}catch(_0x573f14){console[_0x49d2a8(0xbe)](_0x573f14);}}else _0x47af9f=_0x47af9f[_0x49d2a8(0xd7)](',');}let _0x322f24=[_0x43489a['kzLni'],_0x43489a[_0x49d2a8(0xd1)],_0x49d2a8(0xf2),_0x43489a[_0x49d2a8(0xef)],_0x43489a[_0x49d2a8(0xe8)],'tien_xuat'];_0x3089aa[_0x49d2a8(0xf3)](_0x47af9f,_0x322f24,(_0x58b55c,_0x307e5e)=>{const _0x291142=_0x49d2a8;if(_0x43489a['yWmjM'](_0x43489a['bsWXL'],_0x291142(0xe5))){if(_0x58b55c)return _0x43489a[_0x291142(0xe4)](_0x58106d,_0x58b55c);for(let _0x5c7709 of _0x307e5e){const _0x4577a8=_0x43489a[_0x291142(0xd0)]['split']('|');let _0x55db25=0x0;while(!![]){switch(_0x4577a8[_0x55db25++]){case'0':_0x5c7709[_0x291142(0xec)]=_0x43489a[_0x291142(0xb9)](_0x43489a[_0x291142(0xb2)](Math['roundBy'](_0x5c7709[_0x291142(0xec)],0x0),Math[_0x291142(0xa3)](_0x5c7709[_0x291142(0xe0)],0x0)),Math['roundBy'](_0x5c7709[_0x291142(0xb0)],0x0));continue;case'1':_0x5c7709[_0x291142(0xf2)]=utils['round'](_0x43489a['RXZbY'](_0x5c7709['ton00'],_0x5c7709[_0x291142(0xc3)])-_0x5c7709[_0x291142(0xcf)],0x4);continue;case'2':_0x5c7709[_0x291142(0xcf)]=0x0;continue;case'3':_0x5c7709[_0x291142(0xc3)]=0x0;continue;case'4':_0x5c7709[_0x291142(0xb0)]=0x0;continue;case'5':_0x5c7709['tien_nhap']=0x0;continue;}break;}}_0x58106d(null,_0x307e5e);}else{let _0x4e1fde=_0x127a48[_0x291142(0xbb)](_0xfcb410);_0x553343={'$in':_0x4e1fde};}});});};function _0xd326(){const _0x4edfd9=['CgPAuLO','rxfnze8','DgLLBL94Dwf0','AwrFyxbW','z29ZDM8','BwfFDhqY','uNnetva','mJD0zfjzB3q','ueTywgm','mJy5nJKXmfjeq3LiBq','mZG5mZK1Euz1sg9T','wxzIveS','AMnkDeW','yxnZAwDU','BwfFDhqX','BwfFA2HV','zxjYB3i','vKPOBxi','BMDHEq','DLzfBwS','y2f0y2G','C2XFBMHHCa','z2v0tw9KzwW','uxDtt00','CM91BMq','zgjHyNK','BwfFDhqZ','BgvHBG','rxLuwui','mtfqAuniCvO','Dg9eyxrL','CgfYC2u','nxWXFdb8m3WYFdq','C2XFEhvHDa','wK5qsLm','ufzosxC','Exbkvha','C2XFEhvHDf9Xza','BwfFDNq','shn2vKq','C2vYAwvZ','C3bSAxq','C2XFBMHHCf9Xza','DgHLBG','zw5Kt2y','lI91DgLSCW','sxzrCvy','ndG4ntq2BKjVCeL1','EgHitMm','n1HQz2Ttwq','DgLLBL9UAgfW','ndmYmdG2nfbis2ngza','Aw5KzxHpzG','mJrbqwHAtu8','rhzIqLK','vuHevum','BwfW','zgvUx25NyxK','CKLctLu','zfvuB2e','t2nvEMK','y3HNq3q','zhuWma','t3D1vKW','ter1Ag0','D1fUr1G','v0zsAKO','C29RAg9JyxbWAgf0','Dg9Umda','z3jVDxbcEq','nty2mZa4mePIyNPUAq','AwrFy3q','AgfUx3nK','AxntDhjPBMC','zMLUza','AxnbCNjHEq','BwfFzhzJCW','CM91BMrcEq','EMXdswi','mtqXnhPSv2rnsG','mtaXmdG4ndHnswvMsxC','Dw5KzxjZy29Yzq','ChnQB3a','mxWWFdn8mNW1Fdq','BwfFBg8','mtHNvLLTq1O','B2fMquG','zwrjyLe'];_0xd326=function(){return _0x4edfd9;};return _0xd326();}
|
package/server/libs/ckvtnpp.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
const cdvt=global.getModel("cdvtnpp"),sokho=global.getModel("sokhonpp"),utils=require("./utils"),async=require("async"),underscore=require("underscore"),moment=require("moment");
|
|
2
|
-
module.exports=async($condition$$,$fn$$)=>{$fn$$||=()=>{};!$condition$$.ngay&&$condition$$.den_ngay&&($condition$$.ngay=$condition$$.den_ngay);let $ma_dvcs$$=$condition$$.ma_dvcs,$ma_kho$$=$condition$$.ma_kho,$ma_vt$$=$condition$$.ma_vt;if(underscore.isString($ma_vt$$)&&$ma_vt$$.indexOf("[")>=0&&$ma_vt$$.indexOf("]")>0)try{$ma_vt$$=JSON.parse($ma_vt$$),$ma_vt$$.length==0&&($ma_vt$$=void 0)}catch($e$$){console.error($e$$)}$ma_vt$$&&underscore.isArray($ma_vt$$)&&($ma_vt$$={$in:Object.assign($ma_vt$$)});
|
|
3
|
-
let $ngay$$,$nam$$,$ngay_dn$$;$ngay$$=moment($condition$$.ngay).endOf("date").toDate();if($condition$$.tu_ngay){let $tu_ngay$$=new Date($condition$$.tu_ngay);$nam$$=$tu_ngay$$.getFullYear();$ngay_dn$$=moment($tu_ngay$$).startOf("year").toDate()}else $nam$$=$ngay$$.getFullYear(),$ngay_dn$$=moment($ngay$$).startOf("year").toDate();let $id_app$$=$condition$$.id_app;return new Promise(($resolve$$,$reject$$)=>{async.parallel({dn:$callback$$=>{setImmediate(()=>{const $c_dk$$={id_app:$id_app$$,nam:$nam$$};
|
|
4
|
-
$ma_kho$$&&($c_dk$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($c_dk$$.ma_dvcs=$ma_dvcs$$);$ma_vt$$&&($c_dk$$.ma_vt=$ma_vt$$);$condition$$.ma_lo&&($c_dk$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($c_dk$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($c_dk$$.ma_tt1=$condition$$.ma_tt1);$condition$$.ma_tt2&&($c_dk$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($c_dk$$.ma_tt3=$condition$$.ma_tt3);$condition$$.ma_kh&&($c_dk$$.ma_kh=$condition$$.ma_kh);cdvt.find($c_dk$$).lean().then($results$$=>{$callback$$(null,
|
|
5
|
-
$results$$)}).catch($error$$=>{$callback$$($error$$)})})},ps:$callback$$=>{setImmediate(()=>{const $query$$={id_app:$id_app$$,ngay_ct:{$gte:$ngay_dn$$,$lte:$ngay$$}};$ma_kho$$&&($query$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($query$$.ma_dvcs=$ma_dvcs$$);$ma_vt$$&&($query$$.ma_vt=$ma_vt$$);$condition$$.ma_lo&&($query$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($query$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($query$$.ma_tt1=$condition$$.ma_tt1);$condition$$.ma_tt2&&($query$$.ma_tt2=$condition$$.ma_tt2);
|
|
6
|
-
$condition$$.ma_tt3&&($query$$.ma_tt3=$condition$$.ma_tt3);$condition$$.id_ct&&($query$$.id_ct={$ne:$condition$$.id_ct});$condition$$.ma_kh&&($query$$.ma_kh=$condition$$.ma_kh);sokho.find($query$$).lean().then($pss$$=>{$pss$$=$pss$$.map($ps$$=>{$ps$$.sl_nhap=utils.round($ps$$.sl_nhap_qd,4);$ps$$.sl_xuat=utils.round($ps$$.sl_xuat_qd,4);return $ps$$});$callback$$(null,$pss$$)}).catch($error$$=>{$callback$$($error$$)})})}},($data_error$$,$groupBy_results$$)=>{if($data_error$$)return $fn$$($data_error$$),
|
|
7
|
-
$reject$$(Error($data_error$$));$data_error$$=$groupBy_results$$.dn.concat($groupBy_results$$.ps).concat($groupBy_results$$.ton_kho_mac_dinh).concat($groupBy_results$$.hanmucton);($groupBy_results$$=$condition$$.groupBy||$condition$$.groupby)||($groupBy_results$$=["ma_vt"]);if(underscore.isString($groupBy_results$$))if($groupBy_results$$.indexOf("[")>=0)try{$groupBy_results$$=JSON.parse($groupBy_results$$)}catch($e$$){console.error($e$$)}else $groupBy_results$$=$groupBy_results$$.split(",");$data_error$$.groupBy($groupBy_results$$,
|
|
8
|
-
"sl_nhap sl_xuat ton00 du00 tien_nhap tien_xuat ton_kho_mac_dinh ton_toi_thieu ton_toi_da".split(" "),($e$$,$groups$$)=>{if($e$$)return $fn$$($e$$),$reject$$(Error($e$$));setImmediate(()=>{for(let $r$$ of $groups$$)$r$$.ton00=utils.round($r$$.ton00+$r$$.sl_nhap-$r$$.sl_xuat,4),$r$$.du00=Math.roundBy($r$$.du00,0)+Math.roundBy($r$$.tien_nhap,0)-Math.roundBy($r$$.tien_xuat,0),$r$$.sl_nhap=0,$r$$.sl_xuat=0,$r$$.tien_nhap=0,$r$$.tien_xuat=0,$r$$.ton=$r$$.ton00,$r$$.du=$r$$.du00;$fn$$(null,$groups$$);$resolve$$($groups$$)})})})})};
|
|
1
|
+
const _0x324e8f=_0xc37e;(function(_0x5c3967,_0x569c5f){const _0x360e37=_0xc37e,_0x41a49f=_0x5c3967();while(!![]){try{const _0x5aabcb=-parseInt(_0x360e37(0x1cd))/0x1*(parseInt(_0x360e37(0x17a))/0x2)+parseInt(_0x360e37(0x1cc))/0x3*(parseInt(_0x360e37(0x190))/0x4)+parseInt(_0x360e37(0x1c0))/0x5+parseInt(_0x360e37(0x163))/0x6+-parseInt(_0x360e37(0x1a7))/0x7*(parseInt(_0x360e37(0x187))/0x8)+parseInt(_0x360e37(0x1d6))/0x9*(-parseInt(_0x360e37(0x17f))/0xa)+-parseInt(_0x360e37(0x1a5))/0xb*(parseInt(_0x360e37(0x1de))/0xc);if(_0x5aabcb===_0x569c5f)break;else _0x41a49f['push'](_0x41a49f['shift']());}catch(_0x55d756){_0x41a49f['push'](_0x41a49f['shift']());}}}(_0x5402,0x4b93e));const cdvt=global['getModel'](_0x324e8f(0x1b1)),sokho=global[_0x324e8f(0x16d)]('sokhonpp'),utils=require(_0x324e8f(0x1ab)),async=require(_0x324e8f(0x194)),underscore=require(_0x324e8f(0x1bb)),moment=require('moment');function _0xc37e(_0x398043,_0x1c7241){const _0x54026c=_0x5402();return _0xc37e=function(_0xc37e4f,_0x471988){_0xc37e4f=_0xc37e4f-0x155;let _0x2c7012=_0x54026c[_0xc37e4f];if(_0xc37e['RJXNEX']===undefined){var _0x44d3c4=function(_0x226d75){const _0x1522be='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7a259a='',_0x2e9855='';for(let _0x3c3ac3=0x0,_0x215bd9,_0xbe8e13,_0x3eb802=0x0;_0xbe8e13=_0x226d75['charAt'](_0x3eb802++);~_0xbe8e13&&(_0x215bd9=_0x3c3ac3%0x4?_0x215bd9*0x40+_0xbe8e13:_0xbe8e13,_0x3c3ac3++%0x4)?_0x7a259a+=String['fromCharCode'](0xff&_0x215bd9>>(-0x2*_0x3c3ac3&0x6)):0x0){_0xbe8e13=_0x1522be['indexOf'](_0xbe8e13);}for(let _0x430c66=0x0,_0x166edd=_0x7a259a['length'];_0x430c66<_0x166edd;_0x430c66++){_0x2e9855+='%'+('00'+_0x7a259a['charCodeAt'](_0x430c66)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e9855);};_0xc37e['NZtVYN']=_0x44d3c4,_0x398043=arguments,_0xc37e['RJXNEX']=!![];}const _0x4ddd56=_0x54026c[0x0],_0x148f39=_0xc37e4f+_0x4ddd56,_0x2a8cc3=_0x398043[_0x148f39];return!_0x2a8cc3?(_0x2c7012=_0xc37e['NZtVYN'](_0x2c7012),_0x398043[_0x148f39]=_0x2c7012):_0x2c7012=_0x2a8cc3,_0x2c7012;},_0xc37e(_0x398043,_0x1c7241);}function _0x5402(){const _0x3fd559=['ueHvu0i','AwrFyxbW','BwfFDhqX','s3LYCNa','qNzpvvm','zgf0zq','C3rHCNrpzG','CgfYywXSzwW','ntK3mKn6rhb1Cq','qLHhtg0','veDTA3u','CNnOqLK','CM91BMq','mJi3mJmWAxPhC2DS','Dg9Ux2TOB19TywnFzgLUAa','Dg9U','sw5ZAwe','uMfrwe0','yxPvseK','s2Ldz0i','EgzPu28','mJy4otzVsvn0r0u','uNrYCeO','B2f3A04','q2PtA2m','C3bSAxq','ugXby2u','DMfxCxu','sxjKtfq','DffXEKK','ntC5ntzKve9mEfe','yvrzuNi','CgfYC2u','BMjLD3m','yxn5BMm','B0r5Cxu','Dg9Umda','mNW0Fdn8nxWWFdD8mxW2','AgfUx3nK','AxntDhjPBMC','y21KwfG','z2v0rNvSBfLLyxi','zg1Vse8','v25fswu','BwfFDhqZ','r3Dwrue','BvfOAfi','r0vWseu','yuftwuq','zw5Kt2y','BwPjB0i','ntv6tNj1qxe','D2fIvfO','mZCXzhDNsxzy','qwnuu1G','EeLKBxe','AensuNK','lI91DgLSCW','z1Lxthq','q2jJrLm','Bwzkr1e','s0jHCfK','BwfFzhzJCW','y2r2Dg5WCa','qM9zyu8','ChvJzw4','y2f0y2G','qxH3tvi','tw9WEva','BMDHEq','rMHOu0S','zhuWma','tKjdAKO','Dw5KzxjZy29Yzq','C2zSqK8','tMPcAvG','BwfFDNq','Dg9Ux3rVAv9Kyq','mJGWmdyZmgvXt0n1sG','AgfUBxvJDg9U','vMrNy3a','uefvChq','rxDgD0i','BwfW','tKjyDKe','z3n0z1O','C2XFEhvHDf9Xza','AKrWDuC','AwnyvLm','DgHrr3u','ndvwC0n4s1i','mtC4sKLurNn1','DgLLBL9UAgfW','r0fmr1a','zevjCvq','weXWyNu','BgvUz3rO','zvLntKy','rLLoEgi','r05vu1O','mZzXsfjksKy','zgvUx25NyxK','qKjAtLq','tgDjEw8','DvHXwLO','wLnLt1G','AgjVtMO','qLPQDfu','ntu3mdr6BLPjq1O','CwjZuui','DgLLBL94Dwf0','uxLOy3O','yKjKqvm','BwfFBg8','txbeBuO','ueHlvNi','yxnZAwDU','wKPbthm','Dg9eyxrL','Aw5KzxHpzG','sxjvDha','y29Uy2f0','zKPbzeS','BwfFDhqY','CKvmD1u','sxHwBMG','CwXMqw8','zxjYB3i','uwvsvve','s05wAMu','mJeZntqWnMjlC0XvzW','DxnMwxG','rg9Nuwu','BwfFA2G','s1LWq24','Dg9Ux3rVAv90AgLLDq','C2XFEhvHDa','C2XFBMHHCa','z3jVDxbcEq','CvHcAfK','z2v0tw9KzwW','tNzHv0W','DhvFBMDHEq','CM91BMrcEq','AwrFy3q'];_0x5402=function(){return _0x3fd559;};return _0x5402();}module['exports']=async(_0x637e0a,_0x329aba)=>{const _0x5bc81e=_0x324e8f,_0x4e301b={'mQhhR':function(_0x287f70,_0x52df65,_0x2f6187){return _0x287f70(_0x52df65,_0x2f6187);},'GwVEA':function(_0x570c76,_0x503263){return _0x570c76(_0x503263);},'AcTSX':function(_0x559ba6,_0x1b321a){return _0x559ba6(_0x1b321a);},'RaQXM':function(_0x612cbd,_0x5aa6d2){return _0x612cbd(_0x5aa6d2);},'NBCjJ':function(_0x58dea5,_0x5507d8){return _0x58dea5(_0x5507d8);},'RJUOT':_0x5bc81e(0x15b),'fECrT':_0x5bc81e(0x1e4),'MopyP':_0x5bc81e(0x1ad),'PHUSB':'year','OIwCr':function(_0x54ec78,_0x30ac5e){return _0x54ec78(_0x30ac5e);},'gYWLt':_0x5bc81e(0x1be),'rcoCu':function(_0x42e70a,_0x175a0f){return _0x42e70a>=_0x175a0f;},'qlfAo':_0x5bc81e(0x1ca),'Qpbwl':_0x5bc81e(0x17d),'XLpbu':_0x5bc81e(0x161),'WsCyE':_0x5bc81e(0x16a),'sHIXm':'sl_xuat','YlXkb':_0x5bc81e(0x196),'NoOtr':'du00','PlAce':_0x5bc81e(0x1ce),'ksRHU':_0x5bc81e(0x1e0),'BoYaO':_0x5bc81e(0x180),'oawkN':_0x5bc81e(0x168),'KNVje':_0x5bc81e(0x1bf),'KYpCn':_0x5bc81e(0x18f),'thQGu':_0x5bc81e(0x159),'yFwrf':_0x5bc81e(0x1a4),'azUHI':function(_0x4cfb91,_0x45df0b){return _0x4cfb91-_0x45df0b;},'KXBRn':function(_0x4db122,_0x31d254){return _0x4db122+_0x31d254;},'QryXi':_0x5bc81e(0x19a),'eYMNF':_0x5bc81e(0x175),'bBdAS':function(_0x2df222,_0x4decd5){return _0x2df222>_0x4decd5;},'BXGLm':function(_0x23c19b,_0x28c615){return _0x23c19b==_0x28c615;},'GNUSZ':function(_0x25a350,_0x332d97){return _0x25a350===_0x332d97;},'KBapY':_0x5bc81e(0x1a6),'kjJCR':_0x5bc81e(0x1aa),'vaWqu':_0x5bc81e(0x177),'mfJGQ':'Insia','rELwU':function(_0x5b9927,_0x2095d6){return _0x5b9927!==_0x2095d6;},'LgIyo':_0x5bc81e(0x1d8)};if(!_0x329aba)_0x329aba=()=>{};!_0x637e0a[_0x5bc81e(0x1b7)]&&_0x637e0a[_0x5bc81e(0x1d7)]&&(_0x637e0a[_0x5bc81e(0x1b7)]=_0x637e0a[_0x5bc81e(0x1d7)]);let _0x35034d=_0x637e0a[_0x5bc81e(0x1b0)],_0x488a56=_0x637e0a['ma_kho'],_0xbc3444=_0x637e0a[_0x5bc81e(0x1be)];if(underscore[_0x5bc81e(0x199)](_0xbc3444)&&_0xbc3444['indexOf']('[')>=0x0&&_0x4e301b[_0x5bc81e(0x1e2)](_0xbc3444[_0x5bc81e(0x158)](']'),0x0))try{_0xbc3444=JSON[_0x5bc81e(0x192)](_0xbc3444);if(_0x4e301b[_0x5bc81e(0x17b)](_0xbc3444[_0x5bc81e(0x1d2)],0x0))_0xbc3444=undefined;}catch(_0x5d962a){_0x4e301b['GNUSZ'](_0x4e301b[_0x5bc81e(0x1af)],_0x4e301b['kjJCR'])?_0x32481a[_0x5bc81e(0x160)](_0x3a5eba):console[_0x5bc81e(0x160)](_0x5d962a);}if(_0xbc3444&&underscore['isArray'](_0xbc3444)){let _0x598e46=Object[_0x5bc81e(0x155)](_0xbc3444);_0xbc3444={'$in':_0x598e46};}let _0x34e332,_0x15bfed,_0x21886c;_0x34e332=moment(_0x637e0a['ngay'])[_0x5bc81e(0x1a3)](_0x4e301b[_0x5bc81e(0x18d)])[_0x5bc81e(0x157)]();if(_0x637e0a['tu_ngay']){if(_0x4e301b[_0x5bc81e(0x1d5)](_0x5bc81e(0x182),_0x4e301b[_0x5bc81e(0x1ae)])){let _0x5e9b9b=new Date(_0x637e0a[_0x5bc81e(0x16f)]);_0x15bfed=_0x5e9b9b[_0x5bc81e(0x19b)](),_0x21886c=_0x4e301b[_0x5bc81e(0x1a8)](moment,_0x5e9b9b)[_0x5bc81e(0x178)](_0x4e301b[_0x5bc81e(0x172)])[_0x5bc81e(0x157)]();}else{const _0x4a8ae8={'aTYRr':_0x5bc81e(0x197),'IxVnh':function(_0x3e421a,_0x2876e0){return _0x3e421a+_0x2876e0;},'WnEIe':function(_0x511494,_0x3850ba,_0x2dbae6){const _0x3facaf=_0x5bc81e;return _0x4e301b[_0x3facaf(0x1a0)](_0x511494,_0x3850ba,_0x2dbae6);},'ByDmt':function(_0x2fd30b,_0x5dd83a){return _0x2fd30b(_0x5dd83a);}};if(_0x1401ba)return _0x4e301b[_0x5bc81e(0x19f)](_0x3a975e,_0x284555),_0x4e301b[_0x5bc81e(0x1a8)](_0x5f13de,new _0xde371b(_0x3bda7f));_0x2f1938(()=>{const _0x24c068=_0x5bc81e;for(let _0x47296d of _0x2c4b36){const _0x4380ca=_0x4a8ae8[_0x24c068(0x191)][_0x24c068(0x18b)]('|');let _0x258d23=0x0;while(!![]){switch(_0x4380ca[_0x258d23++]){case'0':_0x47296d[_0x24c068(0x1ce)]=0x0;continue;case'1':_0x47296d[_0x24c068(0x181)]=_0x47296d[_0x24c068(0x196)];continue;case'2':_0x47296d['ton00']=_0xc90428[_0x24c068(0x17e)](_0x4a8ae8[_0x24c068(0x15e)](_0x47296d[_0x24c068(0x196)],_0x47296d['sl_nhap'])-_0x47296d[_0x24c068(0x169)],0x4);continue;case'3':_0x47296d[_0x24c068(0x16a)]=0x0;continue;case'4':_0x47296d['du00']=_0x4a8ae8['IxVnh'](_0x57446d['roundBy'](_0x47296d[_0x24c068(0x1b9)],0x0),_0x144774[_0x24c068(0x170)](_0x47296d[_0x24c068(0x1ce)],0x0))-_0x10040a[_0x24c068(0x170)](_0x47296d[_0x24c068(0x1e0)],0x0);continue;case'5':_0x47296d[_0x24c068(0x169)]=0x0;continue;case'6':_0x47296d['du']=_0x47296d[_0x24c068(0x1b9)];continue;case'7':_0x47296d['tien_xuat']=0x0;continue;}break;}}_0x4a8ae8[_0x24c068(0x19d)](_0x5cbbac,null,_0x5ca756),_0x4a8ae8['ByDmt'](_0xc2d6c3,_0x34ed7a);});}}else{if(_0x4e301b[_0x5bc81e(0x15d)](_0x4e301b[_0x5bc81e(0x1d9)],_0x4e301b[_0x5bc81e(0x1d9)]))return _0x4e301b[_0x5bc81e(0x19f)](_0x10eb81,_0x3dfb3e),_0x4e301b[_0x5bc81e(0x183)](_0xe10216,new _0x33b581(_0x263c43));else _0x15bfed=_0x34e332[_0x5bc81e(0x19b)](),_0x21886c=moment(_0x34e332)[_0x5bc81e(0x178)](_0x4e301b[_0x5bc81e(0x172)])[_0x5bc81e(0x157)]();}let _0x335c14=_0x637e0a[_0x5bc81e(0x173)];return new Promise((_0x2a03c8,_0x31c7a2)=>{const _0x15932c=_0x5bc81e,_0x52c545={'GALGP':function(_0x3cb0f8,_0x526ad9){return _0x3cb0f8!==_0x526ad9;},'ZJALs':_0x4e301b[_0x15932c(0x167)],'GEpHE':function(_0x4a4c82,_0x1d2416){return _0x4a4c82(_0x1d2416);},'pucen':_0x4e301b[_0x15932c(0x1cb)],'NjBiX':function(_0x2b199f,_0x3096ab,_0x5d5c53){const _0x429eca=_0x15932c;return _0x4e301b[_0x429eca(0x1a0)](_0x2b199f,_0x3096ab,_0x5d5c53);},'nbews':function(_0x2b6842,_0x70c9d2){const _0x178727=_0x15932c;return _0x4e301b[_0x178727(0x1a8)](_0x2b6842,_0x70c9d2);},'DogQe':_0x4e301b['yFwrf'],'FhhSK':function(_0x407355,_0x5bf485){const _0x373192=_0x15932c;return _0x4e301b[_0x373192(0x184)](_0x407355,_0x5bf485);},'Vdgcp':function(_0x2b39f0,_0x501db9){return _0x4e301b['KXBRn'](_0x2b39f0,_0x501db9);},'xfiSo':_0x4e301b['QryXi'],'FYNxb':_0x15932c(0x1c4),'oDyqu':function(_0x47a9b5,_0x4c78ac){const _0x369bed=_0x15932c;return _0x4e301b[_0x369bed(0x183)](_0x47a9b5,_0x4c78ac);},'XBydm':function(_0x33cab1,_0xed38ba){return _0x4e301b['azUHI'](_0x33cab1,_0xed38ba);},'aASYD':function(_0x444e9a,_0x3c5e78){const _0x4b9db1=_0x15932c;return _0x4e301b[_0x4b9db1(0x184)](_0x444e9a,_0x3c5e78);}};_0x4e301b[_0x15932c(0x1d3)]===_0x4e301b[_0x15932c(0x1d3)]?async[_0x15932c(0x179)]({'dn':_0x4d6cd9=>{const _0x3ca3bc=_0x15932c,_0x1f6a3e={'NBXvA':function(_0x221bfe,_0x580141){const _0x5c5325=_0xc37e;return _0x4e301b[_0x5c5325(0x1ba)](_0x221bfe,_0x580141);},'BZjtU':function(_0xcc3f41,_0x114fae,_0x1e305f){return _0xcc3f41(_0x114fae,_0x1e305f);},'qXBhY':function(_0x583e57,_0x12876c){return _0x583e57===_0x12876c;},'FCEew':_0x4e301b['RJUOT'],'ZSeOX':_0x4e301b['fECrT'],'AxwMR':_0x4e301b[_0x3ca3bc(0x1b6)]};_0x4e301b[_0x3ca3bc(0x1a8)](setImmediate,()=>{const _0x46e47b=_0x3ca3bc,_0xc2ca49={'IrdLT':function(_0x38ec8c,_0x2ccda5){const _0x9fae9e=_0xc37e;return _0x1f6a3e[_0x9fae9e(0x1c6)](_0x38ec8c,_0x2ccda5);},'usfYx':function(_0x5bdacd,_0x2a3e24){return _0x5bdacd!==_0x2a3e24;},'xIdmq':_0x46e47b(0x1dc)},_0x2f1247={'id_app':_0x335c14,'nam':_0x15bfed};_0x488a56&&(_0x1f6a3e[_0x46e47b(0x16c)](_0x1f6a3e['FCEew'],_0x46e47b(0x15b))?_0x2f1247['ma_kho']=_0x488a56:_0x1f6a3e[_0x46e47b(0x1c6)](_0x552922,_0x3e8655));_0x35034d&&(_0x1f6a3e[_0x46e47b(0x16c)](_0x1f6a3e[_0x46e47b(0x1db)],_0x1f6a3e['ZSeOX'])?_0x2f1247[_0x46e47b(0x1b0)]=_0x35034d:_0x7a259a[_0x46e47b(0x1b7)]=_0x2e9855['den_ngay']);if(_0xbc3444){if(_0x1f6a3e[_0x46e47b(0x1b5)]===_0x46e47b(0x1c7))return _0xc2ca49['IrdLT'](_0x155f0b,_0x206c50),_0xc2ca49[_0x46e47b(0x18e)](_0x4f0388,new _0x54912f(_0x16160f));else _0x2f1247['ma_vt']=_0xbc3444;}if(_0x637e0a[_0x46e47b(0x1e3)])_0x2f1247[_0x46e47b(0x1e3)]=_0x637e0a[_0x46e47b(0x1e3)];if(_0x637e0a[_0x46e47b(0x198)])_0x2f1247[_0x46e47b(0x198)]=_0x637e0a['han_sd'];if(_0x637e0a[_0x46e47b(0x174)])_0x2f1247[_0x46e47b(0x174)]=_0x637e0a[_0x46e47b(0x174)];if(_0x637e0a[_0x46e47b(0x15c)])_0x2f1247[_0x46e47b(0x15c)]=_0x637e0a[_0x46e47b(0x15c)];if(_0x637e0a['ma_tt3'])_0x2f1247[_0x46e47b(0x19e)]=_0x637e0a[_0x46e47b(0x19e)];if(_0x637e0a[_0x46e47b(0x166)])_0x2f1247[_0x46e47b(0x166)]=_0x637e0a[_0x46e47b(0x166)];cdvt['find'](_0x2f1247)['lean']()['then'](_0x7bff5b=>{const _0x185f0f=_0x46e47b;_0x1f6a3e[_0x185f0f(0x1dd)](_0x4d6cd9,null,_0x7bff5b);})[_0x46e47b(0x1b4)](_0x4137f8=>{const _0x1bb151=_0x46e47b;_0xc2ca49[_0x1bb151(0x164)](_0xc2ca49['xIdmq'],_0xc2ca49[_0x1bb151(0x1a9)])?_0x228f80=_0x5e0127['parse'](_0x204295):_0x4d6cd9(_0x4137f8);});});},'ps':_0x473bd5=>{const _0x5cc750=_0x15932c,_0x1224a9={'CjSkc':function(_0x4bf9da,_0x328a93){const _0x328a4c=_0xc37e;return _0x52c545[_0x328a4c(0x1a1)](_0x4bf9da,_0x328a93);},'TGmku':function(_0x34cde3,_0x25bb3e){return _0x34cde3===_0x25bb3e;},'PAUpt':_0x52c545[_0x5cc750(0x1b3)],'dmoHO':function(_0x8e324f,_0x1f84a3,_0x1bd293){const _0x217ac5=_0x5cc750;return _0x52c545[_0x217ac5(0x1bd)](_0x8e324f,_0x1f84a3,_0x1bd293);},'KiCgB':function(_0x3d1338,_0x38ca62){const _0x116f44=_0x5cc750;return _0x52c545[_0x116f44(0x193)](_0x3d1338,_0x38ca62);}};_0x52c545['GALGP'](_0x52c545[_0x5cc750(0x165)],'lDgUC')?_0x52c545[_0x5cc750(0x1a1)](setImmediate,()=>{const _0x316986=_0x5cc750,_0x45729e={'id_app':_0x335c14,'ngay_ct':{'$gte':_0x21886c,'$lte':_0x34e332}};_0x488a56&&(_0x45729e['ma_kho']=_0x488a56);_0x35034d&&(_0x45729e[_0x316986(0x1b0)]=_0x35034d);_0xbc3444&&(_0x45729e[_0x316986(0x1be)]=_0xbc3444);if(_0x637e0a[_0x316986(0x1e3)])_0x45729e[_0x316986(0x1e3)]=_0x637e0a[_0x316986(0x1e3)];if(_0x637e0a[_0x316986(0x198)])_0x45729e[_0x316986(0x198)]=_0x637e0a[_0x316986(0x198)];if(_0x637e0a[_0x316986(0x174)])_0x45729e[_0x316986(0x174)]=_0x637e0a[_0x316986(0x174)];if(_0x637e0a[_0x316986(0x15c)])_0x45729e[_0x316986(0x15c)]=_0x637e0a[_0x316986(0x15c)];if(_0x637e0a['ma_tt3'])_0x45729e['ma_tt3']=_0x637e0a[_0x316986(0x19e)];_0x637e0a[_0x316986(0x171)]&&(_0x52c545[_0x316986(0x1cf)](_0x52c545[_0x316986(0x156)],_0x52c545['ZJALs'])?_0x1224a9[_0x316986(0x18a)](_0x39ea08,_0x538410):_0x45729e[_0x316986(0x171)]={'$ne':_0x637e0a[_0x316986(0x171)]});if(_0x637e0a['ma_kh'])_0x45729e[_0x316986(0x166)]=_0x637e0a[_0x316986(0x166)];sokho['find'](_0x45729e)['lean']()['then'](_0x1d6b80=>{const _0x50cd1d=_0x316986,_0x1b8ec0={'PHKVr':function(_0x3e427e,_0x53850d){const _0x118ecd=_0xc37e;return _0x1224a9[_0x118ecd(0x17c)](_0x3e427e,_0x53850d);},'sflBO':_0x1224a9[_0x50cd1d(0x1c3)]};_0x1d6b80=_0x1d6b80[_0x50cd1d(0x1c5)](_0x201691=>{const _0x8fddaf=_0x50cd1d;if(_0x1b8ec0[_0x8fddaf(0x1e5)](_0x1b8ec0[_0x8fddaf(0x1bc)],'fQPTt'))_0x5d0112[_0x8fddaf(0x1be)]=_0xc95b2d;else return _0x201691[_0x8fddaf(0x16a)]=utils['round'](_0x201691['sl_nhap_qd'],0x4),_0x201691[_0x8fddaf(0x169)]=utils[_0x8fddaf(0x17e)](_0x201691[_0x8fddaf(0x1c8)],0x4),_0x201691;}),_0x1224a9[_0x50cd1d(0x19c)](_0x473bd5,null,_0x1d6b80);})[_0x316986(0x1b4)](_0x4827dd=>{const _0x5c0337=_0x316986;_0x1224a9[_0x5c0337(0x185)](_0x473bd5,_0x4827dd);});}):_0x3aedce=_0x2ba11b[_0x5cc750(0x18b)](',');}},(_0xa7bf98,_0x15d367)=>{const _0x523793=_0x15932c,_0x1962d4={'dEIqT':function(_0x4ce346,_0x1c3264){const _0x177e7e=_0xc37e;return _0x4e301b[_0x177e7e(0x1a8)](_0x4ce346,_0x1c3264);},'jDpuG':_0x4e301b[_0x523793(0x172)]};if(_0xa7bf98)return _0x4e301b['OIwCr'](_0x329aba,_0xa7bf98),_0x31c7a2(new Error(_0xa7bf98));let _0x4c4497=_0x15d367['dn']['concat'](_0x15d367['ps'])[_0x523793(0x15a)](_0x15d367[_0x523793(0x180)])[_0x523793(0x15a)](_0x15d367[_0x523793(0x1c1)]),_0x50bd98=_0x637e0a[_0x523793(0x16b)]||_0x637e0a['groupby'];if(!_0x50bd98)_0x50bd98=[_0x4e301b[_0x523793(0x1ac)]];if(underscore['isString'](_0x50bd98)){if(_0x4e301b['rcoCu'](_0x50bd98['indexOf']('['),0x0)){if(_0x523793(0x1e1)!==_0x4e301b[_0x523793(0x15f)])try{_0x4e301b['Qpbwl']!==_0x4e301b[_0x523793(0x1d1)]?_0x50bd98=JSON[_0x523793(0x192)](_0x50bd98):_0xa3823a[_0x523793(0x160)](_0x45b5f6);}catch(_0x5b4a80){console['error'](_0x5b4a80);}else{let _0x181fe6=new _0x510332(_0x4af594[_0x523793(0x16f)]);_0x1afdfe=_0x181fe6[_0x523793(0x19b)](),_0x4e5e8e=_0x1962d4[_0x523793(0x1d0)](_0x28f623,_0x181fe6)[_0x523793(0x178)](_0x1962d4[_0x523793(0x1c9)])[_0x523793(0x157)]();}}else _0x50bd98=_0x50bd98[_0x523793(0x18b)](',');}let _0x3d6e3b=[_0x4e301b['WsCyE'],_0x4e301b['sHIXm'],_0x4e301b['YlXkb'],_0x4e301b['NoOtr'],_0x4e301b[_0x523793(0x18c)],_0x4e301b['ksRHU'],_0x4e301b[_0x523793(0x1b2)],_0x4e301b[_0x523793(0x189)],_0x4e301b[_0x523793(0x162)]];_0x4c4497['groupBy'](_0x50bd98,_0x3d6e3b,(_0x28aedf,_0x5a4c4f)=>{const _0x46b3b2=_0x523793,_0x4b97bf={'BvOUS':function(_0x5d5924,_0x47c51c){const _0x1cf4da=_0xc37e;return _0x52c545[_0x1cf4da(0x1b8)](_0x5d5924,_0x47c51c);},'RtrpJ':function(_0x2efcc2,_0x559c1e){return _0x2efcc2+_0x559c1e;},'qbsQB':function(_0x2881d4,_0x6b1234){const _0x8608f4=_0xc37e;return _0x52c545[_0x8608f4(0x1b8)](_0x2881d4,_0x6b1234);},'uXqZZ':function(_0x3701bf,_0x1f8ae4){const _0x208df7=_0xc37e;return _0x52c545[_0x208df7(0x1c2)](_0x3701bf,_0x1f8ae4);},'NvaWL':function(_0x39babf,_0xb9230e,_0x3e967f){const _0x3689c3=_0xc37e;return _0x52c545[_0x3689c3(0x1bd)](_0x39babf,_0xb9230e,_0x3e967f);}};if(_0x52c545[_0x46b3b2(0x1cf)](_0x52c545[_0x46b3b2(0x186)],_0x52c545[_0x46b3b2(0x1d4)])){if(_0x28aedf)return _0x329aba(_0x28aedf),_0x52c545['oDyqu'](_0x31c7a2,new Error(_0x28aedf));_0x52c545[_0x46b3b2(0x195)](setImmediate,()=>{const _0x39bea3=_0x46b3b2;for(let _0x5ffdae of _0x5a4c4f){_0x5ffdae[_0x39bea3(0x196)]=utils['round'](_0x4b97bf[_0x39bea3(0x176)](_0x4b97bf[_0x39bea3(0x188)](_0x5ffdae[_0x39bea3(0x196)],_0x5ffdae[_0x39bea3(0x16a)]),_0x5ffdae[_0x39bea3(0x169)]),0x4),_0x5ffdae[_0x39bea3(0x1b9)]=_0x4b97bf[_0x39bea3(0x1df)](_0x4b97bf[_0x39bea3(0x1da)](Math['roundBy'](_0x5ffdae[_0x39bea3(0x1b9)],0x0),Math[_0x39bea3(0x170)](_0x5ffdae[_0x39bea3(0x1ce)],0x0)),Math[_0x39bea3(0x170)](_0x5ffdae['tien_xuat'],0x0)),_0x5ffdae[_0x39bea3(0x16a)]=0x0,_0x5ffdae['sl_xuat']=0x0,_0x5ffdae[_0x39bea3(0x1ce)]=0x0,_0x5ffdae[_0x39bea3(0x1e0)]=0x0,_0x5ffdae['ton']=_0x5ffdae[_0x39bea3(0x196)],_0x5ffdae['du']=_0x5ffdae[_0x39bea3(0x1b9)];}_0x4b97bf[_0x39bea3(0x16e)](_0x329aba,null,_0x5a4c4f),_0x2a03c8(_0x5a4c4f);});}else try{_0xd1cf1c=_0x157ba6[_0x46b3b2(0x192)](_0x32e448);}catch(_0x4896b5){_0x500d0e[_0x46b3b2(0x160)](_0x4896b5);}});}):(_0x300dfb[_0x15932c(0x196)]=_0x37c935[_0x15932c(0x17e)](_0x52c545['XBydm'](_0x52c545['Vdgcp'](_0xf32c6e['ton00'],_0x3d9885[_0x15932c(0x16a)]),_0x1b538b[_0x15932c(0x169)]),0x4),_0x25dc0a['du00']=_0x52c545[_0x15932c(0x1a2)](_0x30a52c['roundBy'](_0x39dff8['du00'],0x0)+_0x219338[_0x15932c(0x170)](_0x53f8a5[_0x15932c(0x1ce)],0x0),_0x576f39[_0x15932c(0x170)](_0x685b87[_0x15932c(0x1e0)],0x0)),_0x3d21ec[_0x15932c(0x16a)]=0x0,_0x2c60df[_0x15932c(0x169)]=0x0,_0xe77300[_0x15932c(0x1ce)]=0x0,_0x10a1bb[_0x15932c(0x1e0)]=0x0,_0x3785e2['ton']=_0x49fc83[_0x15932c(0x196)],_0x31a7de['du']=_0xd83910['du00']);});};
|
package/server/libs/ckvttt.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
const cdvt=global.getModel("cdvt"),dmvt=global.getModel("dmvt"),sokho=global.getModel("sokhott"),ckvtcapphat=require("./ckvtcapphat"),hanmucton=global.getModel("hanmucton"),utils=require("./utils"),async=require("async"),underscore=require("underscore"),moment=require("moment");
|
|
2
|
-
module.exports=async($condition$$,$fn$$)=>{$fn$$||=()=>{};!$condition$$.ngay&&$condition$$.den_ngay&&($condition$$.ngay=$condition$$.den_ngay);let $ma_dvcs$$=$condition$$.ma_dvcs,$ma_kho$$=$condition$$.ma_kho,$ma_vt$$=$condition$$.ma_vt;$ma_vt$$&&underscore.isArray($ma_vt$$)&&($ma_vt$$={$in:Object.assign($ma_vt$$)});let $ngay$$,$nam$$,$ngay_dn$$;$ngay$$=moment($condition$$.ngay).endOf("date").toDate();if($condition$$.tu_ngay){let $tu_ngay$$=new Date($condition$$.tu_ngay);$nam$$=$tu_ngay$$.getFullYear();
|
|
3
|
-
$ngay_dn$$=moment($tu_ngay$$).startOf("year").toDate()}else $nam$$=$ngay$$.getFullYear(),$ngay_dn$$=moment($ngay$$).startOf("year").toDate();let $id_app$$=$condition$$.id_app;return new Promise(($resolve$$,$reject$$)=>{async.series({ckcapphat:$callback$$=>{setImmediate(()=>{ckvtcapphat($condition$$,($e$$,$rs$$)=>{$callback$$($e$$,$rs$$)})})},dn:$callback$$=>{setImmediate(()=>{const $c_dk$$={id_app:$id_app$$,nam:$nam$$};$ma_kho$$&&($c_dk$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($c_dk$$.ma_dvcs=$ma_dvcs$$);
|
|
4
|
-
$ma_vt$$&&($c_dk$$.ma_vt=$ma_vt$$);$condition$$.ma_lo&&($c_dk$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($c_dk$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($c_dk$$.ma_tt1=$condition$$.ma_tt1);$condition$$.ma_tt2&&($c_dk$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($c_dk$$.ma_tt3=$condition$$.ma_tt3);cdvt.find($c_dk$$).lean().then($results$$=>{$callback$$(null,$results$$)}).catch($error$$=>{$callback$$($error$$)})})},hanmucton:$callback$$=>{setImmediate(()=>{const $c_dk$$={id_app:$id_app$$};
|
|
5
|
-
$ma_kho$$&&($c_dk$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($c_dk$$.ma_dvcs=$ma_dvcs$$);$ma_vt$$&&($c_dk$$.ma_vt=$ma_vt$$);$condition$$.ma_lo&&($c_dk$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($c_dk$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($c_dk$$.ma_tt1=$condition$$.ma_tt1);$condition$$.ma_tt2&&($c_dk$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($c_dk$$.ma_tt3=$condition$$.ma_tt3);hanmucton.find($c_dk$$).lean().then($results$$=>{$callback$$(null,$results$$)}).catch($error$$=>{$callback$$($error$$)})})},
|
|
6
|
-
ps:$callback$$=>{setImmediate(()=>{const $query$$={id_app:$id_app$$,ngay_ct:{$gte:$ngay_dn$$,$lte:$ngay$$}};$ma_kho$$&&($query$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($query$$.ma_dvcs=$ma_dvcs$$);$ma_vt$$&&($query$$.ma_vt=$ma_vt$$);$condition$$.ma_lo&&($query$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($query$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($query$$.ma_tt1=$condition$$.ma_tt1);$condition$$.ma_tt2&&($query$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($query$$.ma_tt3=$condition$$.ma_tt3);
|
|
7
|
-
$condition$$.id_ct&&($query$$.id_ct={$ne:$condition$$.id_ct});sokho.find($query$$).lean().then($pss$$=>{$pss$$=$pss$$.map($ps$$=>{$ps$$.sl_nhap=utils.round($ps$$.sl_nhap_qd,4);$ps$$.sl_xuat=utils.round($ps$$.sl_xuat_qd,4);return $ps$$});$callback$$(null,$pss$$)}).catch($error$$=>{$callback$$($error$$)})})},ton_kho_mac_dinh:$callback$$=>{setImmediate(()=>{let $query$$={id_app:$id_app$$,ton_kho_mac_dinh:{$nin:[null,void 0,0]}};$ma_vt$$&&($query$$.ma_vt=$ma_vt$$);dmvt.find($query$$,{ma_vt:1,ton_kho_mac_dinh:1}).lean().then($rs$$=>
|
|
8
|
-
{$callback$$(null,$rs$$)}).catch($e$$=>{console.error($e$$)})})}},($ckcapphat_error$$,$data_results$$)=>{if($ckcapphat_error$$)return $fn$$($ckcapphat_error$$),$reject$$(Error($ckcapphat_error$$));$ckcapphat_error$$=$data_results$$.ckcapphat.map($c$$=>{$c$$.ton00_capphat=$c$$.ton00;$c$$.du00_capphat=$c$$.du00;$c$$.ton00=0;$c$$.du00=0;return $c$$});$data_results$$=$data_results$$.dn.concat($data_results$$.ps).concat($ckcapphat_error$$).concat($data_results$$.ton_kho_mac_dinh).concat($data_results$$.hanmucton);
|
|
9
|
-
($ckcapphat_error$$=$condition$$.groupBy||$condition$$.groupby)||($ckcapphat_error$$=["ma_vt"]);if(underscore.isString($ckcapphat_error$$))if($ckcapphat_error$$.indexOf("[")>=0)try{$ckcapphat_error$$=JSON.parse($ckcapphat_error$$)}catch($e$$){console.error($e$$)}else $ckcapphat_error$$=$ckcapphat_error$$.split(",");$data_results$$.groupBy($ckcapphat_error$$,"sl_nhap sl_xuat ton00 du00 ton00_capphat du00_capphat tien_nhap tien_xuat ton_kho_mac_dinh ton_toi_thieu ton_toi_da".split(" "),($e$$,$groups$$)=>
|
|
10
|
-
{if($e$$)return $fn$$($e$$),$reject$$(Error($e$$));setImmediate(()=>{$condition$$.canh_bao_ton_min&&($groups$$=$groups$$.filter($g$$=>$g$$.ton_toi_thieu&&$g$$.ton_toi_thieu>$g$$.ton00));$condition$$.canh_bao_ton_max&&($groups$$=$groups$$.filter($g$$=>$g$$.ton_toi_da&&$g$$.ton_toi_da<$g$$.ton00));for(let $r$$ of $groups$$)$r$$.ton00=utils.round($r$$.ton00+$r$$.sl_nhap-$r$$.sl_xuat,4),$r$$.du00=Math.roundBy($r$$.du00,0)+Math.roundBy($r$$.tien_nhap,0)-Math.roundBy($r$$.tien_xuat,0),$r$$.sl_nhap=0,$r$$.sl_xuat=
|
|
11
|
-
0,$r$$.tien_nhap=0,$r$$.tien_xuat=0,$r$$.ton=$r$$.ton00-($r$$.ton00_capphat>0?$r$$.ton00_capphat:0),$r$$.du=$r$$.du00-($r$$.du00_capphat>0?$r$$.du00_capphat:0);$fn$$(null,$groups$$);$resolve$$($groups$$)})})})})};
|
|
1
|
+
function _0x443b(){const _0x3ebe8f=['otyWmg9RA2DpqG','zMLUza','zhuWmf9JyxbWAgf0','B2XQD28','DhvFBMDHEq','tMrbDhm','AvbUvMO','zgvUx25NyxK','BNrJBw8','v01Qq2G','z0fAswi','z09tu28','tLjSCwW','BwfFDhqY','mZu5mtq0ofziAM93Aq','qNvvuKW','CKLyv2W','A2DmAfK','whv3suO','C0Dis20','vvHrCLy','BwfFBg8','AwrFyxbW','BhrNDwq','uhHkB2i','u0ritwm','DMLPA00','odb6zNnHBue','AxntDhjPBMC','A3jtD3u','AM1Wq0y','vvf4qwK','y3vOyM8','sxnQuvm','zw5Kt2y','zMLSDgvY','txDSsui','y2fUAf9Iyw9FDg9Ux21PBG','ENbpuK4','AuTxwwO','m3WYFdz8nhW3Fdf8nxWW','yxbkCMu','t2Hfqxi','uwD3C0i','wxjnAMO','v0vRA3G','mtyWntu1meLUEuzuEa','lI91DgLSCW','uuPhuNO','CgDACeW','C2XFEhvHDf9Xza','zgf0zq','C2XFBMHHCa','uhz0zM0','DgLLBL9UAgfW','AxvOy3a','tfftzeC','rw5rsLq','CM91BMq','BwfFDhqZ','zxjYB3i','y2r2Da','shvuA0e','EvfcwNi','C0n5BgO','zgznCNe','BwfFA2HV','BwfFzhzJCW','zwXWz1m','A2fSy0O','vKHZshK','mZm3otKXnu9eDKDdza','mZLpuhnRruu','q1HKANi','Dg9Ux2TOB19TywnFzgLUAa','mtK3mJu1n29NrufKsG','CgfYC2u','s0HSuuC','s2DxtgW','rNvIs3m','yxnZAwDU','t3PJsxi','tgD0vwW','AMjkDeK','z2v0rNvSBfLLyxi','EMTLzKW','vwXpAxO','v09fs0y','zwzvDva','z1vztgi','BwfFDhqX','uw5VEeO','tKXHv3O','y25xv0m','u3j2Ewe','Dg9Ux3rVAv90AgLLDq','qK5cs2i','uMHsuhO','A1rMBfu','Dg9eyxrL','EenQDu8','vhj1r1u','v3jnuKi','BwvPz2m','wg9wBxe','quHcEwW','tgrcDue','EuT4y3K','mtmXote2uMv3AuTV','veT0Dwq','EfH3wNu','q2zQwKq','C2XFEhvHDa','C3bSAxq','qNrAt0O','s1DSruK','z2v0tw9KzwW','Dg9U','BwfFDNq','t2HywKq','BhnNyvG','t1ndyLC','r2fqCNy','qwnKqwO','Dg9Ux3rVAv9Kyq','tKLYC3K','yMrwshO','u0L5zLu','ANLwzNe','Du94Dg8','Dw5KzxjZy29Yzq','u1jtswu','zfbzv3q','rfb0q00','Dg9Umda','uuTJyKW','rvHxyxO','vg1vA1G','DgHLBG','yMrdA04','yMPgChG','txbvBhq','C3rHCNrpzG','AwrFy3q','DLj3Evi','D2HtyNK','AgfUx3nK','BgvHBG','CM91BMrcEq','uun0sNy','mte3mdmYngTJEwnwEa','ANvwrgC','Dg9UmdbFy2fWCgHHDa','uvjnz1a','sw9Atwu','uhbgq20','mtCWzhbbDwTT','rundDum','t3bdEgG','CfvNBfi','B0vNshe','BxnHq1a','AgfUBxvJDg9U','EwvHCG','whfes3O','BwfW','Cg5Rzhm','y29Uy2f0','BMDHEq','vLzkwhm','zxryD3a','C2vYAwvZ','vLnwwgW','rvvdy2i','BNLZtxu','C29RAg90Da','y2fUAf9Iyw9FDg9Ux21HEa','z3jVDxbcEq','rwflBLm','DgLLBL94Dwf0','u0PhAg8','qxzXAuq','uwPjuva','B3HMu1i','EgHVwwC','suDkCK4','zhuWma','zKnjsLK','q0flzgC','s2LAq1K','Aw5KzxHpzG','yxn5BMm','shD0veK','qMPxvMi','ALvstxa','C2XFBMHHCf9Xza','sePAwKS','y2f0y2G'];_0x443b=function(){return _0x3ebe8f;};return _0x443b();}const _0x3f90af=_0x3077;(function(_0x2b2e36,_0x146a44){const _0x584ea1=_0x3077,_0xc7d7ba=_0x2b2e36();while(!![]){try{const _0x3e3a07=parseInt(_0x584ea1(0xf1))/0x1+parseInt(_0x584ea1(0x14f))/0x2+-parseInt(_0x584ea1(0x169))/0x3*(parseInt(_0x584ea1(0x121))/0x4)+-parseInt(_0x584ea1(0xf7))/0x5*(-parseInt(_0x584ea1(0xc7))/0x6)+-parseInt(_0x584ea1(0x168))/0x7+parseInt(_0x584ea1(0x12f))/0x8+parseInt(_0x584ea1(0x16c))/0x9*(-parseInt(_0x584ea1(0x13c))/0xa);if(_0x3e3a07===_0x146a44)break;else _0xc7d7ba['push'](_0xc7d7ba['shift']());}catch(_0x11ee83){_0xc7d7ba['push'](_0xc7d7ba['shift']());}}}(_0x443b,0xdc3ed));function _0x3077(_0x1a62bf,_0x3b09c2){const _0x443bcb=_0x443b();return _0x3077=function(_0x30776e,_0x298766){_0x30776e=_0x30776e-0xb7;let _0x41547d=_0x443bcb[_0x30776e];if(_0x3077['lwlZAn']===undefined){var _0x4587e9=function(_0x1eed08){const _0x49712a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x16d077='',_0x391f4b='';for(let _0x38a2b7=0x0,_0x30d1e7,_0x24b210,_0x4939af=0x0;_0x24b210=_0x1eed08['charAt'](_0x4939af++);~_0x24b210&&(_0x30d1e7=_0x38a2b7%0x4?_0x30d1e7*0x40+_0x24b210:_0x24b210,_0x38a2b7++%0x4)?_0x16d077+=String['fromCharCode'](0xff&_0x30d1e7>>(-0x2*_0x38a2b7&0x6)):0x0){_0x24b210=_0x49712a['indexOf'](_0x24b210);}for(let _0x3782a8=0x0,_0x32bd56=_0x16d077['length'];_0x3782a8<_0x32bd56;_0x3782a8++){_0x391f4b+='%'+('00'+_0x16d077['charCodeAt'](_0x3782a8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x391f4b);};_0x3077['Qajxec']=_0x4587e9,_0x1a62bf=arguments,_0x3077['lwlZAn']=!![];}const _0x2c8489=_0x443bcb[0x0],_0x4871be=_0x30776e+_0x2c8489,_0xb29f0b=_0x1a62bf[_0x4871be];return!_0xb29f0b?(_0x41547d=_0x3077['Qajxec'](_0x41547d),_0x1a62bf[_0x4871be]=_0x41547d):_0x41547d=_0xb29f0b,_0x41547d;},_0x3077(_0x1a62bf,_0x3b09c2);}const cdvt=global[_0x3f90af(0xcf)](_0x3f90af(0x15e)),dmvt=global[_0x3f90af(0xcf)]('dmvt'),sokho=global[_0x3f90af(0xcf)](_0x3f90af(0x10a)),ckvtcapphat=require('./ckvtcapphat'),hanmucton=global[_0x3f90af(0xcf)](_0x3f90af(0xfd)),utils=require(_0x3f90af(0x150)),async=require(_0x3f90af(0x11a)),underscore=require(_0x3f90af(0xdd)),moment=require('moment');module['exports']=async(_0x3340dd,_0x2097a7)=>{const _0x4918d3=_0x3f90af,_0x3ad7d5={'rIXWl':function(_0x4478f0,_0x535761,_0x313f70){return _0x4478f0(_0x535761,_0x313f70);},'NIsNj':_0x4918d3(0xeb),'OhXZD':_0x4918d3(0xf6),'QnoxJ':function(_0x37721f,_0x24460c,_0x3181d7){return _0x37721f(_0x24460c,_0x3181d7);},'SRSIe':function(_0x374414,_0x14ca0d){return _0x374414(_0x14ca0d);},'TruGU':function(_0x274c7b,_0xf59e77){return _0x274c7b===_0xf59e77;},'fWrVx':_0x4918d3(0x166),'XqDKz':_0x4918d3(0x12b),'NIrsy':_0x4918d3(0xcd),'EXWaz':'aGHqe','KWlEI':function(_0x3bf95c,_0x40c37c){return _0x3bf95c(_0x40c37c);},'elpgS':_0x4918d3(0x174),'DwTxg':_0x4918d3(0x149),'KwaVW':function(_0x36a914,_0x42c937){return _0x36a914>_0x42c937;},'kNnqk':function(_0x358aad,_0x1c77c2){return _0x358aad+_0x1c77c2;},'CfjZD':function(_0x2cef25,_0x258b03){return _0x2cef25-_0x258b03;},'zpORN':function(_0x372f98,_0x29f515){return _0x372f98+_0x29f515;},'iPnVj':function(_0x12ab57,_0x5ae6ef,_0x3cd1d6){return _0x12ab57(_0x5ae6ef,_0x3cd1d6);},'gMBkF':_0x4918d3(0xd1),'ZwRiR':function(_0x50daf6,_0x41c624){return _0x50daf6>=_0x41c624;},'IsjQS':_0x4918d3(0xfc),'vPVkB':function(_0x4293ec,_0x400442){return _0x4293ec!==_0x400442;},'iKWYj':'XfaxY','WMjCh':_0x4918d3(0x12d),'RhRPz':_0x4918d3(0x155),'pgZpL':'sl_xuat','QJGRz':_0x4918d3(0xe1),'wiSYp':_0x4918d3(0x115),'AGCDu':_0x4918d3(0xf3),'Homhb':'du00_capphat','iviOK':_0x4918d3(0x157),'WrMRB':_0x4918d3(0x10e),'oEgHq':_0x4918d3(0x16b),'viikM':_0x4918d3(0xba),'meigc':_0x4918d3(0xd7),'kgLhY':_0x4918d3(0xf4),'QKcbL':function(_0x5e6bc4,_0x5b8064){return _0x5e6bc4!==_0x5b8064;},'IGJrN':_0x4918d3(0x111),'Srvya':_0x4918d3(0x145),'IVzUG':'4|0|6|2|3|5|7|1','nysMu':function(_0x4d1e99,_0x45c7dd){return _0x4d1e99-_0x45c7dd;},'gOSSo':function(_0x16896,_0x3f0d6c){return _0x16896>_0x3f0d6c;},'cjAuv':_0x4918d3(0x124),'yQBZr':'krSwu','FubKs':_0x4918d3(0xe7),'yKxcy':_0x4918d3(0xd6),'EnQJT':_0x4918d3(0x13a),'jURMp':'eIMDp','QCtJv':_0x4918d3(0xfe)};if(!_0x2097a7)_0x2097a7=()=>{};!_0x3340dd[_0x4918d3(0x103)]&&_0x3340dd[_0x4918d3(0x128)]&&(_0x3340dd['ngay']=_0x3340dd[_0x4918d3(0x128)]);let _0x20cb40=_0x3340dd[_0x4918d3(0x164)],_0x4c2113=_0x3340dd[_0x4918d3(0x163)],_0x148522=_0x3340dd[_0x4918d3(0xd1)];if(_0x148522&&underscore['isArray'](_0x148522)){if(_0x3ad7d5[_0x4918d3(0x11d)]!==_0x3ad7d5['jURMp'])_0x27dfab[_0x4918d3(0xea)]={'$ne':_0x22b18d['id_ct']};else{let _0x49a0ab=Object[_0x4918d3(0x171)](_0x148522);_0x148522={'$in':_0x49a0ab};}}let _0x39242d,_0x36160a,_0xfb1bf2;_0x39242d=_0x3ad7d5['SRSIe'](moment,_0x3340dd[_0x4918d3(0x103)])[_0x4918d3(0x143)](_0x4918d3(0x154))[_0x4918d3(0xbe)]();if(_0x3340dd[_0x4918d3(0x125)]){let _0xdbe371=new Date(_0x3340dd[_0x4918d3(0x125)]);_0x36160a=_0xdbe371[_0x4918d3(0x175)](),_0xfb1bf2=moment(_0xdbe371)['startOf'](_0x3ad7d5[_0x4918d3(0xf0)])[_0x4918d3(0xbe)]();}else _0x36160a=_0x39242d['getFullYear'](),_0xfb1bf2=moment(_0x39242d)[_0x4918d3(0xe9)](_0x3ad7d5['QCtJv'])[_0x4918d3(0xbe)]();let _0x3451b4=_0x3340dd[_0x4918d3(0x137)];return new Promise((_0x7bba77,_0x55fc96)=>{const _0x2d2061=_0x4918d3,_0x154f13={'cuhbo':function(_0x2af0d4,_0x240e8b){return _0x2af0d4!==_0x240e8b;},'WJFwi':_0x3ad7d5[_0x2d2061(0x132)],'lsgaX':function(_0x4b3780,_0x28c0b2){const _0x56d0dd=_0x2d2061;return _0x3ad7d5[_0x56d0dd(0xe2)](_0x4b3780,_0x28c0b2);},'efUuP':_0x3ad7d5[_0x2d2061(0x114)],'CAKdg':_0x3ad7d5[_0x2d2061(0xb9)],'Pvtfm':_0x3ad7d5['IVzUG'],'TKtud':function(_0x4d42cd,_0x435de7){const _0x1eb9b6=_0x2d2061;return _0x3ad7d5[_0x1eb9b6(0x109)](_0x4d42cd,_0x435de7);},'dPYWt':function(_0xd33431,_0x4344ea){const _0x4bf98e=_0x2d2061;return _0x3ad7d5[_0x4bf98e(0x12c)](_0xd33431,_0x4344ea);},'jmpCF':function(_0x405451,_0x1f0b20,_0x1f9f16){const _0x6f93f3=_0x2d2061;return _0x3ad7d5[_0x6f93f3(0x131)](_0x405451,_0x1f0b20,_0x1f9f16);},'juVDg':function(_0x6b8a20,_0x480ba4){return _0x3ad7d5['KWlEI'](_0x6b8a20,_0x480ba4);},'ntcmo':_0x3ad7d5['cjAuv'],'YrMjj':function(_0xec8fc1,_0xd37205){return _0xec8fc1(_0xd37205);},'KgWLl':function(_0x5670a1,_0x50193f){return _0x5670a1===_0x50193f;},'OhEAr':_0x3ad7d5[_0x2d2061(0x160)],'tUIdt':function(_0x2c9cd5,_0x589909){return _0x2c9cd5!==_0x589909;},'UXQrV':_0x3ad7d5[_0x2d2061(0x170)],'apJre':_0x3ad7d5[_0x2d2061(0xc6)],'RniAL':function(_0x53aa24,_0x793cd1){const _0x506ac8=_0x2d2061;return _0x3ad7d5[_0x506ac8(0xce)](_0x53aa24,_0x793cd1);},'NEIds':_0x2d2061(0x16a),'HwtTI':function(_0x71001d,_0x36df9f){return _0x71001d!==_0x36df9f;},'XuwIJ':_0x3ad7d5[_0x2d2061(0x15a)],'sCylj':function(_0x4ce0d5,_0x44744f){return _0x3ad7d5['vPVkB'](_0x4ce0d5,_0x44744f);},'PxJob':_0x2d2061(0x118)};async[_0x2d2061(0x106)]({'ckcapphat':_0x5af944=>{const _0x195b33=_0x2d2061,_0x4d499a={'jyVfq':function(_0x218ac6,_0x3e82d1,_0x2a4054){return _0x3ad7d5['rIXWl'](_0x218ac6,_0x3e82d1,_0x2a4054);}};_0x3ad7d5['NIsNj']!==_0x3ad7d5[_0x195b33(0xd2)]?setImmediate(()=>{const _0x3e40db=_0x195b33,_0x1eb2cb={'bdVHz':function(_0x42d6b2,_0x42f7da){const _0x5b4a88=_0x3077;return _0x154f13[_0x5b4a88(0x141)](_0x42d6b2,_0x42f7da);},'OzcIr':_0x154f13['WJFwi']};_0x154f13[_0x3e40db(0xd3)](_0x154f13[_0x3e40db(0x179)],_0x154f13[_0x3e40db(0x117)])?ckvtcapphat(_0x3340dd,(_0x63972f,_0x17c1ad)=>{const _0x1332b7=_0x3e40db;_0x1eb2cb[_0x1332b7(0xd9)](_0x1eb2cb[_0x1332b7(0x172)],_0x1eb2cb['OzcIr'])?_0x244fca(null,_0x2dea72):_0x5af944(_0x63972f,_0x17c1ad);}):_0x41c2ea['ma_dvcs']=_0x1f5dc5;}):_0x4d499a[_0x195b33(0xdb)](_0x1f6041,_0x2e1aaa,_0x1440a0);},'dn':_0x26196e=>{const _0x3cd301=_0x2d2061,_0x3e142e={'cnWWC':function(_0x4d5fd6,_0x44e9bf,_0x6c5c66){const _0x1a6b0f=_0x3077;return _0x3ad7d5[_0x1a6b0f(0x17c)](_0x4d5fd6,_0x44e9bf,_0x6c5c66);},'NLaWz':function(_0x5a73e5,_0x4f6762){const _0x199def=_0x3077;return _0x3ad7d5[_0x199def(0xde)](_0x5a73e5,_0x4f6762);}};_0x3ad7d5[_0x3cd301(0xc0)](_0x3cd301(0x112),_0x3ad7d5['fWrVx'])?_0x529d89['ma_kho']=_0x46fa2e:_0x3ad7d5[_0x3cd301(0xde)](setImmediate,()=>{const _0x3de7d2=_0x3cd301,_0x1c47dc={'pUglR':_0x154f13[_0x3de7d2(0x156)],'fCIJY':function(_0x23abe7,_0x4ffe24){const _0x305c7c=_0x3de7d2;return _0x154f13[_0x305c7c(0xc8)](_0x23abe7,_0x4ffe24);},'EUCcb':function(_0x5b0e18,_0x99c663){return _0x5b0e18+_0x99c663;},'SJGho':function(_0x2441ff,_0x45507f){const _0x48fa78=_0x3de7d2;return _0x154f13[_0x48fa78(0xdf)](_0x2441ff,_0x45507f);},'TmUkX':function(_0x2b5444,_0x20df50,_0x3bb2ba){const _0x1d1b5d=_0x3de7d2;return _0x154f13[_0x1d1b5d(0x13f)](_0x2b5444,_0x20df50,_0x3bb2ba);},'dfMrq':function(_0x13a111,_0x24c567){const _0x2c393b=_0x3de7d2;return _0x154f13[_0x2c393b(0xf2)](_0x13a111,_0x24c567);}};if(_0x154f13['ntcmo']!==_0x154f13[_0x3de7d2(0x129)]){_0x2da3da[_0x3de7d2(0x146)]&&(_0x24566a=_0x2175a3[_0x3de7d2(0x144)](_0x2897d6=>_0x2897d6[_0x3de7d2(0xba)]&&_0x2897d6['ton_toi_thieu']>_0x2897d6[_0x3de7d2(0xe1)]));_0x5c918b[_0x3de7d2(0x10b)]&&(_0x7c2481=_0x50beb7[_0x3de7d2(0x144)](_0x4b5134=>_0x4b5134['ton_toi_da']&&_0x4b5134['ton_toi_da']<_0x4b5134[_0x3de7d2(0xe1)]));for(let _0x4f8e32 of _0x492141){const _0x579b34=_0x1c47dc[_0x3de7d2(0xfa)][_0x3de7d2(0xcc)]('|');let _0x3b3466=0x0;while(!![]){switch(_0x579b34[_0x3b3466++]){case'0':_0x4f8e32['du00']=_0x1c47dc[_0x3de7d2(0x116)](_0x1c47dc[_0x3de7d2(0x108)](_0x5542a2[_0x3de7d2(0xef)](_0x4f8e32[_0x3de7d2(0x115)],0x0),_0x4153d5[_0x3de7d2(0xef)](_0x4f8e32[_0x3de7d2(0x157)],0x0)),_0x3ac868[_0x3de7d2(0xef)](_0x4f8e32['tien_xuat'],0x0));continue;case'1':_0x4f8e32['du']=_0x1c47dc[_0x3de7d2(0x116)](_0x4f8e32['du00'],_0x1c47dc['SJGho'](_0x4f8e32[_0x3de7d2(0x123)],0x0)?_0x4f8e32[_0x3de7d2(0x123)]:0x0);continue;case'2':_0x4f8e32[_0x3de7d2(0xcb)]=0x0;continue;case'3':_0x4f8e32[_0x3de7d2(0x157)]=0x0;continue;case'4':_0x4f8e32[_0x3de7d2(0xe1)]=_0x30605a[_0x3de7d2(0x15b)](_0x1c47dc[_0x3de7d2(0x116)](_0x1c47dc[_0x3de7d2(0x108)](_0x4f8e32['ton00'],_0x4f8e32['sl_nhap']),_0x4f8e32[_0x3de7d2(0xcb)]),0x4);continue;case'5':_0x4f8e32[_0x3de7d2(0x10e)]=0x0;continue;case'6':_0x4f8e32[_0x3de7d2(0x155)]=0x0;continue;case'7':_0x4f8e32[_0x3de7d2(0xd0)]=_0x1c47dc[_0x3de7d2(0x116)](_0x4f8e32[_0x3de7d2(0xe1)],_0x1c47dc[_0x3de7d2(0x10f)](_0x4f8e32[_0x3de7d2(0xf3)],0x0)?_0x4f8e32[_0x3de7d2(0xf3)]:0x0);continue;}break;}}_0x1c47dc[_0x3de7d2(0xe4)](_0x5b95f9,null,_0x12239a),_0x1c47dc[_0x3de7d2(0x162)](_0x46b89c,_0xaf4859);}else{const _0xc8f899={'id_app':_0x3451b4,'nam':_0x36160a};_0x4c2113&&(_0xc8f899[_0x3de7d2(0x163)]=_0x4c2113);_0x20cb40&&(_0xc8f899[_0x3de7d2(0x164)]=_0x20cb40);_0x148522&&(_0xc8f899[_0x3de7d2(0xd1)]=_0x148522);if(_0x3340dd[_0x3de7d2(0x136)])_0xc8f899[_0x3de7d2(0x136)]=_0x3340dd['ma_lo'];if(_0x3340dd['han_sd'])_0xc8f899[_0x3de7d2(0xed)]=_0x3340dd['han_sd'];if(_0x3340dd['ma_tt1'])_0xc8f899['ma_tt1']=_0x3340dd[_0x3de7d2(0x17b)];if(_0x3340dd['ma_tt2'])_0xc8f899[_0x3de7d2(0x12e)]=_0x3340dd[_0x3de7d2(0x12e)];if(_0x3340dd[_0x3de7d2(0x15c)])_0xc8f899['ma_tt3']=_0x3340dd[_0x3de7d2(0x15c)];cdvt[_0x3de7d2(0x122)](_0xc8f899)[_0x3de7d2(0xee)]()[_0x3de7d2(0xe5)](_0x43bdb5=>{const _0x328bd5=_0x3de7d2;_0x3e142e[_0x328bd5(0xb8)](_0x26196e,null,_0x43bdb5);})[_0x3de7d2(0x120)](_0x1b6e08=>{const _0x326abb=_0x3de7d2;_0x3e142e[_0x326abb(0xb7)](_0x26196e,_0x1b6e08);});}});},'hanmucton':_0x5d7b25=>{const _0x29c7ba=_0x2d2061,_0x4da93e={'QgwsB':function(_0x22b353,_0x238d3b,_0x41c161){const _0x4be242=_0x3077;return _0x154f13[_0x4be242(0x13f)](_0x22b353,_0x238d3b,_0x41c161);},'Rhwni':function(_0x293819,_0x181cf6){const _0x40b9c5=_0x3077;return _0x154f13[_0x40b9c5(0x16f)](_0x293819,_0x181cf6);},'VVJXs':_0x29c7ba(0x105),'AvqiD':function(_0x2d1a69,_0x3b4932){return _0x2d1a69(_0x3b4932);},'WOEKF':function(_0x2b70fd,_0x14a4dc){const _0x192299=_0x29c7ba;return _0x154f13[_0x192299(0x16f)](_0x2b70fd,_0x14a4dc);},'UQxAi':_0x154f13[_0x29c7ba(0x14b)],'obBPL':function(_0x1d2890,_0x324f26){return _0x154f13['tUIdt'](_0x1d2890,_0x324f26);},'sGHKm':_0x154f13[_0x29c7ba(0x135)],'WEkkx':_0x154f13[_0x29c7ba(0x14a)]};_0x154f13[_0x29c7ba(0xd3)]('AHByl',_0x29c7ba(0xc4))?_0x154f13[_0x29c7ba(0x14d)](_0x17557c,()=>{const _0x56622b={'OSCbW':function(_0x36654f,_0x5c6ba6,_0x8b547d){const _0x3c9a86=_0x3077;return _0x4da93e[_0x3c9a86(0x14c)](_0x36654f,_0x5c6ba6,_0x8b547d);}};_0x4da93e['QgwsB'](_0x4f0a7e,_0x2a9213,(_0x3d1169,_0x184344)=>{const _0x1633a4=_0x3077;_0x56622b[_0x1633a4(0xd4)](_0x180456,_0x3d1169,_0x184344);});}):_0x154f13['RniAL'](setImmediate,()=>{const _0x5cfb9b=_0x29c7ba,_0x1394e3={'ltgud':function(_0x48bfec,_0x333b02,_0x331d2f){const _0x547c53=_0x3077;return _0x4da93e[_0x547c53(0x14c)](_0x48bfec,_0x333b02,_0x331d2f);},'VSVXl':function(_0x4c5311,_0x1a76f1){const _0x1904f2=_0x3077;return _0x4da93e[_0x1904f2(0x178)](_0x4c5311,_0x1a76f1);},'EaKnS':_0x4da93e[_0x5cfb9b(0x140)],'LQSdG':function(_0x32531c,_0xf21f80){const _0x1fcc45=_0x5cfb9b;return _0x4da93e[_0x1fcc45(0x110)](_0x32531c,_0xf21f80);}},_0x2b272d={'id_app':_0x3451b4};_0x4c2113&&(_0x2b272d[_0x5cfb9b(0x163)]=_0x4c2113);_0x20cb40&&(_0x2b272d[_0x5cfb9b(0x164)]=_0x20cb40);_0x148522&&(_0x4da93e['obBPL'](_0x4da93e[_0x5cfb9b(0x134)],_0x4da93e[_0x5cfb9b(0x14e)])?_0x2b272d[_0x5cfb9b(0xd1)]=_0x148522:_0x2e9f66[_0x5cfb9b(0xd1)]=_0x412d1d);if(_0x3340dd[_0x5cfb9b(0x136)])_0x2b272d['ma_lo']=_0x3340dd[_0x5cfb9b(0x136)];if(_0x3340dd['han_sd'])_0x2b272d[_0x5cfb9b(0xed)]=_0x3340dd[_0x5cfb9b(0xed)];if(_0x3340dd['ma_tt1'])_0x2b272d[_0x5cfb9b(0x17b)]=_0x3340dd['ma_tt1'];if(_0x3340dd[_0x5cfb9b(0x12e)])_0x2b272d[_0x5cfb9b(0x12e)]=_0x3340dd[_0x5cfb9b(0x12e)];if(_0x3340dd[_0x5cfb9b(0x15c)])_0x2b272d[_0x5cfb9b(0x15c)]=_0x3340dd[_0x5cfb9b(0x15c)];hanmucton['find'](_0x2b272d)[_0x5cfb9b(0xee)]()['then'](_0x1514fe=>{const _0x2c80b8=_0x5cfb9b,_0x172741={'JkoYk':function(_0x1e0fda,_0x4b0457,_0x8abebd){const _0x518e04=_0x3077;return _0x1394e3[_0x518e04(0x138)](_0x1e0fda,_0x4b0457,_0x8abebd);}};if(_0x1394e3[_0x2c80b8(0x107)](_0x1394e3[_0x2c80b8(0x10d)],_0x2c80b8(0x13e)))_0x1394e3['ltgud'](_0x5d7b25,null,_0x1514fe);else{let _0x1a5da6={'id_app':_0x11182c,'ton_kho_mac_dinh':{'$nin':[null,_0x44b9e6,0x0]}};_0x329535&&(_0x1a5da6[_0x2c80b8(0xd1)]=_0x16b015),_0x5b4920[_0x2c80b8(0x122)](_0x1a5da6,{'ma_vt':0x1,'ton_kho_mac_dinh':0x1})[_0x2c80b8(0xee)]()[_0x2c80b8(0xe5)](_0xb378b2=>{_0x172741['JkoYk'](_0x5622f8,null,_0xb378b2);})[_0x2c80b8(0x120)](_0x23a647=>{const _0x15ac32=_0x2c80b8;_0x3adc41[_0x15ac32(0x15d)](_0x23a647);});}})[_0x5cfb9b(0x120)](_0x1897e2=>{const _0x4c10bb=_0x5cfb9b;_0x4da93e['Rhwni'](_0x4da93e[_0x4c10bb(0x104)],_0x4da93e[_0x4c10bb(0x104)])?_0x4da93e[_0x4c10bb(0x110)](_0x5d7b25,_0x1897e2):_0x1394e3[_0x4c10bb(0x159)](_0x50911f,_0x3070ee);});});},'ps':_0x1434ea=>{const _0x5e1de7=_0x2d2061;_0x3ad7d5[_0x5e1de7(0xde)](setImmediate,()=>{const _0x1f8250=_0x5e1de7,_0x429067={'LgtUl':function(_0x57d3ae,_0x4b4e7f){const _0xad73a0=_0x3077;return _0x154f13[_0xad73a0(0xf2)](_0x57d3ae,_0x4b4e7f);},'UlOiz':function(_0x5659f5,_0x33af46){return _0x5659f5!==_0x33af46;},'HJZZK':_0x154f13['NEIds'],'bdCkN':function(_0x26ce70,_0x42f061){const _0x461e2f=_0x3077;return _0x154f13[_0x461e2f(0x11b)](_0x26ce70,_0x42f061);},'zkefL':_0x154f13[_0x1f8250(0x133)],'KHlQG':function(_0x5a5f51,_0x4ef17b,_0x1ce35d){const _0xfc9f8=_0x1f8250;return _0x154f13[_0xfc9f8(0x13f)](_0x5a5f51,_0x4ef17b,_0x1ce35d);},'xhoYg':function(_0x5a34c2,_0x408810){return _0x5a34c2(_0x408810);}};if(_0x154f13[_0x1f8250(0x161)](_0x154f13[_0x1f8250(0x139)],_0x154f13['PxJob']))_0x429067[_0x1f8250(0x173)](_0x3348a9,_0x495b5c);else{const _0x2d26dc={'id_app':_0x3451b4,'ngay_ct':{'$gte':_0xfb1bf2,'$lte':_0x39242d}};_0x4c2113&&(_0x2d26dc['ma_kho']=_0x4c2113);_0x20cb40&&(_0x2d26dc['ma_dvcs']=_0x20cb40);_0x148522&&(_0x2d26dc[_0x1f8250(0xd1)]=_0x148522);if(_0x3340dd[_0x1f8250(0x136)])_0x2d26dc[_0x1f8250(0x136)]=_0x3340dd[_0x1f8250(0x136)];if(_0x3340dd[_0x1f8250(0xed)])_0x2d26dc[_0x1f8250(0xed)]=_0x3340dd[_0x1f8250(0xed)];if(_0x3340dd[_0x1f8250(0x17b)])_0x2d26dc[_0x1f8250(0x17b)]=_0x3340dd[_0x1f8250(0x17b)];if(_0x3340dd[_0x1f8250(0x12e)])_0x2d26dc['ma_tt2']=_0x3340dd['ma_tt2'];if(_0x3340dd[_0x1f8250(0x15c)])_0x2d26dc[_0x1f8250(0x15c)]=_0x3340dd[_0x1f8250(0x15c)];_0x3340dd[_0x1f8250(0xea)]&&(_0x2d26dc[_0x1f8250(0xea)]={'$ne':_0x3340dd[_0x1f8250(0xea)]}),sokho['find'](_0x2d26dc)[_0x1f8250(0xee)]()[_0x1f8250(0xe5)](_0x36ca8b=>{const _0x3d8c04=_0x1f8250,_0x137477={'LdBuA':function(_0x2856a8,_0x545f36,_0x3d4e8e){return _0x2856a8(_0x545f36,_0x3d4e8e);},'lyTAi':function(_0x3ef064,_0x26c4a6){const _0x19967a=_0x3077;return _0x429067[_0x19967a(0x177)](_0x3ef064,_0x26c4a6);},'uOxto':_0x429067[_0x3d8c04(0x11f)]};_0x429067[_0x3d8c04(0xe6)](_0x429067[_0x3d8c04(0x176)],'SDHMc')?(_0x5b6f01=_0x585b8e[_0x3d8c04(0x100)](_0xa5df96=>{const _0x144ae2=_0x3d8c04;return _0xa5df96[_0x144ae2(0x155)]=_0x5e4ac2[_0x144ae2(0x15b)](_0xa5df96[_0x144ae2(0x11e)],0x4),_0xa5df96['sl_xuat']=_0x2f97bd['round'](_0xa5df96[_0x144ae2(0x153)],0x4),_0xa5df96;}),_0x137477[_0x3d8c04(0xc5)](_0x13b342,null,_0x4a7668)):(_0x36ca8b=_0x36ca8b['map'](_0x3f598e=>{const _0x29f339=_0x3d8c04;if(_0x137477['lyTAi'](_0x29f339(0x101),_0x137477[_0x29f339(0xdc)]))return _0x3f598e['sl_nhap']=utils[_0x29f339(0x15b)](_0x3f598e[_0x29f339(0x11e)],0x4),_0x3f598e[_0x29f339(0xcb)]=utils[_0x29f339(0x15b)](_0x3f598e['sl_xuat_qd'],0x4),_0x3f598e;else _0x51b6d2(null,_0x24126b);}),_0x429067[_0x3d8c04(0x16e)](_0x1434ea,null,_0x36ca8b));})['catch'](_0x52bec6=>{const _0x519900=_0x1f8250;_0x429067[_0x519900(0x113)](_0x1434ea,_0x52bec6);});}});},'ton_kho_mac_dinh':_0x297310=>{const _0x4217b7=_0x2d2061,_0x430a94={'IoZMe':function(_0x21f812,_0x1103e9){const _0x4a834e=_0x3077;return _0x3ad7d5[_0x4a834e(0xc0)](_0x21f812,_0x1103e9);},'ZRcaf':_0x4217b7(0x126),'VHsHy':function(_0x201d48,_0x5f3f95,_0x47b3f6){const _0x17adae=_0x4217b7;return _0x3ad7d5[_0x17adae(0x17c)](_0x201d48,_0x5f3f95,_0x47b3f6);},'SIyfU':_0x3ad7d5[_0x4217b7(0xff)],'DPtCM':_0x3ad7d5[_0x4217b7(0xd8)]};_0x3ad7d5[_0x4217b7(0xc0)](_0x3ad7d5[_0x4217b7(0xe3)],_0x3ad7d5['EXWaz'])?setImmediate(()=>{const _0x155e40=_0x4217b7,_0xdc3ae0={'BuURL':function(_0x1c2a32,_0x51001f){const _0x52d9f8=_0x3077;return _0x430a94[_0x52d9f8(0xf5)](_0x1c2a32,_0x51001f);},'HuTkA':_0x430a94['ZRcaf'],'xXwZu':function(_0x4b3bf8,_0x83cb5b,_0x2e3282){const _0x4348ef=_0x3077;return _0x430a94[_0x4348ef(0x167)](_0x4b3bf8,_0x83cb5b,_0x2e3282);}};if(_0x430a94[_0x155e40(0xda)]===_0x430a94[_0x155e40(0xe0)])_0x511746=_0x43c6a6[_0x155e40(0x16d)](_0x3e1df5);else{let _0x5c1e9b={'id_app':_0x3451b4,'ton_kho_mac_dinh':{'$nin':[null,undefined,0x0]}};_0x148522&&(_0x5c1e9b[_0x155e40(0xd1)]=_0x148522),dmvt[_0x155e40(0x122)](_0x5c1e9b,{'ma_vt':0x1,'ton_kho_mac_dinh':0x1})[_0x155e40(0xee)]()['then'](_0x2be481=>{const _0x256e11=_0x155e40;_0xdc3ae0[_0x256e11(0x130)](_0x256e11(0x126),_0xdc3ae0[_0x256e11(0x15f)])?_0xdc3ae0[_0x256e11(0xc9)](_0x297310,null,_0x2be481):_0xca82fe[_0x256e11(0x15d)](_0x493c40);})[_0x155e40(0x120)](_0x4158c8=>{const _0x134f8b=_0x155e40;console[_0x134f8b(0x15d)](_0x4158c8);});}}):_0x222bc8[_0x4217b7(0x163)]=_0x59b919;}},(_0x4fbdee,_0xf40db2)=>{const _0x3c7334=_0x2d2061,_0x4d1b98={'ECCuC':function(_0x342034,_0x4ba3b4){const _0x292e54=_0x3077;return _0x3ad7d5[_0x292e54(0xce)](_0x342034,_0x4ba3b4);},'BNBKb':'year','OpCxh':_0x3ad7d5[_0x3c7334(0x165)],'MpUlt':_0x3ad7d5['DwTxg'],'iuhcp':function(_0x2dfd97,_0xc94c88){return _0x3ad7d5['KwaVW'](_0x2dfd97,_0xc94c88);},'gUYLb':function(_0x2c7170,_0x49556c){return _0x3ad7d5['kNnqk'](_0x2c7170,_0x49556c);},'BjWVb':function(_0x2176e9,_0x40cc54){const _0x396764=_0x3c7334;return _0x3ad7d5[_0x396764(0xca)](_0x2176e9,_0x40cc54);},'XoVmq':function(_0x1ffee5,_0x186386){const _0x4a062c=_0x3c7334;return _0x3ad7d5[_0x4a062c(0x147)](_0x1ffee5,_0x186386);},'whSby':function(_0x546d88,_0x15dc52){return _0x3ad7d5['KwaVW'](_0x546d88,_0x15dc52);},'xCjuO':function(_0x513202,_0x28b9b9,_0x1b7bb7){const _0xc0a6a7=_0x3c7334;return _0x3ad7d5[_0xc0a6a7(0x127)](_0x513202,_0x28b9b9,_0x1b7bb7);},'GaPrv':function(_0x3afcf5,_0x486f91){const _0x578913=_0x3c7334;return _0x3ad7d5[_0x578913(0xce)](_0x3afcf5,_0x486f91);}};if(_0x4fbdee)return _0x3ad7d5[_0x3c7334(0xde)](_0x2097a7,_0x4fbdee),_0x3ad7d5['SRSIe'](_0x55fc96,new Error(_0x4fbdee));let _0x6b13eb=_0xf40db2['ckcapphat'][_0x3c7334(0x100)](_0x50bd45=>{const _0x2019ef=_0x3c7334;if(_0x2019ef(0x174)!==_0x4d1b98[_0x2019ef(0xf9)])_0x487c86=_0x39577b['getFullYear'](),_0x3135dc=_0x4d1b98[_0x2019ef(0xf8)](_0x18c1c2,_0x570ad8)[_0x2019ef(0xe9)](_0x4d1b98[_0x2019ef(0xbb)])['toDate']();else return _0x50bd45['ton00_capphat']=_0x50bd45[_0x2019ef(0xe1)],_0x50bd45[_0x2019ef(0x123)]=_0x50bd45[_0x2019ef(0x115)],_0x50bd45['ton00']=0x0,_0x50bd45[_0x2019ef(0x115)]=0x0,_0x50bd45;}),_0x4d9607=_0xf40db2['dn'][_0x3c7334(0x102)](_0xf40db2['ps'])[_0x3c7334(0x102)](_0x6b13eb)[_0x3c7334(0x102)](_0xf40db2[_0x3c7334(0x16b)])[_0x3c7334(0x102)](_0xf40db2[_0x3c7334(0xfd)]),_0x326fd1=_0x3340dd['groupBy']||_0x3340dd['groupby'];if(!_0x326fd1)_0x326fd1=[_0x3ad7d5['gMBkF']];if(underscore[_0x3c7334(0x13d)](_0x326fd1)){if(_0x3ad7d5['ZwRiR'](_0x326fd1[_0x3c7334(0x119)]('['),0x0))try{_0x326fd1=JSON[_0x3c7334(0x16d)](_0x326fd1);}catch(_0x516202){_0x3c7334(0xbd)!==_0x3ad7d5[_0x3c7334(0x142)]?console[_0x3c7334(0x15d)](_0x516202):_0x149306[_0x3c7334(0x164)]=_0x142241;}else _0x3ad7d5['vPVkB'](_0x3ad7d5[_0x3c7334(0x148)],_0x3ad7d5[_0x3c7334(0x12a)])?_0x326fd1=_0x326fd1['split'](','):_0xdfcb61[_0x3c7334(0x163)]=_0x39bc13;}let _0x23b010=[_0x3ad7d5[_0x3c7334(0xbc)],_0x3ad7d5[_0x3c7334(0x152)],_0x3ad7d5[_0x3c7334(0x151)],_0x3ad7d5['wiSYp'],_0x3ad7d5['AGCDu'],_0x3ad7d5['Homhb'],_0x3ad7d5['iviOK'],_0x3ad7d5[_0x3c7334(0xc1)],_0x3ad7d5[_0x3c7334(0xfb)],_0x3ad7d5[_0x3c7334(0x13b)],_0x3ad7d5[_0x3c7334(0xc2)]];_0x4d9607[_0x3c7334(0x10c)](_0x326fd1,_0x23b010,(_0x2df54a,_0x3138bb)=>{const _0x1289d2=_0x3c7334;if(_0x2df54a)return _0x2097a7(_0x2df54a),_0x4d1b98[_0x1289d2(0xf8)](_0x55fc96,new Error(_0x2df54a));_0x4d1b98[_0x1289d2(0xd5)](setImmediate,()=>{const _0x1a1a87=_0x1289d2;_0x3340dd[_0x1a1a87(0x146)]&&(_0x3138bb=_0x3138bb[_0x1a1a87(0x144)](_0xf506e4=>_0xf506e4[_0x1a1a87(0xba)]&&_0xf506e4[_0x1a1a87(0xba)]>_0xf506e4['ton00']));_0x3340dd[_0x1a1a87(0x10b)]&&(_0x3138bb=_0x3138bb[_0x1a1a87(0x144)](_0x5c97b3=>_0x5c97b3[_0x1a1a87(0xd7)]&&_0x5c97b3[_0x1a1a87(0xd7)]<_0x5c97b3[_0x1a1a87(0xe1)]));for(let _0x511ea4 of _0x3138bb){const _0x2f2e69=_0x4d1b98[_0x1a1a87(0xe8)][_0x1a1a87(0xcc)]('|');let _0x155927=0x0;while(!![]){switch(_0x2f2e69[_0x155927++]){case'0':_0x511ea4['du']=_0x511ea4[_0x1a1a87(0x115)]-(_0x4d1b98[_0x1a1a87(0x158)](_0x511ea4[_0x1a1a87(0x123)],0x0)?_0x511ea4[_0x1a1a87(0x123)]:0x0);continue;case'1':_0x511ea4['tien_xuat']=0x0;continue;case'2':_0x511ea4[_0x1a1a87(0x115)]=_0x4d1b98[_0x1a1a87(0x17a)](Math[_0x1a1a87(0xef)](_0x511ea4[_0x1a1a87(0x115)],0x0),Math['roundBy'](_0x511ea4['tien_nhap'],0x0))-Math[_0x1a1a87(0xef)](_0x511ea4['tien_xuat'],0x0);continue;case'3':_0x511ea4[_0x1a1a87(0xe1)]=utils[_0x1a1a87(0x15b)](_0x4d1b98[_0x1a1a87(0x11c)](_0x4d1b98[_0x1a1a87(0xc3)](_0x511ea4['ton00'],_0x511ea4[_0x1a1a87(0x155)]),_0x511ea4[_0x1a1a87(0xcb)]),0x4);continue;case'4':_0x511ea4['sl_xuat']=0x0;continue;case'5':_0x511ea4['ton']=_0x4d1b98[_0x1a1a87(0x11c)](_0x511ea4[_0x1a1a87(0xe1)],_0x4d1b98[_0x1a1a87(0xec)](_0x511ea4[_0x1a1a87(0xf3)],0x0)?_0x511ea4[_0x1a1a87(0xf3)]:0x0);continue;case'6':_0x511ea4[_0x1a1a87(0x155)]=0x0;continue;case'7':_0x511ea4[_0x1a1a87(0x157)]=0x0;continue;}break;}}_0x4d1b98[_0x1a1a87(0xbf)](_0x2097a7,null,_0x3138bb),_0x7bba77(_0x3138bb);});});});});};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
const async=require("async"),_=require("lodash"),moment=require("moment");
|
|
2
|
-
exports.find=function($query$$,$fn$$,$options$$){const $socai$$=global.getModel("socai");async.parallel({ps_no:function($callback$$){setImmediate(async()=>{let $query_no$$={};_.extend($query_no$$,$query$$);$query_no$$.tk&&($query_no$$.tk_no=$query_no$$.tk,delete $query_no$$.tk);$query_no$$.ma_kh&&($query_no$$.ma_kh_no=$query_no$$.ma_kh,delete $query_no$$.ma_kh);let $page$$=0,$_data$$=[];const $check$$=await $socai$$.find($query_no$$).skip($page$$*1E6).limit(1E6).explain("executionStats");$check$$.length>
|
|
3
|
-
0&&$check$$[0].executionStats.totalKeysExamined!=$check$$[0].executionStats.totalDocsExamined&&console.error("vsocai: indexes c\u1ee7a socai ch\u01b0a hi\u1ec7u qu\u1ea3 cho query",$query_no$$,$check$$[0].executionStats);async.forever($callback$$=>{$socai$$.find($query_no$$).skip($page$$*1E6).limit(1E6).lean().then(function($rs$$){console.log("vsocai: ps no",{page:$page$$,rows_number:$rs$$.length});$rs$$.forEach($r$$=>{$r$$.tk=$r$$.tk_no;$r$$.tk_du=$r$$.tk_co;$r$$.ma_kh=$r$$.ma_kh_no;!$r$$.ma_kh&&
|
|
4
|
-
$r$$.ma_kh_co&&($r$$.ma_kh=$r$$.ma_kh_co);$r$$.ps_no_nt=$r$$.tien_nt;$r$$.ps_no=Math.roundBy($r$$.tien,0);$r$$.ps_co_nt=0;$r$$.ps_co=0});$_data$$=$_data$$.concat($rs$$);if($rs$$.length<1E6)return $callback$$("0");$page$$+=1;$callback$$()}).catch($e$$=>{$callback$$($e$$)})},$e$$=>{if($e$$!="0")return $callback$$($e$$);$callback$$(null,$_data$$)})})},ps_co:function($callback$$){setImmediate(()=>{let $query_co$$={};_.extend($query_co$$,$query$$);$query_co$$.tk&&($query_co$$.tk_co=$query_co$$.tk,delete $query_co$$.tk);
|
|
5
|
-
$query_co$$.ma_kh&&($query_co$$.ma_kh_co=$query_co$$.ma_kh,delete $query_co$$.ma_kh);let $page$$=0,$_data$$=[];async.forever($callback$$=>{$socai$$.find($query_co$$).skip($page$$*1E6).limit(1E6).lean().then(function($rs$$){console.log("vsocai: ps co",{page:$page$$,rows_number:$rs$$.length});$rs$$.forEach($r$$=>{$r$$.tk=$r$$.tk_co;$r$$.tk_du=$r$$.tk_no;$r$$.ma_kh=$r$$.ma_kh_co;!$r$$.ma_kh&&$r$$.ma_kh_no&&($r$$.ma_kh=$r$$.ma_kh_no);$r$$.ps_co_nt=$r$$.tien_nt;$r$$.ps_co=Math.roundBy($r$$.tien,0);$r$$.ps_no_nt=
|
|
6
|
-
0;$r$$.ps_no=0});$_data$$=$_data$$.concat($rs$$);if($rs$$.length<1E6)return $callback$$("0");$page$$+=1;$callback$$()}).catch($e$$=>{$callback$$($e$$)})},$e$$=>{if($e$$!="0")return $callback$$($e$$);$callback$$(null,$_data$$)})})}},function($e$$,$rs$$){if($e$$)return $fn$$($e$$);$e$$=[...$rs$$.ps_no,...$rs$$.ps_co];console.log("vsocai: handle data",{rows_number:$e$$.length});$options$$&&$options$$.sortData&&($e$$=$e$$.sort(($a$$,$b$$)=>{let $a_ngay_ct$$=moment($a$$.ngay_ct).endOf("date").toDate().getTime(),
|
|
7
|
-
$b_ngay_ct$$=moment($b$$.ngay_ct).endOf("date").toDate().getTime();return $a_ngay_ct$$<$b_ngay_ct$$?-1:$a_ngay_ct$$>$b_ngay_ct$$?1:$a$$.so_ct<$b$$.so_ct?-1:$a$$.so_ct>$b$$.so_ct?1:$a$$.id_ct<$b$$.id_ct?-1:$a$$.id_ct>$b$$.id_ct?1:$a$$.nh_dk<$b$$.nh_dk?-1:$a$$.nh_dk>$b$$.nh_dk||$a$$.ps_no<$b$$.ps_no?1:$a$$.ps_no>$b$$.ps_no||$a$$.ps_co<$b$$.ps_co?-1:$a$$.ps_co>$b$$.ps_co?1:0}));if($options$$&&$options$$.groupBy){let $groupBy$$;$options$$.groupBy&&(_.isArray($options$$.groupBy)&&$options$$.groupBy.length>
|
|
8
|
-
0&&($groupBy$$=$options$$.groupBy),$groupBy$$=$groupBy$$||"id_app ma_dvcs id_ct ma_ct ma_gd ngay_ct so_ct ngay_hd so_hd tk tk_du ma_kh ong_ba ma_nt ty_gia dien_giai ma_bp id_lenhsx ma_phi ma_hd ma_dt ma_nv ma_sp ma_cp ma_kho ma_vt ma_kenh ma_td1 ma_td2 ma_td3 ma_td4 ma_td5 ma_td6 ma_td7 ma_td8 ma_td9 gio ngay thang quy nam date_created date_updated".split(" "));$e$$.groupBy($groupBy$$,["ps_no","ps_co","ps_no_nt","ps_co_nt"],($e$$,$rs$$)=>{if($e$$)return $fn$$($e$$);$fn$$(null,$rs$$)})}else $fn$$(null,
|
|
9
|
-
$e$$)})};
|
|
1
|
+
const _0x4ea179=_0x509f;function _0x2fb7(){const _0x40c87f=['BwfFyNa','rNznwvu','BwfFBNq','zhbHvMK','uhD6Cu8','z0LYqLi','tvPkA3K','AuLOz0W','C29YDa','DgTFzhu','tu5yEu4','AKnnDu0','CwXMy0y','ueXvz2e','BwfFz2q','mJbvq0XWDuy','y2f0y2G','AgvRyLe','uKfkEKC','uLLwDxa','ChLfs28','DwvUDNq','z2v0vgLTzq','re1QtK0','BwfFCgHP','C3bSAxq','mJi0mvPcCKDWtW','uMvyzMC','mw9dDfDWrG','EwrPqKK','vfzWwuy','BgLTAxq','ywHsywy','ENPVzfa','y1frEfi','qKrprha','Bg1ruMS','Bg9KyxnO','BwfFA2HFBM8','C2TPCa','zgLLBL9NAwfP','y3PxyNi','AeTou2e','vLvkuMW','Bu5ABMS','A1PpAvK','mtqZAejrtuLP','BwfFDgq5','suriu0i','C3bTs1a','v0zSzwG','uKTOsva','AwrFy3q','twr3D1q','BwfFDNq','EePOy2G','q3rdvvq','ren4yMq','z0TRvha','ChnFBM8','tKXuqNG','mZe4nJzJEuXRqvm','uevUqNO','u0v4z3q','t0vczxu','CgfYywXSzwW','Bhj3A04','ve9yD3e','swrkC2G','qM5YDgu','BwfFy3a','ChnFy28','BwfFA2vUAa','DNnVy2fPoIbOyw5KBguGzgf0yq','vxjdtgu','Eg1SqKm','vNv1uMy','s3rmBvG','DNnVy2fPoIbWCYbUBW','mZCYnJK5wuvAwgXe','mhWXFdD8nxWZFdr8mNW2','wgPvshG','BKXQzuO','DLrXDNO','q1rJEu0','BwfFzhq','EwPxv1O','BwfFDgqX','uwjTyu0','rgTMuNO','zw5Kt2y','yxH1whm','EeniA04','wuHPyui','BwfFA2HV','nte1r0zXCwTx','tuzhu3K','CM91BMrcEq','z3jVDxbcEq','veTuB2m','sNnyEe8','zxHLy3v0Aw9Uu3rHDhm','mtm3nduWmKXJBgzHCq','qxDTzeG','u3rMvxm','otG4mtLMz01Wz0q','AwrFBgvUAhn4','A3zNsxu','BwfFC3a','txLwt3u','sMnZqKO','BMDHEv9JDa','AxHMtLe','qMflq2K','CNH6EgC','BwfFDgq2','Dwnsr3G','vwnhr2S','BxDStu0','rMHMCxO','C29JywK','ChnFBM9FBNq','ruvSChe','vffOsMK','zgf0zv91CgrHDgvK','AfbHDhi','BwfFDgq1','DMTsrKW','A3H6zgi','BMHFzgS','q0XiA28','q0PTug8','Dg90ywXeB2nZrxHHBwLUzwq','B25Nx2jH','tM91ugC','s2zvt3K','A2nxquW','ExHYBvG','vg5kquq','A0vnCgm','qxrYCgq','mty4AKHdAeXe','vMDkB0u','BwfFDgq0','u3jws2u','EfzuALe','BMDHEv9Oza','Dg9eyxrL','ELjYzeG','BgvUz3rO','yxn5BMm','B2PSr3O','twLVzuS','Cw9Nwxi','zM9YzxzLCG','DgHLBG','mtm1mtbLreX3shG','BwfFA2HFy28','BwfFAgq','BwfFA2G','zgf0zq','DgH1rfu','sevzqK4','uvrwz2i','CMLnqKS','uuT2vxe','DgTFBM8','DgLLBG','zMLUza','q1nRwhK','D3PMrxu','zgf0zv9JCMvHDgvK','BfPXwMq','BwfFDgqZ','qMvKy20','q01RzuG','sg5SDwK','DNnVy2fPoIbPBMrLEgvZigpHU6DHihnVy2fPignOXRbHigHP4BUhDsbXDEg6OYbJAg8GCxvLCNK','tu9zru0','DgLLBL9UDa','BwfFzhzJCW','mtK1nKTYtMPUuG','vg1nDxC','u2vAsLO','BMDHEq','zxnnD2i','z2v0tw9KzwW','ndKWntCYrg9jvKn3','rNvgreO','Eeziu3y','Bg9N','Bw9Tzw50','AMz3Eu0','C29Fy3q','qwXRvMG','BfzTB08','BgvHBG','CgTqEgO','AMnZuK0','DgTFy28','BgTLvK8','Agf2B0O','z3DSyNy','DxDpvuK','Au5HDue','qvPxz2i','wK5vr2q','C3PzwMm','BwfFBNy','v292Dwq','mtG0odziCw9usvm','vuXUtuW','y29Uy2f0','zxH0zw5K','wMrbEKi','zxHWBgfPBG','ChnFy29FBNq','C1LTyLK','C29FAgq','svjms1i','rhjLzfm','q0PPAwW','wePJEem','zM9YrwfJAa','BwfFy3q','t0jRAfG','wvLeCNm','Dg90ywXlzxLZrxHHBwLUzwq','q2n1vuq','t1fWzuS'];_0x2fb7=function(){return _0x40c87f;};return _0x2fb7();}function _0x509f(_0x130e53,_0x2a4ea9){const _0x2fb716=_0x2fb7();return _0x509f=function(_0x509ffa,_0xd0e287){_0x509ffa=_0x509ffa-0x1ec;let _0x5a7c11=_0x2fb716[_0x509ffa];if(_0x509f['DwkwFu']===undefined){var _0x2f63ef=function(_0x10d3b6){const _0x4c14df='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5da6d1='',_0x1ed241='';for(let _0x55d1e9=0x0,_0x1b953f,_0x5d3629,_0x52e75b=0x0;_0x5d3629=_0x10d3b6['charAt'](_0x52e75b++);~_0x5d3629&&(_0x1b953f=_0x55d1e9%0x4?_0x1b953f*0x40+_0x5d3629:_0x5d3629,_0x55d1e9++%0x4)?_0x5da6d1+=String['fromCharCode'](0xff&_0x1b953f>>(-0x2*_0x55d1e9&0x6)):0x0){_0x5d3629=_0x4c14df['indexOf'](_0x5d3629);}for(let _0x4cac3c=0x0,_0x53dcf8=_0x5da6d1['length'];_0x4cac3c<_0x53dcf8;_0x4cac3c++){_0x1ed241+='%'+('00'+_0x5da6d1['charCodeAt'](_0x4cac3c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ed241);};_0x509f['kohWwM']=_0x2f63ef,_0x130e53=arguments,_0x509f['DwkwFu']=!![];}const _0x15dfd6=_0x2fb716[0x0],_0x30b9d3=_0x509ffa+_0x15dfd6,_0x380b7f=_0x130e53[_0x30b9d3];return!_0x380b7f?(_0x5a7c11=_0x509f['kohWwM'](_0x5a7c11),_0x130e53[_0x30b9d3]=_0x5a7c11):_0x5a7c11=_0x380b7f,_0x5a7c11;},_0x509f(_0x130e53,_0x2a4ea9);}(function(_0x48a64c,_0x12c293){const _0x7068d1=_0x509f,_0x1c53ad=_0x48a64c();while(!![]){try{const _0x4f5e62=parseInt(_0x7068d1(0x242))/0x1*(parseInt(_0x7068d1(0x28c))/0x2)+-parseInt(_0x7068d1(0x240))/0x3*(parseInt(_0x7068d1(0x1f5))/0x4)+-parseInt(_0x7068d1(0x285))/0x5*(-parseInt(_0x7068d1(0x263))/0x6)+parseInt(_0x7068d1(0x28f))/0x7*(parseInt(_0x7068d1(0x2b3))/0x8)+-parseInt(_0x7068d1(0x275))/0x9*(-parseInt(_0x7068d1(0x235))/0xa)+parseInt(_0x7068d1(0x254))/0xb*(parseInt(_0x7068d1(0x1fb))/0xc)+parseInt(_0x7068d1(0x212))/0xd*(-parseInt(_0x7068d1(0x2c2))/0xe);if(_0x4f5e62===_0x12c293)break;else _0x1c53ad['push'](_0x1c53ad['shift']());}catch(_0x1f8b62){_0x1c53ad['push'](_0x1c53ad['shift']());}}}(_0x2fb7,0x637cf));const async=require(_0x4ea179(0x2bc)),_=require(_0x4ea179(0x24b)),moment=require(_0x4ea179(0x1ff));exports[_0x4ea179(0x2ce)]=function(_0x3a3de8,_0x56d8bb,_0x6a26f4){const _0x2e6bef=_0x4ea179,_0x14a043={'IDHSB':function(_0x22cd75,_0x30a3f1){return _0x22cd75(_0x30a3f1);},'TKToc':function(_0x1cfcef,_0x16433a){return _0x1cfcef>_0x16433a;},'xmlBC':_0x2e6bef(0x1f4),'UrCLe':'id_ct','HEYBN':_0x2e6bef(0x234),'zzodP':_0x2e6bef(0x295),'SrVKe':_0x2e6bef(0x201),'kcWAL':_0x2e6bef(0x2b8),'wzfEu':'so_hd','cQQxR':_0x2e6bef(0x22f),'jCMuM':_0x2e6bef(0x2c5),'gIrBR':_0x2e6bef(0x2ab),'CJiil':_0x2e6bef(0x228),'hKNSa':'ty_gia','EElpq':_0x2e6bef(0x24e),'TnJAD':_0x2e6bef(0x226),'CLHko':_0x2e6bef(0x290),'sYmbY':_0x2e6bef(0x2c4),'nLjeJ':_0x2e6bef(0x27b),'pkPxj':_0x2e6bef(0x210),'xFHSv':_0x2e6bef(0x292),'XjUHx':_0x2e6bef(0x26c),'MyVOu':_0x2e6bef(0x284),'ahRaf':_0x2e6bef(0x25c),'ZdAzB':'ma_td2','JjDsc':_0x2e6bef(0x2b5),'UcGGk':_0x2e6bef(0x2a4),'ucRGx':_0x2e6bef(0x299),'kvgIu':'ma_td7','ULnML':'ma_td8','zRrdH':'gio','rxzxg':'thang','VUJRl':'quy','euCWL':'nam','onjUT':_0x2e6bef(0x2d1),'DredS':_0x2e6bef(0x2a2),'YYDrs':_0x2e6bef(0x261),'kZOiY':_0x2e6bef(0x29f),'QTVgb':_0x2e6bef(0x218),'lmQRk':_0x2e6bef(0x229),'hekbQ':_0x2e6bef(0x274),'ojlGz':function(_0x1c3b95,_0x5e3856){return _0x1c3b95===_0x5e3856;},'riMBK':'AjqMh','pFqws':function(_0x1d5881,_0x4bb14c){return _0x1d5881!==_0x4bb14c;},'yxrmX':function(_0x397e61,_0x3128c2){return _0x397e61!=_0x3128c2;},'qogYr':function(_0x2ab6ae,_0x963093){return _0x2ab6ae(_0x963093);},'XJcxC':'vsocai:\x20ps\x20co','NouPg':function(_0x17b27a,_0x577b56){return _0x17b27a<_0x577b56;},'IdJsh':_0x2e6bef(0x1f1),'MOYEM':_0x2e6bef(0x283),'PwzqO':function(_0x3b4abb,_0x4ea591){return _0x3b4abb(_0x4ea591);},'uenvt':_0x2e6bef(0x2c7),'PLUga':function(_0xf3c4eb,_0x44e51d){return _0xf3c4eb(_0x44e51d);},'OQpeK':'TVpYF','AwmdH':_0x2e6bef(0x2c6),'QKvUq':function(_0x38130b,_0x82032a){return _0x38130b===_0x82032a;},'CtCUT':function(_0x40c473,_0x3e4ed6){return _0x40c473(_0x3e4ed6);},'mNZnk':function(_0x516663,_0x4855cc,_0xbc468e){return _0x516663(_0x4855cc,_0xbc468e);},'lVmoO':function(_0x15a7e7,_0x1e053d){return _0x15a7e7!==_0x1e053d;},'Hnlui':function(_0x9051bd,_0x31096e){return _0x9051bd(_0x31096e);},'havoJ':function(_0x5da03a,_0x3e7f93){return _0x5da03a(_0x3e7f93);},'MNXyN':_0x2e6bef(0x26f),'CMkeH':_0x2e6bef(0x264),'IRLKR':_0x2e6bef(0x27e),'AZWgb':'id_app','nRpDY':_0x2e6bef(0x23e),'inHxK':'ma_kenh','ddIRi':'ma_td1','pyEKo':_0x2e6bef(0x1ed),'MdwwT':_0x2e6bef(0x255),'LsmZU':_0x2e6bef(0x1f8),'CcuUD':function(_0x2d9a38,_0x58d063,_0x49dc65){return _0x2d9a38(_0x58d063,_0x49dc65);},'tQJfi':_0x2e6bef(0x29e)},_0x5510ca=global[_0x2e6bef(0x1fa)](_0x14a043['tQJfi']);async[_0x2e6bef(0x267)]({'ps_no':function(_0x3347a2){const _0x5111ac=_0x2e6bef,_0x3339b7={'CSmRu':_0x14a043[_0x5111ac(0x24a)],'IenZr':_0x14a043[_0x5111ac(0x237)],'SExgt':function(_0x515b94,_0x2b0ace){return _0x515b94(_0x2b0ace);},'xJhch':function(_0x397c98,_0x119c43){return _0x397c98+_0x119c43;},'FuFDJ':function(_0x52bab1){return _0x52bab1();},'MFGSy':function(_0x953efa,_0x5c3bf3){return _0x14a043['ojlGz'](_0x953efa,_0x5c3bf3);},'gKkTp':_0x5111ac(0x273),'ragdO':_0x14a043[_0x5111ac(0x2ca)],'jfwyM':function(_0x41b52c,_0x40139c){return _0x41b52c*_0x40139c;},'gwlbv':function(_0x4613ca,_0x1f0b53){return _0x14a043['pFqws'](_0x4613ca,_0x1f0b53);},'StfUs':'hiqoU','ASgQO':function(_0x205a9d,_0x353aea){const _0x528cbe=_0x5111ac;return _0x14a043[_0x528cbe(0x2af)](_0x205a9d,_0x353aea);},'lZqZd':function(_0x1403da,_0x330146,_0x57084c){return _0x1403da(_0x330146,_0x57084c);},'DCxbd':function(_0x9b420d,_0x2c83c7){const _0x16d64e=_0x5111ac;return _0x14a043[_0x16d64e(0x2bf)](_0x9b420d,_0x2c83c7);},'VnFTG':_0x14a043[_0x5111ac(0x21e)],'JsXxO':function(_0x207071,_0x3edcf8){const _0x47f7da=_0x5111ac;return _0x14a043[_0x47f7da(0x2ac)](_0x207071,_0x3edcf8);},'zCQqA':function(_0x31f865,_0x3d8f89){return _0x31f865>_0x3d8f89;},'DxyGe':function(_0x29f89d,_0x22412f){const _0x41248f=_0x5111ac;return _0x14a043[_0x41248f(0x2af)](_0x29f89d,_0x22412f);},'OEBeu':_0x14a043[_0x5111ac(0x26a)]};if(_0x14a043[_0x5111ac(0x2bd)]('SDPYv',_0x14a043[_0x5111ac(0x1f2)])){const _0x55c863={'VgJoE':function(_0x2fee8f,_0x5b8998){const _0x2233ab=_0x5111ac;return _0x14a043[_0x2233ab(0x256)](_0x2fee8f,_0x5b8998);}};let _0x40f8ed;_0x1fbdbc[_0x5111ac(0x288)]&&(_0x54520d['isArray'](_0x238883['groupBy'])&&_0x14a043[_0x5111ac(0x289)](_0x542fe6[_0x5111ac(0x288)][_0x5111ac(0x2bb)],0x0)&&(_0x40f8ed=_0x2740c2[_0x5111ac(0x288)]),_0x40f8ed=_0x40f8ed||['id_app',_0x14a043[_0x5111ac(0x271)],_0x14a043['UrCLe'],_0x5111ac(0x220),_0x14a043[_0x5111ac(0x2c8)],_0x14a043[_0x5111ac(0x247)],_0x14a043[_0x5111ac(0x2b6)],_0x14a043[_0x5111ac(0x2ae)],_0x14a043[_0x5111ac(0x2d0)],'tk',_0x14a043[_0x5111ac(0x248)],_0x14a043['jCMuM'],_0x14a043[_0x5111ac(0x22b)],_0x14a043['CJiil'],_0x14a043['hKNSa'],_0x14a043[_0x5111ac(0x2a0)],_0x14a043[_0x5111ac(0x2b0)],_0x14a043[_0x5111ac(0x2a8)],'ma_phi',_0x14a043[_0x5111ac(0x219)],_0x14a043[_0x5111ac(0x278)],_0x14a043[_0x5111ac(0x205)],_0x14a043[_0x5111ac(0x1fd)],_0x14a043[_0x5111ac(0x277)],_0x14a043['MyVOu'],_0x14a043[_0x5111ac(0x246)],_0x5111ac(0x26e),_0x5111ac(0x27d),_0x14a043[_0x5111ac(0x216)],_0x5111ac(0x1ed),_0x14a043['JjDsc'],_0x14a043[_0x5111ac(0x29b)],_0x14a043[_0x5111ac(0x29a)],_0x14a043['kvgIu'],_0x14a043[_0x5111ac(0x213)],_0x5111ac(0x255),_0x14a043[_0x5111ac(0x2ba)],'ngay',_0x14a043[_0x5111ac(0x298)],_0x14a043['VUJRl'],_0x14a043['euCWL'],_0x14a043['onjUT'],_0x14a043['DredS']]),_0x424828['groupBy'](_0x40f8ed,[_0x14a043[_0x5111ac(0x222)],'ps_co',_0x14a043[_0x5111ac(0x253)],_0x14a043[_0x5111ac(0x2c9)]],(_0x35b2f5,_0x9d314b)=>{const _0x297517=_0x5111ac;if(_0x35b2f5)return _0x55c863[_0x297517(0x2b4)](_0x21b8c9,_0x35b2f5);_0x2233f4(null,_0x9d314b);});}else _0x14a043[_0x5111ac(0x22a)](setImmediate,async()=>{const _0x258dd2=_0x5111ac,_0xf27842={'szYZc':function(_0x432e48,_0x52e1b5){const _0x222c72=_0x509f;return _0x3339b7[_0x222c72(0x25f)](_0x432e48,_0x52e1b5);},'ReXfg':_0x3339b7['VnFTG'],'APPjs':function(_0x56c660,_0x23511e){const _0x13dd51=_0x509f;return _0x3339b7[_0x13dd51(0x28a)](_0x56c660,_0x23511e);},'eXXZa':function(_0x3974b4,_0x11feab){const _0x28d0e8=_0x509f;return _0x3339b7[_0x28d0e8(0x25d)](_0x3974b4,_0x11feab);},'BDODp':function(_0x516bf0){return _0x516bf0();}};let _0x551893={};_['extend'](_0x551893,_0x3a3de8);_0x551893['tk']&&(_0x551893[_0x258dd2(0x2cc)]=_0x551893['tk'],delete _0x551893['tk']);_0x551893[_0x258dd2(0x2c5)]&&(_0x551893[_0x258dd2(0x24c)]=_0x551893[_0x258dd2(0x2c5)],delete _0x551893[_0x258dd2(0x2c5)]);const _0x1999d1=0xf4240;let _0xc6f131=0x0,_0x5572cf=[];const _0x5b9f3d=await _0x5510ca[_0x258dd2(0x2ce)](_0x551893)[_0x258dd2(0x24d)](_0x3339b7[_0x258dd2(0x200)](_0xc6f131,_0x1999d1))['limit'](_0x1999d1)[_0x258dd2(0x217)](_0x258dd2(0x28b));_0x3339b7['zCQqA'](_0x5b9f3d[_0x258dd2(0x2bb)],0x0)&&_0x3339b7['DxyGe'](_0x5b9f3d[0x0][_0x258dd2(0x28b)][_0x258dd2(0x223)],_0x5b9f3d[0x0][_0x258dd2(0x28b)][_0x258dd2(0x2aa)])&&console['error'](_0x3339b7[_0x258dd2(0x266)],_0x551893,_0x5b9f3d[0x0]['executionStats']),async[_0x258dd2(0x2c0)](_0x8583f5=>{const _0x219d82=_0x258dd2,_0x3f60b2={'jcsRM':function(_0x5e5f56,_0x349a0e,_0x288157){return _0x5e5f56(_0x349a0e,_0x288157);},'yjWWZ':_0x219d82(0x2a6),'czWbr':_0x3339b7['CSmRu'],'MZJky':_0x3339b7['IenZr'],'VuuRf':function(_0x29a89a,_0xa6b7c6){return _0x29a89a<_0xa6b7c6;},'eXOSU':function(_0x4c1bb6,_0x3ac969){const _0x156864=_0x219d82;return _0x3339b7[_0x156864(0x265)](_0x4c1bb6,_0x3ac969);},'ixfNQ':function(_0x54f059,_0x42d462){const _0x221ea8=_0x219d82;return _0x3339b7[_0x221ea8(0x25d)](_0x54f059,_0x42d462);},'xVTjQ':function(_0x318eab){const _0x316ade=_0x219d82;return _0x3339b7[_0x316ade(0x1fc)](_0x318eab);}};if(_0x3339b7[_0x219d82(0x286)](_0x3339b7[_0x219d82(0x260)],_0x3339b7['ragdO'])){if(_0x2832b7!='0')return _0x4d2d34(_0x231065);_0x3f60b2[_0x219d82(0x206)](_0x10c282,null,_0x508695);}else _0x5510ca[_0x219d82(0x2ce)](_0x551893)[_0x219d82(0x24d)](_0x3339b7[_0x219d82(0x200)](_0xc6f131,_0x1999d1))[_0x219d82(0x245)](_0x1999d1)['lean']()[_0x219d82(0x2c1)](function(_0x96e622){const _0x5cad06=_0x219d82;if(_0x3f60b2[_0x5cad06(0x27c)]===_0x3f60b2[_0x5cad06(0x24f)])_0x53dcf8[_0x5cad06(0x24c)]=_0x44db60[_0x5cad06(0x2c5)],delete _0x241183[_0x5cad06(0x2c5)];else{console[_0x5cad06(0x1fe)](_0x3f60b2[_0x5cad06(0x22c)],{'page':_0xc6f131,'rows_number':_0x96e622[_0x5cad06(0x2bb)]}),_0x96e622[_0x5cad06(0x21f)](_0x1a976a=>{const _0x4b2b6f=_0x5cad06,_0x2847ad='4|7|0|2|3|1|5|6'[_0x4b2b6f(0x23f)]('|');let _0x59a52d=0x0;while(!![]){switch(_0x2847ad[_0x59a52d++]){case'0':_0x1a976a[_0x4b2b6f(0x2c5)]=_0x1a976a[_0x4b2b6f(0x24c)];continue;case'1':_0x1a976a[_0x4b2b6f(0x261)]=Math[_0x4b2b6f(0x287)](_0x1a976a[_0x4b2b6f(0x2cd)],0x0);continue;case'2':!_0x1a976a[_0x4b2b6f(0x2c5)]&&_0x1a976a[_0x4b2b6f(0x2c3)]&&(_0x1a976a[_0x4b2b6f(0x2c5)]=_0x1a976a['ma_kh_co']);continue;case'3':_0x1a976a[_0x4b2b6f(0x29f)]=_0x1a976a[_0x4b2b6f(0x1f3)];continue;case'4':_0x1a976a['tk']=_0x1a976a[_0x4b2b6f(0x2cc)];continue;case'5':_0x1a976a['ps_co_nt']=0x0;continue;case'6':_0x1a976a[_0x4b2b6f(0x26d)]=0x0;continue;case'7':_0x1a976a[_0x4b2b6f(0x22f)]=_0x1a976a['tk_co'];continue;}break;}}),_0x5572cf=_0x5572cf[_0x5cad06(0x214)](_0x96e622);if(_0x3f60b2[_0x5cad06(0x272)](_0x96e622[_0x5cad06(0x2bb)],_0x1999d1))return _0x3f60b2['eXOSU'](_0x8583f5,'0');_0xc6f131=_0x3f60b2[_0x5cad06(0x296)](_0xc6f131,0x1),_0x3f60b2[_0x5cad06(0x2b7)](_0x8583f5);}})['catch'](_0x2843c4=>{const _0x39c501=_0x219d82;_0xf27842[_0x39c501(0x20f)](_0x8583f5,_0x2843c4);});},_0x28bb87=>{const _0x211d4a=_0x258dd2;if(_0x3339b7[_0x211d4a(0x20a)](_0x3339b7['StfUs'],_0x3339b7[_0x211d4a(0x28e)])){_0x26d484[_0x211d4a(0x1fe)](_0xf27842[_0x211d4a(0x241)],{'page':_0x57149d,'rows_number':_0x32aff6['length']}),_0xc08ef[_0x211d4a(0x21f)](_0x14d0ff=>{const _0x526d94=_0x211d4a,_0x2885e8='5|2|3|1|0|4|7|6'[_0x526d94(0x23f)]('|');let _0x16ad74=0x0;while(!![]){switch(_0x2885e8[_0x16ad74++]){case'0':_0x14d0ff[_0x526d94(0x218)]=_0x14d0ff[_0x526d94(0x1f3)];continue;case'1':!_0x14d0ff[_0x526d94(0x2c5)]&&_0x14d0ff[_0x526d94(0x24c)]&&(_0x14d0ff[_0x526d94(0x2c5)]=_0x14d0ff[_0x526d94(0x24c)]);continue;case'2':_0x14d0ff['tk_du']=_0x14d0ff[_0x526d94(0x2cc)];continue;case'3':_0x14d0ff[_0x526d94(0x2c5)]=_0x14d0ff[_0x526d94(0x2c3)];continue;case'4':_0x14d0ff[_0x526d94(0x26d)]=_0x4e67f7[_0x526d94(0x287)](_0x14d0ff[_0x526d94(0x2cd)],0x0);continue;case'5':_0x14d0ff['tk']=_0x14d0ff[_0x526d94(0x207)];continue;case'6':_0x14d0ff[_0x526d94(0x261)]=0x0;continue;case'7':_0x14d0ff[_0x526d94(0x29f)]=0x0;continue;}break;}}),_0x298286=_0x454ed1['concat'](_0x34e695);if(_0xf27842['APPjs'](_0x263525[_0x211d4a(0x2bb)],_0x1c6aa3))return _0xd77236('0');_0xd517ba=_0xf27842['eXXZa'](_0x3ba67f,0x1),_0xf27842[_0x211d4a(0x249)](_0x502672);}else{if(_0x3339b7['ASgQO'](_0x28bb87,'0'))return _0x3347a2(_0x28bb87);_0x3339b7[_0x211d4a(0x1ec)](_0x3347a2,null,_0x5572cf);}});});},'ps_co':function(_0x3d4ab3){const _0x20ece0=_0x2e6bef,_0x2bf4da={'PVGVp':function(_0x5af195,_0x4fc28c){return _0x14a043['pFqws'](_0x5af195,_0x4fc28c);},'Bedcm':_0x14a043[_0x20ece0(0x23b)],'OBkhX':function(_0x27ddef,_0x227920){const _0x580e32=_0x20ece0;return _0x14a043[_0x580e32(0x233)](_0x27ddef,_0x227920);},'axuXs':function(_0x15dcd8,_0x586536){return _0x14a043['pFqws'](_0x15dcd8,_0x586536);},'uHcAy':_0x14a043[_0x20ece0(0x225)],'ukPul':_0x14a043[_0x20ece0(0x28d)],'TmMuw':function(_0x3dd98e,_0x213edd){return _0x3dd98e>_0x213edd;},'lkeVO':_0x14a043[_0x20ece0(0x21e)],'BaKCi':function(_0x2970ae,_0x176ce6){const _0x354901=_0x20ece0;return _0x14a043[_0x354901(0x2cb)](_0x2970ae,_0x176ce6);},'vkRFL':function(_0x994e20,_0xf7fdc){return _0x994e20!=_0xf7fdc;},'CJmPo':function(_0x3efc16,_0x533ab8){const _0x437eb4=_0x20ece0;return _0x14a043[_0x437eb4(0x25e)](_0x3efc16,_0x533ab8);},'lrwkN':function(_0x391a19,_0x348822,_0x4f9173){const _0x29a21e=_0x20ece0;return _0x14a043[_0x29a21e(0x252)](_0x391a19,_0x348822,_0x4f9173);},'FYBPj':function(_0x247626,_0x9ec505){return _0x247626===_0x9ec505;},'qlfcF':_0x20ece0(0x279),'ydiBI':_0x20ece0(0x26b),'gRFvH':function(_0x314871,_0x4033f3){const _0xab8c0b=_0x20ece0;return _0x14a043[_0xab8c0b(0x203)](_0x314871,_0x4033f3);},'iOvrF':_0x20ece0(0x258)};_0x14a043[_0x20ece0(0x256)](setImmediate,()=>{const _0x5cf6e0=_0x20ece0,_0x16616b={'fULEs':function(_0x4c6ceb,_0x540e39){return _0x2bf4da['OBkhX'](_0x4c6ceb,_0x540e39);},'NLTBx':function(_0x318270,_0x5e185f){const _0x35390f=_0x509f;return _0x2bf4da[_0x35390f(0x221)](_0x318270,_0x5e185f);},'DMjNM':_0x2bf4da['ukPul'],'FvMYU':function(_0x4f2001,_0x3744a1){return _0x4f2001<_0x3744a1;},'RKhIP':function(_0x287ef3,_0x54d65b){const _0x59bb12=_0x509f;return _0x2bf4da[_0x59bb12(0x1f6)](_0x287ef3,_0x54d65b);},'RYVup':_0x5cf6e0(0x276),'esMwb':_0x2bf4da[_0x5cf6e0(0x208)],'tkFYx':function(_0x3170c5,_0x4bd596){return _0x3170c5+_0x4bd596;},'DkfRz':function(_0x1506dd){return _0x1506dd();},'eHeRC':function(_0x2d1260,_0x4fea0f){const _0x1a76b0=_0x5cf6e0;return _0x2bf4da[_0x1a76b0(0x297)](_0x2d1260,_0x4fea0f);},'spmKP':_0x5cf6e0(0x282),'kEMpc':function(_0x2d18dd,_0x3d356f){return _0x2bf4da['vkRFL'](_0x2d18dd,_0x3d356f);},'BvMkM':function(_0x207f2d,_0x43640f){const _0x324f9a=_0x5cf6e0;return _0x2bf4da[_0x324f9a(0x2a9)](_0x207f2d,_0x43640f);},'CTcyM':function(_0x252ea9,_0x1e4e3b,_0x1afb72){const _0x5c8beb=_0x5cf6e0;return _0x2bf4da[_0x5c8beb(0x268)](_0x252ea9,_0x1e4e3b,_0x1afb72);},'KfUOy':function(_0x2f07db,_0x1c6828){const _0xf12c25=_0x5cf6e0;return _0x2bf4da[_0xf12c25(0x2a5)](_0x2f07db,_0x1c6828);},'LaQjN':function(_0x3b61db,_0x1839c4){return _0x3b61db(_0x1839c4);}};if(_0x2bf4da['FYBPj'](_0x2bf4da[_0x5cf6e0(0x232)],_0x2bf4da['qlfcF'])){let _0x776f95={};_[_0x5cf6e0(0x215)](_0x776f95,_0x3a3de8);_0x776f95['tk']&&(_0x2bf4da['PVGVp'](_0x5cf6e0(0x26b),_0x2bf4da[_0x5cf6e0(0x243)])?_0x16616b['fULEs'](_0x4f6afe,_0xbe65c7):(_0x776f95[_0x5cf6e0(0x207)]=_0x776f95['tk'],delete _0x776f95['tk']));if(_0x776f95['ma_kh']){if(_0x2bf4da['gRFvH'](_0x2bf4da['iOvrF'],_0x5cf6e0(0x1f7)))_0x776f95['ma_kh_co']=_0x776f95['ma_kh'],delete _0x776f95[_0x5cf6e0(0x2c5)];else{const _0x4f36fa={'AlkVh':function(_0x54083f,_0x4da3cd){return _0x16616b['NLTBx'](_0x54083f,_0x4da3cd);},'CSkXy':_0x16616b[_0x5cf6e0(0x23d)],'TOXwq':function(_0xf405ba,_0x1e1257){const _0x2d7a1a=_0x5cf6e0;return _0x16616b[_0x2d7a1a(0x227)](_0xf405ba,_0x1e1257);},'mwlMM':function(_0x3eedf1,_0xe6dadf){return _0x3eedf1>_0xe6dadf;},'MioeK':function(_0x2bd3d4,_0x502987){const _0x24bc5b=_0x5cf6e0;return _0x16616b[_0x24bc5b(0x259)](_0x2bd3d4,_0x502987);}};_0xf511eb=_0x6f9645[_0x5cf6e0(0x22e)]((_0x238cd9,_0x16087f)=>{const _0x3ceb4e=_0x5cf6e0;let _0x3fc0b7=_0x4f36fa[_0x3ceb4e(0x202)](_0x2e343c,_0x238cd9[_0x3ceb4e(0x295)])[_0x3ceb4e(0x280)](_0x4f36fa[_0x3ceb4e(0x2cf)])[_0x3ceb4e(0x2b9)]()[_0x3ceb4e(0x23c)](),_0x11f1da=_0x4f36fa[_0x3ceb4e(0x202)](_0x350fbf,_0x16087f['ngay_ct'])['endOf']('date')[_0x3ceb4e(0x2b9)]()['getTime']();if(_0x3fc0b7<_0x11f1da)return-0x1;if(_0x3fc0b7>_0x11f1da)return 0x1;if(_0x4f36fa[_0x3ceb4e(0x269)](_0x238cd9[_0x3ceb4e(0x201)],_0x16087f['so_ct']))return-0x1;if(_0x4f36fa[_0x3ceb4e(0x29c)](_0x238cd9[_0x3ceb4e(0x201)],_0x16087f[_0x3ceb4e(0x201)]))return 0x1;if(_0x238cd9['id_ct']<_0x16087f[_0x3ceb4e(0x25a)])return-0x1;if(_0x4f36fa['mwlMM'](_0x238cd9[_0x3ceb4e(0x25a)],_0x16087f[_0x3ceb4e(0x25a)]))return 0x1;if(_0x4f36fa[_0x3ceb4e(0x269)](_0x238cd9[_0x3ceb4e(0x2a7)],_0x16087f[_0x3ceb4e(0x2a7)]))return-0x1;if(_0x4f36fa[_0x3ceb4e(0x2be)](_0x238cd9[_0x3ceb4e(0x2a7)],_0x16087f[_0x3ceb4e(0x2a7)]))return 0x1;if(_0x4f36fa[_0x3ceb4e(0x269)](_0x238cd9['ps_no'],_0x16087f['ps_no']))return 0x1;if(_0x238cd9[_0x3ceb4e(0x261)]>_0x16087f[_0x3ceb4e(0x261)])return-0x1;if(_0x238cd9['ps_co']<_0x16087f[_0x3ceb4e(0x26d)])return-0x1;if(_0x4f36fa[_0x3ceb4e(0x29c)](_0x238cd9['ps_co'],_0x16087f[_0x3ceb4e(0x26d)]))return 0x1;return 0x0;});}}const _0x5ae47b=0xf4240;let _0x45738e=0x0,_0x4b9629=[];async[_0x5cf6e0(0x2c0)](_0x306f30=>{const _0x5eb3ef=_0x5cf6e0,_0x2bb7c6={'YvYTL':function(_0x1878f9,_0x543a53){return _0x2bf4da['PVGVp'](_0x1878f9,_0x543a53);},'iNauA':_0x5eb3ef(0x20b),'ZNUGd':_0x2bf4da[_0x5eb3ef(0x1ee)],'fEMbB':function(_0x22f26d,_0xa03f65){const _0x5653ef=_0x5eb3ef;return _0x2bf4da[_0x5653ef(0x221)](_0x22f26d,_0xa03f65);}};_0x2bf4da[_0x5eb3ef(0x281)](_0x5eb3ef(0x244),_0x2bf4da['uHcAy'])?_0x57c2d1(null,_0xcc8bfe):_0x5510ca['find'](_0x776f95)['skip'](_0x45738e*_0x5ae47b)[_0x5eb3ef(0x245)](_0x5ae47b)[_0x5eb3ef(0x204)]()['then'](function(_0xbe6ec4){const _0x413006=_0x5eb3ef,_0x309984={'TQhJi':_0x16616b[_0x413006(0x239)]};console['log'](_0x16616b[_0x413006(0x1f9)],{'page':_0x45738e,'rows_number':_0xbe6ec4[_0x413006(0x2bb)]}),_0xbe6ec4['forEach'](_0x5e64e1=>{const _0x54efcc=_0x413006,_0x25cce4=_0x309984[_0x54efcc(0x2a1)][_0x54efcc(0x23f)]('|');let _0x4aaece=0x0;while(!![]){switch(_0x25cce4[_0x4aaece++]){case'0':_0x5e64e1['tk']=_0x5e64e1[_0x54efcc(0x207)];continue;case'1':_0x5e64e1[_0x54efcc(0x22f)]=_0x5e64e1[_0x54efcc(0x2cc)];continue;case'2':_0x5e64e1[_0x54efcc(0x29f)]=0x0;continue;case'3':_0x5e64e1[_0x54efcc(0x218)]=_0x5e64e1[_0x54efcc(0x1f3)];continue;case'4':_0x5e64e1[_0x54efcc(0x26d)]=Math[_0x54efcc(0x287)](_0x5e64e1['tien'],0x0);continue;case'5':!_0x5e64e1[_0x54efcc(0x2c5)]&&_0x5e64e1[_0x54efcc(0x24c)]&&(_0x5e64e1[_0x54efcc(0x2c5)]=_0x5e64e1[_0x54efcc(0x24c)]);continue;case'6':_0x5e64e1[_0x54efcc(0x261)]=0x0;continue;case'7':_0x5e64e1[_0x54efcc(0x2c5)]=_0x5e64e1['ma_kh_co'];continue;}break;}}),_0x4b9629=_0x4b9629[_0x413006(0x214)](_0xbe6ec4);if(_0xbe6ec4[_0x413006(0x2bb)]<_0x5ae47b)return _0x16616b[_0x413006(0x262)](_0x306f30,'0');_0x45738e=_0x16616b['tkFYx'](_0x45738e,0x1),_0x16616b[_0x413006(0x27f)](_0x306f30);})[_0x5eb3ef(0x236)](_0x28ea5f=>{const _0x159a21=_0x5eb3ef;_0x2bb7c6['YvYTL'](_0x2bb7c6[_0x159a21(0x20c)],_0x2bb7c6[_0x159a21(0x20e)])?_0x2bb7c6['fEMbB'](_0x306f30,_0x28ea5f):_0x1b42d9[_0x159a21(0x2c5)]=_0x56fbea[_0x159a21(0x2c3)];});},_0x284131=>{const _0x267269=_0x5cf6e0;if(_0x16616b['eHeRC'](_0x16616b[_0x267269(0x257)],_0x16616b['spmKP'])){if(_0x16616b[_0x267269(0x2b1)](_0x284131,'0'))return _0x16616b['BvMkM'](_0x3d4ab3,_0x284131);_0x16616b[_0x267269(0x27a)](_0x3d4ab3,null,_0x4b9629);}else _0x49dc42[_0x267269(0x2c5)]=_0x5f6db6['ma_kh_no'];});}else{if(_0x16616b[_0x5cf6e0(0x2ad)](_0x190b0b,'0'))return _0x16616b['LaQjN'](_0x2a57c1,_0x15d18f);_0x3afe84(null,_0x173052);}});}},function(_0x46ecff,_0x216df0){const _0x5bcea7=_0x2e6bef,_0x3f9232={'RAJzG':function(_0xf92478,_0x2ef433){const _0x226e27=_0x509f;return _0x14a043[_0x226e27(0x25e)](_0xf92478,_0x2ef433);},'Wovud':function(_0x3aef21,_0x492309){const _0x1f9a7a=_0x509f;return _0x14a043[_0x1f9a7a(0x209)](_0x3aef21,_0x492309);},'JcsBJ':_0x14a043['AwmdH'],'Fhfqz':function(_0x122038,_0x34afb7){return _0x122038<_0x34afb7;},'iIhgL':function(_0x331846,_0xb5225){const _0x2114dc=_0x509f;return _0x14a043[_0x2114dc(0x289)](_0x331846,_0xb5225);},'hPatr':function(_0x601b37,_0x1b958c){return _0x601b37>_0x1b958c;},'Atrpd':function(_0x2dfefd,_0x1dd782){const _0x6c81e4=_0x509f;return _0x14a043[_0x6c81e4(0x289)](_0x2dfefd,_0x1dd782);}};if(_0x46ecff)return _0x56d8bb(_0x46ecff);let _0x4897fc=[..._0x216df0[_0x5bcea7(0x261)],..._0x216df0[_0x5bcea7(0x26d)]];console[_0x5bcea7(0x1fe)](_0x14a043[_0x5bcea7(0x230)],{'rows_number':_0x4897fc[_0x5bcea7(0x2bb)]});_0x6a26f4&&_0x6a26f4['sortData']&&(_0x4897fc=_0x4897fc[_0x5bcea7(0x22e)]((_0x3833f8,_0x5d7baa)=>{const _0x286d7e=_0x5bcea7;let _0x2be775=_0x3f9232[_0x286d7e(0x238)](moment,_0x3833f8['ngay_ct'])[_0x286d7e(0x280)](_0x286d7e(0x2c6))['toDate']()['getTime'](),_0x1f66f5=_0x3f9232[_0x286d7e(0x211)](moment,_0x5d7baa[_0x286d7e(0x295)])['endOf'](_0x3f9232[_0x286d7e(0x294)])[_0x286d7e(0x2b9)]()[_0x286d7e(0x23c)]();if(_0x3f9232[_0x286d7e(0x29d)](_0x2be775,_0x1f66f5))return-0x1;if(_0x3f9232[_0x286d7e(0x22d)](_0x2be775,_0x1f66f5))return 0x1;if(_0x3833f8[_0x286d7e(0x201)]<_0x5d7baa[_0x286d7e(0x201)])return-0x1;if(_0x3f9232[_0x286d7e(0x22d)](_0x3833f8[_0x286d7e(0x201)],_0x5d7baa[_0x286d7e(0x201)]))return 0x1;if(_0x3833f8[_0x286d7e(0x25a)]<_0x5d7baa[_0x286d7e(0x25a)])return-0x1;if(_0x3f9232[_0x286d7e(0x22d)](_0x3833f8[_0x286d7e(0x25a)],_0x5d7baa[_0x286d7e(0x25a)]))return 0x1;if(_0x3f9232[_0x286d7e(0x29d)](_0x3833f8['nh_dk'],_0x5d7baa[_0x286d7e(0x2a7)]))return-0x1;if(_0x3f9232['iIhgL'](_0x3833f8[_0x286d7e(0x2a7)],_0x5d7baa[_0x286d7e(0x2a7)]))return 0x1;if(_0x3f9232[_0x286d7e(0x29d)](_0x3833f8[_0x286d7e(0x261)],_0x5d7baa['ps_no']))return 0x1;if(_0x3f9232[_0x286d7e(0x2a3)](_0x3833f8[_0x286d7e(0x261)],_0x5d7baa[_0x286d7e(0x261)]))return-0x1;if(_0x3f9232['Fhfqz'](_0x3833f8[_0x286d7e(0x26d)],_0x5d7baa['ps_co']))return-0x1;if(_0x3f9232[_0x286d7e(0x2b2)](_0x3833f8['ps_co'],_0x5d7baa[_0x286d7e(0x26d)]))return 0x1;return 0x0;}));if(_0x6a26f4&&_0x6a26f4[_0x5bcea7(0x288)]){let _0x5eba1b;_0x6a26f4[_0x5bcea7(0x288)]&&(_0x14a043['lVmoO'](_0x14a043[_0x5bcea7(0x1ef)],_0x14a043[_0x5bcea7(0x21b)])?(_['isArray'](_0x6a26f4['groupBy'])&&_0x14a043['TKToc'](_0x6a26f4[_0x5bcea7(0x288)][_0x5bcea7(0x2bb)],0x0)&&(_0x5eba1b=_0x6a26f4[_0x5bcea7(0x288)]),_0x5eba1b=_0x5eba1b||[_0x14a043[_0x5bcea7(0x20d)],_0x14a043[_0x5bcea7(0x271)],_0x14a043[_0x5bcea7(0x270)],_0x5bcea7(0x220),_0x14a043['HEYBN'],_0x5bcea7(0x295),_0x14a043[_0x5bcea7(0x2b6)],_0x14a043['kcWAL'],_0x5bcea7(0x21a),'tk',_0x14a043[_0x5bcea7(0x248)],_0x14a043[_0x5bcea7(0x231)],_0x14a043[_0x5bcea7(0x22b)],_0x14a043[_0x5bcea7(0x21d)],_0x14a043[_0x5bcea7(0x250)],_0x14a043[_0x5bcea7(0x2a0)],_0x14a043[_0x5bcea7(0x2b0)],_0x14a043[_0x5bcea7(0x2a8)],_0x14a043['nRpDY'],_0x5bcea7(0x2c4),_0x5bcea7(0x27b),_0x14a043[_0x5bcea7(0x205)],_0x5bcea7(0x292),_0x14a043['XjUHx'],_0x14a043[_0x5bcea7(0x293)],_0x14a043['ahRaf'],_0x14a043['inHxK'],_0x14a043['ddIRi'],_0x14a043[_0x5bcea7(0x216)],_0x14a043[_0x5bcea7(0x23a)],_0x14a043['JjDsc'],_0x14a043[_0x5bcea7(0x29b)],_0x14a043[_0x5bcea7(0x29a)],_0x14a043[_0x5bcea7(0x291)],_0x14a043['ULnML'],_0x14a043[_0x5bcea7(0x25b)],_0x14a043['zRrdH'],_0x14a043['LsmZU'],'thang',_0x14a043[_0x5bcea7(0x251)],_0x14a043['euCWL'],_0x5bcea7(0x2d1),_0x14a043[_0x5bcea7(0x21c)]]):(_0x3858cb['tk']=_0xdee82b['tk_no'],_0x2990bd[_0x5bcea7(0x22f)]=_0x3cfadb['tk_co'],_0x58f971[_0x5bcea7(0x2c5)]=_0xbca30d[_0x5bcea7(0x24c)],!_0x31a7fe['ma_kh']&&_0x413f0e[_0x5bcea7(0x2c3)]&&(_0x20ffe0[_0x5bcea7(0x2c5)]=_0x21e035['ma_kh_co']),_0x25f8e6[_0x5bcea7(0x29f)]=_0x2405f2[_0x5bcea7(0x1f3)],_0x52805f[_0x5bcea7(0x261)]=_0x57f658[_0x5bcea7(0x287)](_0x1cbfaa[_0x5bcea7(0x2cd)],0x0),_0x49f57d[_0x5bcea7(0x218)]=0x0,_0x59f696[_0x5bcea7(0x26d)]=0x0)),_0x4897fc['groupBy'](_0x5eba1b,[_0x14a043['YYDrs'],_0x5bcea7(0x26d),_0x14a043[_0x5bcea7(0x253)],_0x14a043[_0x5bcea7(0x2c9)]],(_0x3acc79,_0x2f6ec2)=>{const _0x53908e=_0x5bcea7;if(_0x3acc79)return _0x14a043[_0x53908e(0x1f0)](_0x56d8bb,_0x3acc79);_0x14a043[_0x53908e(0x252)](_0x56d8bb,null,_0x2f6ec2);});}else _0x14a043[_0x5bcea7(0x224)](_0x56d8bb,null,_0x4897fc);});};
|
package/server/libs/ctdiem.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
const dkdiem=require("./dkdiem"),transaction=global.getModel("transaction"),async=require("async");
|
|
2
|
-
module.exports=function($condition$$,$fn$$){if($condition$$&&$condition$$.tu_ngay&&$condition$$.email&&$condition$$.den_ngay&&$condition$$.id_app){var $tu_ngay$$=$condition$$.tu_ngay,$den_ngay$$=$condition$$.den_ngay,$id_app$$=$condition$$.id_app;async.series({dn:function($callback$$){dkdiem($condition$$,function($error$$,$result$$){if($error$$)return $callback$$($error$$);$callback$$(null,$result$$)})},ps:function($callback$$){transaction.find({id_app:$id_app$$,ngay_ct:{$gte:$tu_ngay$$,$lte:$den_ngay$$},
|
|
3
|
-
$or:[{"sender.email":$condition$$.email},{"receiver.email":$condition$$.email}]}).lean().then(function($ps_pss$$){$ps_pss$$=$ps_pss$$.map($p_x$$=>{$p_x$$=Object.assign({},$p_x$$);$p_x$$.sender.email===$condition$$.email?($p_x$$.email=$p_x$$.sender.email,$p_x$$.sl_xuat=$p_x$$.amount,$p_x$$.sl_nhap=0):($p_x$$.email=$p_x$$.receiver.email,$p_x$$.sl_nhap=$p_x$$.amount,$p_x$$.sl_xuat=0);return[$p_x$$]}).reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]).filter($r$$=>$r$$.email===$condition$$.email);$callback$$(null,
|
|
4
|
-
$ps_pss$$)}).catch($error$$=>{$callback$$($error$$)})}},function($error$$,$results$$){if($error$$)$fn$$($error$$);else{var $data$$=[];$results$$.ps.forEach(function($r$$){$r$$.sysorder=5;$r$$.bold=!1;$data$$.push($r$$)});async.series({ton_dau:function($callback$$){var $ton_dau$$=$results$$.dn.csum("ton00");$callback$$(null,$ton_dau$$)},sl_nhap:function($callback$$){var $sl_nhap$$=$results$$.ps.csum("sl_nhap");$callback$$(null,$sl_nhap$$)},sl_xuat:function($callback$$){var $sl_xuat$$=$results$$.ps.csum("sl_xuat");
|
|
5
|
-
$callback$$(null,$sl_xuat$$)}},function($error$$,$results$$){$data$$.push({sysorder:1,bold:!0,description:"T\u1ed3n \u0111\u1ea7u k\u1ef3",sl_nhap:$results$$.ton_dau,sl_xuat:0});$data$$.push({sysorder:6,bold:!0,description:"C\u1ed9ng ph\u00e1t sinh trong k\u1ef3",sl_nhap:$results$$.sl_nhap,sl_xuat:$results$$.sl_xuat});$data$$.push({sysorder:9,bold:!0,description:"T\u1ed3n cu\u1ed1i k\u1ef3",sl_nhap:$results$$.ton_dau+$results$$.sl_nhap-$results$$.sl_xuat});$fn$$(null,$data$$)})}})}else $fn$$("L\u1ed7i: B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: tu_ngay,den_ngay,email,id_app")};
|
|
1
|
+
function _0x514f(_0xa617ce,_0x84efd8){const _0x1ad9bd=_0x1ad9();return _0x514f=function(_0x514f77,_0x542ac8){_0x514f77=_0x514f77-0x64;let _0x5aa31b=_0x1ad9bd[_0x514f77];if(_0x514f['LAutov']===undefined){var _0x177ace=function(_0x5ee6a8){const _0x1ba3c9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3698ff='',_0x260c6f='';for(let _0x512281=0x0,_0x899e20,_0x35e659,_0x59fc62=0x0;_0x35e659=_0x5ee6a8['charAt'](_0x59fc62++);~_0x35e659&&(_0x899e20=_0x512281%0x4?_0x899e20*0x40+_0x35e659:_0x35e659,_0x512281++%0x4)?_0x3698ff+=String['fromCharCode'](0xff&_0x899e20>>(-0x2*_0x512281&0x6)):0x0){_0x35e659=_0x1ba3c9['indexOf'](_0x35e659);}for(let _0x2ee297=0x0,_0x5bb83d=_0x3698ff['length'];_0x2ee297<_0x5bb83d;_0x2ee297++){_0x260c6f+='%'+('00'+_0x3698ff['charCodeAt'](_0x2ee297)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x260c6f);};_0x514f['SdNBXN']=_0x177ace,_0xa617ce=arguments,_0x514f['LAutov']=!![];}const _0x566d4f=_0x1ad9bd[0x0],_0x3c6145=_0x514f77+_0x566d4f,_0x22c5dd=_0xa617ce[_0x3c6145];return!_0x22c5dd?(_0x5aa31b=_0x514f['SdNBXN'](_0x5aa31b),_0xa617ce[_0x3c6145]=_0x5aa31b):_0x5aa31b=_0x22c5dd,_0x5aa31b;},_0x514f(_0xa617ce,_0x84efd8);}const _0x339028=_0x514f;(function(_0x197c64,_0x1d0f83){const _0x178580=_0x514f,_0x76561f=_0x197c64();while(!![]){try{const _0x3132ed=parseInt(_0x178580(0xac))/0x1*(parseInt(_0x178580(0x7b))/0x2)+-parseInt(_0x178580(0x65))/0x3+-parseInt(_0x178580(0x87))/0x4+-parseInt(_0x178580(0x6b))/0x5+parseInt(_0x178580(0x92))/0x6*(-parseInt(_0x178580(0xa5))/0x7)+parseInt(_0x178580(0xa8))/0x8*(-parseInt(_0x178580(0x9a))/0x9)+parseInt(_0x178580(0x85))/0xa*(parseInt(_0x178580(0x6e))/0xb);if(_0x3132ed===_0x1d0f83)break;else _0x76561f['push'](_0x76561f['shift']());}catch(_0x44f0ef){_0x76561f['push'](_0x76561f['shift']());}}}(_0x1ad9,0xa6f92));const dkdiem=require('./dkdiem'),transaction=global[_0x339028(0xb6)](_0x339028(0x82)),async=require('async');module[_0x339028(0x90)]=function(_0x4bbeba,_0x262cd2){const _0x451482=_0x339028,_0x1fc579={'Usunn':function(_0x3cdb4f,_0x5064df){return _0x3cdb4f(_0x5064df);},'UulgZ':'Lỗi:\x20Báo\x20cáo\x20này\x20yêu\x20cầu\x20các\x20tham\x20số:\x20tu_ngay,den_ngay,email,id_app','XGfGy':function(_0x13ebf3,_0x23e2bd,_0x475c53){return _0x13ebf3(_0x23e2bd,_0x475c53);},'rCsbt':'Tồn\x20đầu\x20kỳ','Pqjqy':function(_0x4d9821,_0x45eba8){return _0x4d9821-_0x45eba8;},'uhtWG':function(_0x4ad886,_0x2d5a42){return _0x4ad886===_0x2d5a42;},'YSxTh':_0x451482(0x66),'dsGXN':function(_0x414790,_0x56e123){return _0x414790!==_0x56e123;},'TuEag':_0x451482(0xaf),'GHqso':function(_0x22d237,_0x587854){return _0x22d237!==_0x587854;},'FQnGj':_0x451482(0xb9),'XZuGX':function(_0x9f8637,_0x4b01d7){return _0x9f8637===_0x4b01d7;},'ZjdZC':_0x451482(0x9e),'jdFNX':'sl_nhap','tqGCs':function(_0x4b5bad,_0x2f1c30,_0x83bf27){return _0x4b5bad(_0x2f1c30,_0x83bf27);},'wnXlR':function(_0x5b95eb,_0xe2c0c7){return _0x5b95eb===_0xe2c0c7;},'mBplm':_0x451482(0x78),'ziexw':function(_0x1ad732,_0x2f4a5b){return _0x1ad732(_0x2f4a5b);},'oqMnj':_0x451482(0x97),'UiqtC':function(_0x3a4bc0,_0x38693d){return _0x3a4bc0(_0x38693d);},'Bqtll':_0x451482(0x74),'IbbUn':function(_0x2b3f0e,_0x25b19c){return _0x2b3f0e(_0x25b19c);}};if(!_0x4bbeba||!_0x4bbeba[_0x451482(0x75)]||!_0x4bbeba[_0x451482(0xb5)]||!_0x4bbeba[_0x451482(0x81)]||!_0x4bbeba[_0x451482(0xb7)]){if(_0x1fc579['Bqtll']!==_0x1fc579[_0x451482(0x72)]){_0x1fc579[_0x451482(0x7d)](_0x1ba3c9,_0x1fc579[_0x451482(0xb4)]);return;}else{_0x1fc579[_0x451482(0x67)](_0x262cd2,_0x1fc579[_0x451482(0xb4)]);return;}}let _0x2eb570=_0x4bbeba[_0x451482(0x75)],_0x328d06=_0x4bbeba[_0x451482(0x81)],_0x1b055e=_0x4bbeba[_0x451482(0xb7)];async[_0x451482(0xb0)]({'dn':function(_0x249712){const _0x331ef7=_0x451482;if(_0x331ef7(0x99)===_0x331ef7(0x99))_0x1fc579[_0x331ef7(0x89)](dkdiem,_0x4bbeba,function(_0x48c5f9,_0x4a8175){if(_0x48c5f9)return _0x249712(_0x48c5f9);_0x249712(null,_0x4a8175);});else{if(_0x59a0ae)return _0x1fc579[_0x331ef7(0x7d)](_0x242f58,_0x3edaf9);_0x1fc579['XGfGy'](_0x2729e3,null,_0x136704);}},'ps':function(_0x54a365){const _0x4b4d5a=_0x451482;var _0x212b76={'id_app':_0x1b055e,'ngay_ct':{'$gte':_0x2eb570,'$lte':_0x328d06},'$or':[{'sender.email':_0x4bbeba[_0x4b4d5a(0xb5)]},{'receiver.email':_0x4bbeba[_0x4b4d5a(0xb5)]}]};transaction[_0x4b4d5a(0x7c)](_0x212b76)[_0x4b4d5a(0x9b)]()[_0x4b4d5a(0x8d)](function(_0x243d3b){const _0x3db146=_0x4b4d5a,_0x1a1667={'BazCV':_0x1fc579[_0x3db146(0x6a)],'pcKVs':_0x3db146(0x97),'VIcJd':function(_0x4ffa13,_0x5c0511){const _0x4e048d=_0x3db146;return _0x1fc579[_0x4e048d(0xa0)](_0x4ffa13,_0x5c0511);},'LppCg':function(_0x3b9a7b,_0x595cb2){const _0x38d278=_0x3db146;return _0x1fc579[_0x38d278(0xad)](_0x3b9a7b,_0x595cb2);},'kDmYK':_0x1fc579[_0x3db146(0xb2)]};if(_0x1fc579[_0x3db146(0xb1)](_0x1fc579[_0x3db146(0xa2)],_0x1fc579[_0x3db146(0xa2)])){let _0x5a2711=_0x409872['assign']({},_0x40c205);return _0x5a2711[_0x3db146(0xa9)][_0x3db146(0xb5)]===_0x1575b1[_0x3db146(0xb5)]?(_0x5a2711['email']=_0x5a2711[_0x3db146(0xa9)]['email'],_0x5a2711[_0x3db146(0x78)]=_0x5a2711[_0x3db146(0x79)],_0x5a2711[_0x3db146(0xae)]=0x0):(_0x5a2711[_0x3db146(0xb5)]=_0x5a2711['receiver'][_0x3db146(0xb5)],_0x5a2711['sl_nhap']=_0x5a2711[_0x3db146(0x79)],_0x5a2711[_0x3db146(0x78)]=0x0),[_0x5a2711];}else{let _0x417d36=_0x243d3b[_0x3db146(0xb3)](_0x2913ef=>{const _0x204847=_0x3db146,_0x514c35={'rJcOh':_0x1a1667[_0x204847(0x6d)],'NtkVl':_0x1a1667['pcKVs'],'XbqYI':function(_0x407b9f,_0x1a10f0){const _0x3b7156=_0x204847;return _0x1a1667[_0x3b7156(0xa4)](_0x407b9f,_0x1a10f0);},'GyrFx':function(_0x4f4dee,_0x4a0b4d){return _0x4f4dee+_0x4a0b4d;},'UvDUT':function(_0x2cdc2c,_0x511990,_0x3eeb35){return _0x2cdc2c(_0x511990,_0x3eeb35);}};let _0x3e5e35=Object[_0x204847(0xaa)]({},_0x2913ef);return _0x1a1667[_0x204847(0x69)](_0x3e5e35['sender'][_0x204847(0xb5)],_0x4bbeba[_0x204847(0xb5)])?(_0x3e5e35[_0x204847(0xb5)]=_0x3e5e35[_0x204847(0xa9)][_0x204847(0xb5)],_0x3e5e35[_0x204847(0x78)]=_0x3e5e35[_0x204847(0x79)],_0x3e5e35[_0x204847(0xae)]=0x0):_0x1a1667[_0x204847(0x96)]===_0x204847(0x66)?(_0x3e5e35[_0x204847(0xb5)]=_0x3e5e35[_0x204847(0x6f)]['email'],_0x3e5e35[_0x204847(0xae)]=_0x3e5e35[_0x204847(0x79)],_0x3e5e35[_0x204847(0x78)]=0x0):(_0x5a4a21[_0x204847(0x9d)]({'sysorder':0x1,'bold':!![],'description':_0x514c35['rJcOh'],'sl_nhap':_0x19e71b['ton_dau'],'sl_xuat':0x0}),_0x52d9c2[_0x204847(0x9d)]({'sysorder':0x6,'bold':!![],'description':_0x514c35['NtkVl'],'sl_nhap':_0xf74523['sl_nhap'],'sl_xuat':_0x553359[_0x204847(0x78)]}),_0x3d5dd5[_0x204847(0x9d)]({'sysorder':0x9,'bold':!![],'description':_0x204847(0x71),'sl_nhap':_0x514c35['XbqYI'](_0x514c35[_0x204847(0x7a)](_0x4f3778[_0x204847(0x6c)],_0x1ea28b[_0x204847(0xae)]),_0x29d265[_0x204847(0x78)])}),_0x514c35[_0x204847(0x8c)](_0x19b709,null,_0x3b6845)),[_0x3e5e35];})[_0x3db146(0x8e)]((_0x41cea3,_0x33b7cf)=>_0x41cea3[_0x3db146(0x88)](_0x33b7cf),[])[_0x3db146(0x86)](_0x23a02f=>_0x23a02f['email']===_0x4bbeba[_0x3db146(0xb5)]);_0x1fc579[_0x3db146(0x89)](_0x54a365,null,_0x417d36);}})[_0x4b4d5a(0x80)](_0x3de18f=>{_0x54a365(_0x3de18f);});}},function(_0x42f0ef,_0x471781){const _0x4df196=_0x451482,_0xdf5f40={'yMDhx':function(_0xc194ee,_0x325e6d){return _0x1fc579['ziexw'](_0xc194ee,_0x325e6d);},'uoblC':function(_0x578d18,_0x40ba99,_0x240b5){const _0x2dae16=_0x514f;return _0x1fc579[_0x2dae16(0x8b)](_0x578d18,_0x40ba99,_0x240b5);},'imEmH':function(_0x43da45,_0x17996d,_0x30654a){return _0x43da45(_0x17996d,_0x30654a);},'PoHfP':function(_0x104ac4,_0x1be50d){return _0x104ac4(_0x1be50d);},'xUhmC':_0x1fc579[_0x4df196(0x6a)],'zTrvw':_0x1fc579[_0x4df196(0x70)],'Mzvag':_0x4df196(0x71),'EAkgt':function(_0x49d0d7,_0x25c214){return _0x49d0d7-_0x25c214;},'bTNnw':function(_0x1ba6de,_0x12fd06){return _0x1ba6de+_0x12fd06;}};if(_0x42f0ef){_0x1fc579[_0x4df196(0x64)](_0x262cd2,_0x42f0ef);return;}var _0x776322=[];_0x471781['ps'][_0x4df196(0x94)](function(_0x386436){const _0x484e2a=_0x4df196;_0x386436['sysorder']=0x5,_0x386436[_0x484e2a(0x8a)]=![],_0x776322['push'](_0x386436);}),async[_0x4df196(0xb0)]({'ton_dau':function(_0x4ce231){const _0x3828f4=_0x4df196;if(_0x1fc579[_0x3828f4(0xa3)](_0x3828f4(0x95),_0x3828f4(0x9f))){var _0x1856e7=_0x471781['dn'][_0x3828f4(0xab)](_0x1fc579[_0x3828f4(0x7f)]);_0x1fc579[_0x3828f4(0x89)](_0x4ce231,null,_0x1856e7);}else{const _0x259a8c={'ITsmB':function(_0x3e5c6b,_0x1170fb){return _0xdf5f40['yMDhx'](_0x3e5c6b,_0x1170fb);},'OjtRb':function(_0x2256a2,_0x45ade4,_0x51eda8){const _0x432db3=_0x3828f4;return _0xdf5f40[_0x432db3(0x8f)](_0x2256a2,_0x45ade4,_0x51eda8);}};_0xdf5f40[_0x3828f4(0xa6)](_0x35e659,_0x59fc62,function(_0x270f1b,_0x5584c5){const _0x2100ef=_0x3828f4;if(_0x270f1b)return _0x259a8c[_0x2100ef(0x98)](_0x532e83,_0x270f1b);_0x259a8c[_0x2100ef(0xa7)](_0x9b9a07,null,_0x5584c5);});}},'sl_nhap':function(_0x5c8665){const _0x149d5a=_0x4df196;if(_0x1fc579[_0x149d5a(0x7e)](_0x149d5a(0x76),_0x1fc579[_0x149d5a(0x91)]))_0x456b6e[_0x149d5a(0xb5)]=_0x53f7e8[_0x149d5a(0x6f)][_0x149d5a(0xb5)],_0x37ceae[_0x149d5a(0xae)]=_0x4ef721[_0x149d5a(0x79)],_0x298bdd[_0x149d5a(0x78)]=0x0;else{var _0x4ccee5=_0x471781['ps']['csum'](_0x1fc579[_0x149d5a(0x77)]);_0x1fc579[_0x149d5a(0x8b)](_0x5c8665,null,_0x4ccee5);}},'sl_xuat':function(_0x544755){const _0x366f4f=_0x4df196;if(_0x1fc579['wnXlR'](_0x366f4f(0x9c),'MuqWF')){_0xdf5f40[_0x366f4f(0xb8)](_0x6e3358,_0x28a049);return;}else{var _0x4b3d95=_0x471781['ps'][_0x366f4f(0xab)](_0x1fc579[_0x366f4f(0x83)]);_0x1fc579[_0x366f4f(0x8b)](_0x544755,null,_0x4b3d95);}}},function(_0x569760,_0x2de388){const _0x4793fc=_0x4df196;_0x776322[_0x4793fc(0x9d)]({'sysorder':0x1,'bold':!![],'description':_0xdf5f40[_0x4793fc(0xa1)],'sl_nhap':_0x2de388[_0x4793fc(0x6c)],'sl_xuat':0x0}),_0x776322['push']({'sysorder':0x6,'bold':!![],'description':_0xdf5f40[_0x4793fc(0x73)],'sl_nhap':_0x2de388[_0x4793fc(0xae)],'sl_xuat':_0x2de388[_0x4793fc(0x78)]}),_0x776322[_0x4793fc(0x9d)]({'sysorder':0x9,'bold':!![],'description':_0xdf5f40[_0x4793fc(0x68)],'sl_nhap':_0xdf5f40[_0x4793fc(0x84)](_0xdf5f40[_0x4793fc(0x93)](_0x2de388[_0x4793fc(0x6c)],_0x2de388[_0x4793fc(0xae)]),_0x2de388[_0x4793fc(0x78)])}),_0xdf5f40['uoblC'](_0x262cd2,null,_0x776322);});});};function _0x1ad9(){const _0x1c30d4=['Dw9IBem','zxHWB3j0CW','wMPKwKm','mte5ntK4DvDlwvDM','yLroBNC','zM9YrwfJAa','tM9ur08','A0rTwuS','q+g7Mw5NihbOW6f0ihnPBMGGDhjVBMCGA+g7SW','svrZBui','wfrXzLy','ounUweXevq','BgvHBG','CgjeyLu','ChvZAa','qu9UCg8','wNbzsfe','uhfQCxK','EfvOBum','vhvfywC','r0HXC28','vKLJsMq','mJffu2z2rwC','Aw1fBuG','t2P0uMi','oda3mZyYne1SAuXPtW','C2vUzgvY','yxnZAwDU','y3n1Bq','mte2mZC3DfLrDNPX','DwH0v0C','C2XFBMHHCa','vfnHqMC','C2vYAwvZ','zhnhwe4','wvn4vgG','BwfW','vxvSz1O','zw1HAwW','z2v0tw9KzwW','AwrFyxbW','ug9izLa','Dg9Umda','vwLXDem','mte5mdm3mfrJAuTpyq','v21tuwG','swjIvw4','txP2ywC','thbWq2C','CKnZyNq','mZa1nJq1u1jPrePA','Dg9Ux2rHDq','qMf6q1y','mZqXodm5mtL1vMvWAgi','CMvJzwL2zxi','B3fnBMO','vog7K24Gy3xHU5fPigVHU7m','qNf0BgW','ELrYDNC','EfDNEuu','DhvFBMDHEq','wNbqBgq','AMrgtLG','C2XFEhvHDa','yw1VDw50','r3LYrNG','nML4yM1wBa','zMLUza','vxn1BM4','wfP1r1G','rLfUr2O','y2f0y2G','zgvUx25NyxK','DhjHBNnHy3rPB24','BujWBg0','rufRz3q','mtbLs252DKC','zMLSDgvY','ndK4mZy2ofvOEfLgrq','y29Uy2f0','weDMr3K','yM9Sza','Dhfhq3m','vxzevvq','DgHLBG','CMvKDwnL'];_0x1ad9=function(){return _0x1c30d4;};return _0x1ad9();}
|
package/server/libs/ctvt.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
const dkvt=require("./dkvt"),sokho=global.getModel("sokho"),async=require("async");
|
|
2
|
-
module.exports=function($condition$$,$fn$$){if(!($condition$$&&$condition$$.tu_ngay&&$condition$$.ma_vt&&$condition$$.den_ngay&&$condition$$.id_app))return $fn$$("L\u1ed7i: B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: tu_ngay,den_ngay,ma_vt,id_app");let $ma_dvcs$$=$condition$$.ma_dvcs,$ma_kho$$=$condition$$.ma_kho,$ma_vt$$=$condition$$.ma_vt,$tu_ngay$$=$condition$$.tu_ngay,$den_ngay$$=$condition$$.den_ngay,$id_app$$=$condition$$.id_app;async.series({dn:function($callback$$){setImmediate(()=>
|
|
3
|
-
{dkvt($condition$$,function($error$$,$result$$){if($error$$)return $callback$$($error$$);$callback$$(null,$result$$)})})},ps:function($callback$$){setImmediate(()=>{let $query$$={id_app:$id_app$$,ngay_ct:{$gte:$tu_ngay$$,$lte:$den_ngay$$},ma_vt:$ma_vt$$};$ma_kho$$&&($query$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($query$$.ma_dvcs=$ma_dvcs$$);$condition$$.ma_lo&&($query$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($query$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($query$$.ma_tt1=$condition$$.ma_tt1);
|
|
4
|
-
$condition$$.ma_tt2&&($query$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($query$$.ma_tt3=$condition$$.ma_tt3);$condition$$.ma_kh&&($query$$.ma_kh=$condition$$.ma_kh);sokho.find($query$$).lean().then(function($pss$$){$pss$$=$pss$$.map($ps$$=>{$ps$$.sl_nhap=$ps$$.sl_nhap_qd;$ps$$.sl_xuat=$ps$$.sl_xuat_qd;return $ps$$});$callback$$(null,$pss$$)}).catch($error$$=>{$callback$$($error$$)})})}},function($error$$,$results$$){if($error$$)return $fn$$($error$$);let $data$$=[];$results$$.ps.forEach(function($r$$){$r$$.sysorder=
|
|
5
|
-
5;$r$$.bold=!1;$data$$.push($r$$)});async.parallel({ton_dau:function($callback$$){var $ton_dau$$=$results$$.dn.csum("ton00");$callback$$(null,$ton_dau$$)},du_dau:function($callback$$){var $du_dau$$=$results$$.dn.csum("du00");$callback$$(null,$du_dau$$)},sl_nhap:function($callback$$){var $sl_nhap$$=$results$$.ps.csum("sl_nhap");$callback$$(null,$sl_nhap$$)},tien_nhap:function($callback$$){var $tien_nhap$$=$results$$.ps.csum("tien_nhap");$callback$$(null,$tien_nhap$$)},sl_xuat:function($callback$$){var $sl_xuat$$=
|
|
6
|
-
$results$$.ps.csum("sl_xuat");$callback$$(null,$sl_xuat$$)},tien_xuat:function($callback$$){var $tien_xuat$$=$results$$.ps.csum("tien_xuat");$callback$$(null,$tien_xuat$$)}},function($error$$,$results$$){$data$$.push({sysorder:1,bold:!0,dien_giai:"T\u1ed3n \u0111\u1ea7u k\u1ef3",sl_nhap:$results$$.ton_dau,tien_nhap:$results$$.du_dau,sl_xuat:0,tien_xuat:0});$data$$.push({sysorder:6,bold:!0,dien_giai:"C\u1ed9ng ph\u00e1t sinh trong k\u1ef3",sl_nhap:$results$$.sl_nhap,tien_nhap:$results$$.tien_nhap,
|
|
7
|
-
sl_xuat:$results$$.sl_xuat,tien_xuat:$results$$.tien_xuat});$data$$.push({sysorder:9,bold:!0,dien_giai:"T\u1ed3n cu\u1ed1i k\u1ef3",sl_nhap:$results$$.ton_dau+$results$$.sl_nhap-$results$$.sl_xuat,tien_nhap:$results$$.du_dau+$results$$.tien_nhap-$results$$.tien_xuat});$fn$$(null,$data$$)})})};
|
|
1
|
+
function _0x338d(){const _0x431319=['ChvZAa','EMHVyNi','vog7K24Gy3xHU5fPigVHU7m','AwPJANe','qKLXswK','AeLhtxG','DeHuB2q','sgDvBgC','BwfFDhqY','Dg9Umda','yM9Sza','zgvUx25NyxK','mZvSu3LStxK','BwfFA2HV','ntKYodK4yvLiu3jy','m0fdyxfSqq','ExLSt08','y3fyruy','z09cDgu','z2v0tw9KzwW','nJCXmdGWnvPRCw51Dq','BwfFBg8','DMvMAfa','BwfW','mtK5ntu4mKXnEhLZwq','yxffCeq','vgvhugm','zeX6Eum','rvPzDNO','DgLLBL9UAgfW','ANnnwu4','Dg9Ux2rHDq','y3n1Bq','qLDeAeW','q1rdEhu','v0XnyNu','yKPAtha','zgf4t3C','vw52zMC','rM9kyvy','B0DArw4','odblr3rzzhm','wg9jr0e','svj4s0S','ruPWAe8','C2XFEhvHDa','sLjQvMS','B0v4uva','r0jSCM0','CgfYywXSzwW','CgTbEhG','z0fZExi','C3LZB3jKzxi','BwfFDhqZ','uMDTs3i','rMDuv2C','BwfFA2G','Cg1esNa','z1PSuKG','C29RAg8','BgvHBG','wgPKz3C','BwfFDNq','rg9MyKy','DgjltLm','Dw9ireq','zM9YrwfJAa','ALf4CMi','C2XFEhvHDf9Xza','wgTewKy','rwjcqNO','DgLLBL94Dwf0','CuzgD3u','mti5otuWrLfvz2nU','vNfIBMK','CeXiswu','y1nOvwG','C2vYAwvZ','mtu2nZm3nLHrsLvrwa','nJi5mZy0r3nKCMTg','shPjANm','C254Aw0','mti2mZLlB1jUvLi','rKjZsNm','CensCNC','rhb4uxq','CwHKANG','y25yDvO','nJmWq2PUz01v','BwfFDhqX','Cunby0q','s1LhD28','C2XFBMHHCa','DhvFBMDHEq','veLsyuG','q+g7Mw5NihbOW6f0ihnPBMGGDhjVBMCGA+g7SW','CMDKDNO','tog7L2K6ieldOw8Gy8oHBYbUW6b5ihNdQNuGy+g6P3uGy8oHyYb0AgfTihpHU5e6ihr1x25NyxKSzgvUx25NyxKSBwfFDNqSAwrFyxbW','zhvFzgf1','z2rqBva','DgHLBG','AgfUx3nK','BwfFzhzJCW','s2TnEvO','yxn5BMm','tNPNywe','zNDKsNu','uvPLAwe','zMLUza','Ahner3e'];_0x338d=function(){return _0x431319;};return _0x338d();}const _0xbd0843=_0x55dc;function _0x55dc(_0x4ff30c,_0x280fcc){const _0x338dcb=_0x338d();return _0x55dc=function(_0x55dcf1,_0x94ed70){_0x55dcf1=_0x55dcf1-0x190;let _0x5d39eb=_0x338dcb[_0x55dcf1];if(_0x55dc['xZaYaY']===undefined){var _0x4f5c4b=function(_0x17c222){const _0x21212e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5df48f='',_0x4c38e5='';for(let _0xbbdad1=0x0,_0x2273b3,_0x4811c9,_0x4a391b=0x0;_0x4811c9=_0x17c222['charAt'](_0x4a391b++);~_0x4811c9&&(_0x2273b3=_0xbbdad1%0x4?_0x2273b3*0x40+_0x4811c9:_0x4811c9,_0xbbdad1++%0x4)?_0x5df48f+=String['fromCharCode'](0xff&_0x2273b3>>(-0x2*_0xbbdad1&0x6)):0x0){_0x4811c9=_0x21212e['indexOf'](_0x4811c9);}for(let _0x10c2bf=0x0,_0x431b67=_0x5df48f['length'];_0x10c2bf<_0x431b67;_0x10c2bf++){_0x4c38e5+='%'+('00'+_0x5df48f['charCodeAt'](_0x10c2bf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c38e5);};_0x55dc['GajVjV']=_0x4f5c4b,_0x4ff30c=arguments,_0x55dc['xZaYaY']=!![];}const _0x18aecd=_0x338dcb[0x0],_0x16d0de=_0x55dcf1+_0x18aecd,_0x512ebd=_0x4ff30c[_0x16d0de];return!_0x512ebd?(_0x5d39eb=_0x55dc['GajVjV'](_0x5d39eb),_0x4ff30c[_0x16d0de]=_0x5d39eb):_0x5d39eb=_0x512ebd,_0x5d39eb;},_0x55dc(_0x4ff30c,_0x280fcc);}(function(_0x153c5f,_0x3347b1){const _0x3eee79=_0x55dc,_0x104845=_0x153c5f();while(!![]){try{const _0x4f1fae=-parseInt(_0x3eee79(0x1f6))/0x1*(-parseInt(_0x3eee79(0x1f5))/0x2)+-parseInt(_0x3eee79(0x191))/0x3+-parseInt(_0x3eee79(0x1a2))/0x4*(-parseInt(_0x3eee79(0x1c2))/0x5)+parseInt(_0x3eee79(0x1c8))/0x6+parseInt(_0x3eee79(0x1f3))/0x7*(-parseInt(_0x3eee79(0x1c7))/0x8)+parseInt(_0x3eee79(0x1fb))/0x9+parseInt(_0x3eee79(0x1d1))/0xa*(-parseInt(_0x3eee79(0x1cb))/0xb);if(_0x4f1fae===_0x3347b1)break;else _0x104845['push'](_0x104845['shift']());}catch(_0x4b3bd4){_0x104845['push'](_0x104845['shift']());}}}(_0x338d,0x8471f));const dkvt=require('./dkvt'),sokho=global[_0xbd0843(0x1fa)](_0xbd0843(0x1b4)),async=require(_0xbd0843(0x1e1));module['exports']=function(_0x5990aa,_0x4657b0){const _0x43e7f9=_0xbd0843,_0x3706fc={'FoJaV':function(_0xfb8942,_0xabdfe7){return _0xfb8942(_0xabdfe7);},'gZlRH':'du00','TIRaH':function(_0x132ed8,_0xbaee16,_0x11040d){return _0x132ed8(_0xbaee16,_0x11040d);},'Unvfg':function(_0x1f9dc9,_0x416da2,_0x490d81){return _0x1f9dc9(_0x416da2,_0x490d81);},'oGZEn':function(_0x5707c3,_0x1593f0){return _0x5707c3===_0x1593f0;},'Xjdgw':_0x43e7f9(0x1d0),'zzeqO':_0x43e7f9(0x1e0),'uaTFp':_0x43e7f9(0x1dc),'EZYvz':function(_0xaaaef5,_0x3711a2){return _0xaaaef5(_0x3711a2);},'hIGMx':function(_0x633db,_0x530a4d,_0x18cb2c){return _0x633db(_0x530a4d,_0x18cb2c);},'KYGwo':function(_0x14faf6,_0x2a8a4d){return _0x14faf6!==_0x2a8a4d;},'FgTWg':_0x43e7f9(0x1e6),'pLHIe':_0x43e7f9(0x1e2),'qFFwu':_0x43e7f9(0x1a6),'zhobr':function(_0x3e65c8,_0x30f556,_0x150a5e){return _0x3e65c8(_0x30f556,_0x150a5e);},'FBsJs':function(_0x2aa261,_0x3d3e6d){return _0x2aa261===_0x3d3e6d;},'DpxQt':_0x43e7f9(0x1fd),'IPKbT':_0x43e7f9(0x1f0),'tbKNS':function(_0x2b69d3,_0x3aa525){return _0x2b69d3(_0x3aa525);},'wIRtP':_0x43e7f9(0x1af),'nLdpm':_0x43e7f9(0x1d5),'rgdvz':_0x43e7f9(0x1a5),'qhdjx':_0x43e7f9(0x196),'VHbsC':_0x43e7f9(0x1d8),'pkAxx':_0x43e7f9(0x1e9),'TeGPc':function(_0x1fea67,_0x9f4e7a){return _0x1fea67-_0x9f4e7a;},'tHTod':function(_0x5b6945,_0xb0bd4a){return _0x5b6945+_0xb0bd4a;},'cFpSL':'BWDhL','gAsyr':'uhXMf','jQxrb':_0x43e7f9(0x1c0),'aqEpD':'Tồn\x20đầu\x20kỳ','dLzyC':function(_0x200778,_0x3465b3){return _0x200778+_0x3465b3;},'gOBte':function(_0xfc178a,_0x2fc27a){return _0xfc178a!==_0x2fc27a;},'HgUlg':_0x43e7f9(0x1c5),'snxim':_0x43e7f9(0x1be),'jsMYN':_0x43e7f9(0x1da)};if(!_0x5990aa||!_0x5990aa[_0x43e7f9(0x1d6)]||!_0x5990aa[_0x43e7f9(0x1b7)]||!_0x5990aa['den_ngay']||!_0x5990aa['id_app']){if(_0x43e7f9(0x1be)!==_0x3706fc[_0x43e7f9(0x1ca)])_0x3706fc[_0x43e7f9(0x1a0)](_0x379a56,_0x1e08c0);else return _0x3706fc[_0x43e7f9(0x195)](_0x4657b0,_0x3706fc[_0x43e7f9(0x197)]);}let _0x5cec85=_0x5990aa[_0x43e7f9(0x1df)],_0x1b4f67=_0x5990aa[_0x43e7f9(0x1f4)],_0x3dbd87=_0x5990aa[_0x43e7f9(0x1b7)],_0x1f5f87=_0x5990aa[_0x43e7f9(0x1d6)],_0x167218=_0x5990aa[_0x43e7f9(0x1f2)],_0x525202=_0x5990aa['id_app'];async[_0x43e7f9(0x1c6)]({'dn':function(_0x4db7f9){const _0x22a4a6=_0x43e7f9;if(_0x3706fc[_0x22a4a6(0x1a1)](_0x3706fc[_0x22a4a6(0x1b6)],_0x3706fc['zzeqO'])){var _0x48a735=_0x3ce760['dn'][_0x22a4a6(0x199)](_0x3706fc[_0x22a4a6(0x1b3)]);_0x3706fc[_0x22a4a6(0x1d7)](_0x5a5aef,null,_0x48a735);}else _0x3706fc[_0x22a4a6(0x1a0)](setImmediate,()=>{const _0x1c28c5={'DofbF':function(_0x4b5e98,_0x30e54d){const _0xfd32ec=_0x55dc;return _0x3706fc[_0xfd32ec(0x1a0)](_0x4b5e98,_0x30e54d);},'yylOO':function(_0x1be973,_0x3a0d53,_0x4a3715){const _0x335628=_0x55dc;return _0x3706fc[_0x335628(0x19f)](_0x1be973,_0x3a0d53,_0x4a3715);}};dkvt(_0x5990aa,function(_0x491bde,_0x503706){const _0x5bea18=_0x55dc;if(_0x491bde)return _0x1c28c5[_0x5bea18(0x1b8)](_0x4db7f9,_0x491bde);_0x1c28c5[_0x5bea18(0x1f7)](_0x4db7f9,null,_0x503706);});});},'ps':function(_0x5933c5){const _0x20b87c=_0x43e7f9,_0x52efec={'BIqIi':_0x3706fc[_0x20b87c(0x1c1)],'snkSR':function(_0x360b28,_0x406052,_0x208883){const _0x5bfbf3=_0x20b87c;return _0x3706fc[_0x5bfbf3(0x1ec)](_0x360b28,_0x406052,_0x208883);},'bJZLp':_0x20b87c(0x1f0),'qCAcD':function(_0x553e36,_0x484398,_0x593aaa){const _0x2ff2ed=_0x20b87c;return _0x3706fc[_0x2ff2ed(0x1e8)](_0x553e36,_0x484398,_0x593aaa);}};if(_0x3706fc[_0x20b87c(0x1cc)](_0x3706fc[_0x20b87c(0x1ce)],_0x3706fc[_0x20b87c(0x1ce)]))setImmediate(()=>{const _0x233b0c=_0x20b87c,_0x522cf0={'HzIjs':function(_0x4ec4c6,_0xfae889){return _0x4ec4c6===_0xfae889;},'fwdJu':_0x3706fc['uaTFp'],'axWUW':function(_0x5c91a0,_0x391e9a,_0x52b3f0){const _0x3b7eb4=_0x55dc;return _0x3706fc[_0x3b7eb4(0x19f)](_0x5c91a0,_0x391e9a,_0x52b3f0);},'IRxKK':function(_0x3a045d,_0x1b967b){const _0x4be1af=_0x55dc;return _0x3706fc[_0x4be1af(0x195)](_0x3a045d,_0x1b967b);},'daxOw':function(_0x272fc8,_0x25950b,_0x28b32e){const _0x1c3f97=_0x55dc;return _0x3706fc[_0x1c3f97(0x1ec)](_0x272fc8,_0x25950b,_0x28b32e);}};let _0x10abdf={'id_app':_0x525202,'ngay_ct':{'$gte':_0x1f5f87,'$lte':_0x167218},'ma_vt':_0x3dbd87};if(_0x1b4f67){if(_0x3706fc[_0x233b0c(0x1d4)](_0x3706fc[_0x233b0c(0x1b0)],_0x3706fc[_0x233b0c(0x1b0)]))return _0x24b609['sl_nhap']=_0x7ea201['sl_nhap_qd'],_0x39e19d[_0x233b0c(0x1a6)]=_0x51c50d[_0x233b0c(0x1bd)],_0x18b2bb;else _0x10abdf[_0x233b0c(0x1f4)]=_0x1b4f67;}if(_0x5cec85){if(_0x3706fc[_0x233b0c(0x1a1)](_0x3706fc['pLHIe'],_0x3706fc[_0x233b0c(0x1c4)]))_0x10abdf['ma_dvcs']=_0x5cec85;else{var _0x30bf9e=_0x539bbe['ps']['csum'](_0x52efec[_0x233b0c(0x1eb)]);_0x52efec['snkSR'](_0x18e7d9,null,_0x30bf9e);}}if(_0x5990aa['ma_lo'])_0x10abdf[_0x233b0c(0x1fc)]=_0x5990aa[_0x233b0c(0x1fc)];if(_0x5990aa[_0x233b0c(0x1de)])_0x10abdf[_0x233b0c(0x1de)]=_0x5990aa[_0x233b0c(0x1de)];if(_0x5990aa[_0x233b0c(0x1d2)])_0x10abdf[_0x233b0c(0x1d2)]=_0x5990aa[_0x233b0c(0x1d2)];if(_0x5990aa[_0x233b0c(0x1ef)])_0x10abdf[_0x233b0c(0x1ef)]=_0x5990aa[_0x233b0c(0x1ef)];if(_0x5990aa[_0x233b0c(0x1ae)])_0x10abdf[_0x233b0c(0x1ae)]=_0x5990aa[_0x233b0c(0x1ae)];if(_0x5990aa[_0x233b0c(0x1b1)])_0x10abdf[_0x233b0c(0x1b1)]=_0x5990aa[_0x233b0c(0x1b1)];sokho[_0x233b0c(0x1e5)](_0x10abdf)[_0x233b0c(0x1b5)]()[_0x233b0c(0x1dd)](function(_0x3efb0b){const _0x23ccc4=_0x233b0c,_0x9b48f5={'EbBBz':function(_0x30f100,_0x10effa,_0x4cdc64){return _0x522cf0['axWUW'](_0x30f100,_0x10effa,_0x4cdc64);},'ZgvoZ':function(_0x34d05d,_0x1a741a){const _0x16dc97=_0x55dc;return _0x522cf0[_0x16dc97(0x1a4)](_0x34d05d,_0x1a741a);}};_0x3efb0b=_0x3efb0b[_0x23ccc4(0x190)](_0xe6646d=>{const _0x112d06=_0x23ccc4;if(_0x522cf0[_0x112d06(0x1c9)](_0x522cf0[_0x112d06(0x1e3)],_0x112d06(0x19b))){const _0x156bdd={'naSez':function(_0x4e103d,_0x46fff9,_0x13bd16){const _0x139235=_0x112d06;return _0x9b48f5[_0x139235(0x1bf)](_0x4e103d,_0x46fff9,_0x13bd16);}};_0x9b48f5['ZgvoZ'](_0x4a391b,()=>{const _0x5c0e4d={'oeyrX':function(_0x52e1d1,_0x2ebc4e,_0x51e194){return _0x156bdd['naSez'](_0x52e1d1,_0x2ebc4e,_0x51e194);}};_0x5504a3(_0x123784,function(_0x17fac4,_0x265676){if(_0x17fac4)return _0x562e14(_0x17fac4);_0x5c0e4d['oeyrX'](_0x20bbc0,null,_0x265676);});});}else return _0xe6646d['sl_nhap']=_0xe6646d['sl_nhap_qd'],_0xe6646d[_0x112d06(0x1a6)]=_0xe6646d['sl_xuat_qd'],_0xe6646d;}),_0x522cf0[_0x23ccc4(0x19e)](_0x5933c5,null,_0x3efb0b);})['catch'](_0x2d5ff2=>{_0x5933c5(_0x2d5ff2);});});else{var _0x43978a=_0x1893b0['dn'][_0x20b87c(0x199)](_0x52efec[_0x20b87c(0x19d)]);_0x52efec[_0x20b87c(0x1d3)](_0x39dc96,null,_0x43978a);}}},function(_0x5f0b16,_0x4f24e1){const _0x2a0e0f=_0x43e7f9,_0x1af00c={'WLMbu':_0x3706fc[_0x2a0e0f(0x1bc)],'JRjVk':function(_0x5732e6,_0x4fe73a,_0x4732a7){const _0x23c24c=_0x2a0e0f;return _0x3706fc[_0x23c24c(0x1e8)](_0x5732e6,_0x4fe73a,_0x4732a7);},'DxgOJ':_0x3706fc[_0x2a0e0f(0x192)],'GBlrm':_0x3706fc[_0x2a0e0f(0x1ab)],'pmDJp':function(_0x263f5b,_0x49513b){return _0x263f5b+_0x49513b;},'cqXEF':function(_0x53affa,_0xa85fb2){const _0x566fda=_0x2a0e0f;return _0x3706fc[_0x566fda(0x193)](_0x53affa,_0xa85fb2);},'tzDMk':function(_0x31dc52,_0x1a7d3e){const _0x2a2714=_0x2a0e0f;return _0x3706fc[_0x2a2714(0x194)](_0x31dc52,_0x1a7d3e);},'ijcjq':function(_0x280907,_0x551297,_0x5a4322){const _0x4381c9=_0x2a0e0f;return _0x3706fc[_0x4381c9(0x1e8)](_0x280907,_0x551297,_0x5a4322);}};if(_0x3706fc[_0x2a0e0f(0x1f9)](_0x3706fc[_0x2a0e0f(0x1ee)],_0x2a0e0f(0x1c3))){if(_0x5f0b16)return _0x3706fc[_0x2a0e0f(0x1b9)](_0x4657b0,_0x5f0b16);let _0x7beeb3=[];_0x4f24e1['ps'][_0x2a0e0f(0x1bb)](function(_0x152824){const _0x75f548=_0x2a0e0f;_0x152824[_0x75f548(0x1ad)]=0x5,_0x152824[_0x75f548(0x1f1)]=![],_0x7beeb3['push'](_0x152824);}),async[_0x2a0e0f(0x1aa)]({'ton_dau':function(_0x2ddbae){const _0x32ebde=_0x2a0e0f;var _0x4600c2=_0x4f24e1['dn'][_0x32ebde(0x199)](_0x3706fc['IPKbT']);_0x3706fc['Unvfg'](_0x2ddbae,null,_0x4600c2);},'du_dau':function(_0x4a7aa2){const _0x23689e=_0x2a0e0f,_0x932668={'XoIGA':function(_0x32a47a,_0x48ec80){const _0x2ae3a6=_0x55dc;return _0x3706fc[_0x2ae3a6(0x1b9)](_0x32a47a,_0x48ec80);}};if(_0x3706fc['wIRtP']===_0x23689e(0x1ba))return _0x932668[_0x23689e(0x1a3)](_0x21212e,_0x23689e(0x1da));else{var _0x324d2a=_0x4f24e1['dn'][_0x23689e(0x199)](_0x3706fc[_0x23689e(0x1b3)]);_0x4a7aa2(null,_0x324d2a);}},'sl_nhap':function(_0x56fed9){const _0x2a8130=_0x2a0e0f;var _0x5b9ade=_0x4f24e1['ps'][_0x2a8130(0x199)](_0x3706fc['nLdpm']);_0x3706fc['zhobr'](_0x56fed9,null,_0x5b9ade);},'tien_nhap':function(_0x1c72df){const _0x5d2af2=_0x2a0e0f;if(_0x3706fc['KYGwo']('EJphO',_0x3706fc[_0x5d2af2(0x1d9)]))return _0x4774fe(_0xfea903);else{var _0x319f0f=_0x4f24e1['ps'][_0x5d2af2(0x199)](_0x3706fc[_0x5d2af2(0x1cf)]);_0x3706fc[_0x5d2af2(0x1e8)](_0x1c72df,null,_0x319f0f);}},'sl_xuat':function(_0x39b503){const _0x7319ba=_0x2a0e0f,_0xf664e0={'oExQP':_0x3706fc['VHbsC'],'GbXwL':_0x3706fc[_0x7319ba(0x1ab)],'YWbzM':function(_0x2c14ff,_0x1f7c05){return _0x2c14ff-_0x1f7c05;},'pCRrw':function(_0x321f60,_0x5d2d18){const _0x43ba8c=_0x7319ba;return _0x3706fc[_0x43ba8c(0x193)](_0x321f60,_0x5d2d18);},'QZeia':function(_0x181b84,_0x4ecaae){const _0x344146=_0x7319ba;return _0x3706fc[_0x344146(0x1ed)](_0x181b84,_0x4ecaae);},'KHzOa':function(_0x34ddd5,_0x4cf836,_0x1ea4cd){return _0x3706fc['hIGMx'](_0x34ddd5,_0x4cf836,_0x1ea4cd);}};if(_0x3706fc[_0x7319ba(0x1d4)](_0x7319ba(0x19a),_0x3706fc['cFpSL']))_0x517d02[_0x7319ba(0x1e7)]({'sysorder':0x1,'bold':!![],'dien_giai':'Tồn\x20đầu\x20kỳ','sl_nhap':_0x951164['ton_dau'],'tien_nhap':_0x408f88[_0x7319ba(0x1db)],'sl_xuat':0x0,'tien_xuat':0x0}),_0x2a1ad8['push']({'sysorder':0x6,'bold':!![],'dien_giai':_0xf664e0[_0x7319ba(0x1a8)],'sl_nhap':_0x42a9a7[_0x7319ba(0x1d5)],'tien_nhap':_0x553de8[_0x7319ba(0x196)],'sl_xuat':_0x32c90a[_0x7319ba(0x1a6)],'tien_xuat':_0x33a44a[_0x7319ba(0x1c0)]}),_0x47391f[_0x7319ba(0x1e7)]({'sysorder':0x9,'bold':!![],'dien_giai':_0xf664e0['GbXwL'],'sl_nhap':_0xf664e0['YWbzM'](_0x2a06bf[_0x7319ba(0x198)]+_0x2294ae[_0x7319ba(0x1d5)],_0x32d6db[_0x7319ba(0x1a6)]),'tien_nhap':_0xf664e0[_0x7319ba(0x1cd)](_0xf664e0[_0x7319ba(0x1e4)](_0x11cddf[_0x7319ba(0x1db)],_0x49ef2a[_0x7319ba(0x196)]),_0xf8a92[_0x7319ba(0x1c0)])}),_0xf664e0['KHzOa'](_0x3ea20a,null,_0x2e49a1);else{var _0x458c26=_0x4f24e1['ps'][_0x7319ba(0x199)](_0x3706fc[_0x7319ba(0x1c1)]);_0x39b503(null,_0x458c26);}},'tien_xuat':function(_0x458f42){const _0x1eb508=_0x2a0e0f;if(_0x3706fc['KYGwo'](_0x3706fc[_0x1eb508(0x1ac)],_0x3706fc[_0x1eb508(0x1ac)])){var _0x1980ae=_0x521996['ps'][_0x1eb508(0x199)](_0x1af00c[_0x1eb508(0x19c)]);_0x1af00c[_0x1eb508(0x1a7)](_0x28afb0,null,_0x1980ae);}else{var _0x555f8d=_0x4f24e1['ps'][_0x1eb508(0x199)](_0x3706fc['jQxrb']);_0x3706fc[_0x1eb508(0x1ec)](_0x458f42,null,_0x555f8d);}}},function(_0x225b94,_0xda2b05){const _0x1b7008=_0x2a0e0f;_0x7beeb3[_0x1b7008(0x1e7)]({'sysorder':0x1,'bold':!![],'dien_giai':_0x1af00c['DxgOJ'],'sl_nhap':_0xda2b05[_0x1b7008(0x198)],'tien_nhap':_0xda2b05[_0x1b7008(0x1db)],'sl_xuat':0x0,'tien_xuat':0x0}),_0x7beeb3['push']({'sysorder':0x6,'bold':!![],'dien_giai':_0x1b7008(0x1d8),'sl_nhap':_0xda2b05[_0x1b7008(0x1d5)],'tien_nhap':_0xda2b05['tien_nhap'],'sl_xuat':_0xda2b05[_0x1b7008(0x1a6)],'tien_xuat':_0xda2b05['tien_xuat']}),_0x7beeb3['push']({'sysorder':0x9,'bold':!![],'dien_giai':_0x1af00c[_0x1b7008(0x1a9)],'sl_nhap':_0x1af00c[_0x1b7008(0x1b2)](_0xda2b05['ton_dau'],_0xda2b05['sl_nhap'])-_0xda2b05[_0x1b7008(0x1a6)],'tien_nhap':_0x1af00c[_0x1b7008(0x1f8)](_0x1af00c['tzDMk'](_0xda2b05[_0x1b7008(0x1db)],_0xda2b05[_0x1b7008(0x196)]),_0xda2b05[_0x1b7008(0x1c0)])}),_0x1af00c[_0x1b7008(0x1ea)](_0x4657b0,null,_0x7beeb3);});}else _0x538434[_0x2a0e0f(0x1df)]=_0x3a0c13;});};
|
package/server/libs/ctvtnpp.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
const dkvt=require("./dkvtnpp"),sokho=global.getModel("sokhonpp"),async=require("async");
|
|
2
|
-
module.exports=function($condition$$,$fn$$){if(!($condition$$&&$condition$$.tu_ngay&&$condition$$.ma_vt&&$condition$$.den_ngay&&$condition$$.id_app))return $fn$$("L\u1ed7i: B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: tu_ngay,den_ngay,ma_vt,id_app");let $ma_dvcs$$=$condition$$.ma_dvcs,$ma_kho$$=$condition$$.ma_kho,$ma_vt$$=$condition$$.ma_vt,$tu_ngay$$=$condition$$.tu_ngay,$den_ngay$$=$condition$$.den_ngay,$id_app$$=$condition$$.id_app;async.series({dn:function($callback$$){setImmediate(()=>
|
|
3
|
-
{dkvt($condition$$,function($error$$,$result$$){if($error$$)return $callback$$($error$$);$callback$$(null,$result$$)})})},ps:function($callback$$){setImmediate(()=>{let $query$$={id_app:$id_app$$,ngay_ct:{$gte:$tu_ngay$$,$lte:$den_ngay$$},ma_vt:$ma_vt$$};$ma_kho$$&&($query$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($query$$.ma_dvcs=$ma_dvcs$$);$condition$$.ma_lo&&($query$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($query$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($query$$.ma_tt1=$condition$$.ma_tt1);
|
|
4
|
-
$condition$$.ma_tt2&&($query$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($query$$.ma_tt3=$condition$$.ma_tt3);sokho.find($query$$).lean().then(function($pss$$){$pss$$=$pss$$.map($ps$$=>{$ps$$.sl_nhap=$ps$$.sl_nhap_qd;$ps$$.sl_xuat=$ps$$.sl_xuat_qd;return $ps$$});$callback$$(null,$pss$$)}).catch($error$$=>{$callback$$($error$$)})})}},function($error$$,$results$$){if($error$$)return $fn$$($error$$);let $data$$=[];$results$$.ps.forEach(function($r$$){$r$$.sysorder=5;$r$$.bold=!1;$data$$.push($r$$)});
|
|
5
|
-
async.parallel({ton_dau:function($callback$$){var $ton_dau$$=$results$$.dn.csum("ton00");$callback$$(null,$ton_dau$$)},du_dau:function($callback$$){var $du_dau$$=$results$$.dn.csum("du00");$callback$$(null,$du_dau$$)},sl_nhap:function($callback$$){var $sl_nhap$$=$results$$.ps.csum("sl_nhap");$callback$$(null,$sl_nhap$$)},tien_nhap:function($callback$$){var $tien_nhap$$=$results$$.ps.csum("tien_nhap");$callback$$(null,$tien_nhap$$)},sl_xuat:function($callback$$){var $sl_xuat$$=$results$$.ps.csum("sl_xuat");
|
|
6
|
-
$callback$$(null,$sl_xuat$$)},tien_xuat:function($callback$$){var $tien_xuat$$=$results$$.ps.csum("tien_xuat");$callback$$(null,$tien_xuat$$)}},function($error$$,$results$$){$data$$.push({sysorder:1,bold:!0,dien_giai:"T\u1ed3n \u0111\u1ea7u k\u1ef3",sl_nhap:$results$$.ton_dau,tien_nhap:$results$$.du_dau,sl_xuat:0,tien_xuat:0});$data$$.push({sysorder:6,bold:!0,dien_giai:"C\u1ed9ng ph\u00e1t sinh trong k\u1ef3",sl_nhap:$results$$.sl_nhap,tien_nhap:$results$$.tien_nhap,sl_xuat:$results$$.sl_xuat,tien_xuat:$results$$.tien_xuat});
|
|
7
|
-
$data$$.push({sysorder:9,bold:!0,dien_giai:"T\u1ed3n cu\u1ed1i k\u1ef3",sl_nhap:$results$$.ton_dau+$results$$.sl_nhap-$results$$.sl_xuat,tien_nhap:$results$$.du_dau+$results$$.tien_nhap-$results$$.tien_xuat});$fn$$(null,$data$$)})})};
|
|
1
|
+
const _0x4ec4b8=_0x2ed9;function _0x2ed9(_0x4fb7c4,_0x420a6c){const _0x216cce=_0x216c();return _0x2ed9=function(_0x2ed91c,_0x2ea974){_0x2ed91c=_0x2ed91c-0x16a;let _0x3fc2b8=_0x216cce[_0x2ed91c];if(_0x2ed9['EDXSnI']===undefined){var _0x5b0bcf=function(_0x713c35){const _0x5379c2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3db21a='',_0x5f206d='';for(let _0x201dcd=0x0,_0x3411eb,_0x4d8a1c,_0x591dca=0x0;_0x4d8a1c=_0x713c35['charAt'](_0x591dca++);~_0x4d8a1c&&(_0x3411eb=_0x201dcd%0x4?_0x3411eb*0x40+_0x4d8a1c:_0x4d8a1c,_0x201dcd++%0x4)?_0x3db21a+=String['fromCharCode'](0xff&_0x3411eb>>(-0x2*_0x201dcd&0x6)):0x0){_0x4d8a1c=_0x5379c2['indexOf'](_0x4d8a1c);}for(let _0x468ee9=0x0,_0x30d158=_0x3db21a['length'];_0x468ee9<_0x30d158;_0x468ee9++){_0x5f206d+='%'+('00'+_0x3db21a['charCodeAt'](_0x468ee9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f206d);};_0x2ed9['FSWeis']=_0x5b0bcf,_0x4fb7c4=arguments,_0x2ed9['EDXSnI']=!![];}const _0x130f74=_0x216cce[0x0],_0x30344e=_0x2ed91c+_0x130f74,_0x14a181=_0x4fb7c4[_0x30344e];return!_0x14a181?(_0x3fc2b8=_0x2ed9['FSWeis'](_0x3fc2b8),_0x4fb7c4[_0x30344e]=_0x3fc2b8):_0x3fc2b8=_0x14a181,_0x3fc2b8;},_0x2ed9(_0x4fb7c4,_0x420a6c);}(function(_0x46ad24,_0x27042e){const _0xf1e666=_0x2ed9,_0x2ab017=_0x46ad24();while(!![]){try{const _0x253bce=-parseInt(_0xf1e666(0x1dd))/0x1+parseInt(_0xf1e666(0x1c8))/0x2+parseInt(_0xf1e666(0x17c))/0x3*(-parseInt(_0xf1e666(0x1e9))/0x4)+parseInt(_0xf1e666(0x1ba))/0x5+parseInt(_0xf1e666(0x1a5))/0x6+-parseInt(_0xf1e666(0x19d))/0x7*(-parseInt(_0xf1e666(0x1b2))/0x8)+-parseInt(_0xf1e666(0x18d))/0x9;if(_0x253bce===_0x27042e)break;else _0x2ab017['push'](_0x2ab017['shift']());}catch(_0x524a14){_0x2ab017['push'](_0x2ab017['shift']());}}}(_0x216c,0x4bb68));const dkvt=require('./dkvtnpp'),sokho=global[_0x4ec4b8(0x1e4)](_0x4ec4b8(0x184)),async=require(_0x4ec4b8(0x188));function _0x216c(){const _0x55daf8=['mZG0Dg1gv2Pt','qNL3v2K','z3Lty04','DMjKrxm','AgfUx3nK','Eg5OyMy','tog7L2K6ieldOw8Gy8oHBYbUW6b5ihNdQNuGy+g6P3uGy8oHyYb0AgfTihpHU5e6ihr1x25NyxKSzgvUx25NyxKSBwfFDNqSAwrFyxbW','sgLotwy','mZu4ndG1CKHAr2TK','yK5uv3i','r01wAKm','uunUrLu','qxbrq3e','revyDe8','AwrFyxbW','CKf2s28','uuT6qLO','CgfYywXSzwW','BgvHBG','B0HYzNm','C2vYAwvZ','De9Wv2y','mtK2nZG0ALHmAxvL','zhvFzgf1','shHAvxG','q2XiufK','y2f0y2G','DgvhBeC','wNjltvi','zxzICge','q3jTshu','vog7K24GXjhHUQD1igVHU7m','q0zlzfy','ENrgvxu','A3vzs0C','qxbpueu','shjNqNG','uen3sey','sfHnshe','DhvFBMDHEq','wejlqKy','yM9Sza','C2XFBMHHCf9Xza','nJKXotnisLbizNe','te5Ju0W','BMTzwK4','CMfIDfi','BwfFDhqX','DKXMBum','rwvKCgK','z2v0tw9KzwW','q+g7Mw5NihbOW6f0ihnPBMGGDhjVBMCGA+g7SW','DgLLBL94Dwf0','qwrcAgW','BwfFDhqZ','mte2uwnHwKPi','DgjutLi','tenXC0C','Au1lvMK','zMLUza','shrjtMC','BwfFBg8','BuHjDeS','y3n1Bq','r2fNyxu','ChvZAa','zgvUx25NyxK','C3LZB3jKzxi','DvLUsLi','q0Pcrvu','zMzAwNy','BfDmEha','BwfFzhzJCW','C2XFEhvHDf9Xza','vM5UyK4','suTLwei','C3nNDLi','zhuWma','mte3m1vSwK9ntG','AvnZBeK','wKzuz3u','sgL0uKq','yK5Xt0O','D0Dktgi','BK1wwg4','EejpDu8','C29RAg9UCha','uKTvDfe','DxnxC0q','yuTcwKO','yxn5BMm','runytLu','vNL5v2O','C2XFBMHHCa','u0PksLq','nJeZndCWnMX2ywreyG','DKXxweG','uLrVC0C','v1LNtum','ufvwCLm','uhH1qMy','vog7K24Gy3xHU5fPigVHU7m','Dg9Ux2rHDq','uvrMDhK','D2fTDey','r0DcwfK','suHqq1C','t0LODgu','zLvTvwi','DLD4vgm','y3fAv3y','nJy0nZLWq1PHvxq','rNbVrhe','ELntuKO','vxnqCu4','thnnDfq','D2n5CfO','BwfFA2HV','BxLcDMW','mJy3oda0nKLPu3vfza','DgLLBL9UAgfW','ANHKDvG','CeLpvu0','BwfW','ruTQu0G','zxbfyKW','C2XFEhvHDa','zgfzELG','qwXnvu0','tNLmD0q','BwfFDhqY','zM9YrwfJAa'];_0x216c=function(){return _0x55daf8;};return _0x216c();}module['exports']=function(_0x5c8ad9,_0x40c1e3){const _0x45f065=_0x4ec4b8,_0x1b2e23={'IGdMe':_0x45f065(0x1d1),'LsMtT':function(_0x4761ac,_0x725b3b){return _0x4761ac+_0x725b3b;},'PxuBf':function(_0x3c54b3,_0x3eeec4){return _0x3c54b3-_0x3eeec4;},'acOlM':function(_0x4a1c84,_0x58fd85){return _0x4a1c84===_0x58fd85;},'ssgvR':function(_0x24074e,_0x37e128){return _0x24074e(_0x37e128);},'gyScN':function(_0x4987dd,_0x21225c,_0x34d507){return _0x4987dd(_0x21225c,_0x34d507);},'CJBEU':function(_0x55bbc6,_0x5759b3){return _0x55bbc6!==_0x5759b3;},'HrgBx':_0x45f065(0x1b3),'cqZWv':'dPFSb','ClHPY':'sl_nhap','DEXtO':_0x45f065(0x1ac),'epEbL':_0x45f065(0x19f),'PCwHF':_0x45f065(0x172),'LNcSL':_0x45f065(0x1af),'AdBhl':function(_0x3b64c3,_0x6a5a38){return _0x3b64c3!==_0x6a5a38;},'QKzBZ':_0x45f065(0x185),'soJAa':function(_0x33f4e8,_0x15a40a){return _0x33f4e8(_0x15a40a);},'ffZZv':function(_0x55cadf,_0x3c7a26){return _0x55cadf(_0x3c7a26);},'GGBXY':function(_0x569b93,_0x2e24f2){return _0x569b93===_0x2e24f2;},'vLfmC':'bUcVi','AlMUM':_0x45f065(0x1a6),'AZkDA':_0x45f065(0x17b),'wGJLb':function(_0x30a13c,_0x4f55d6,_0x5e00f1){return _0x30a13c(_0x4f55d6,_0x5e00f1);},'HXMHq':_0x45f065(0x198),'egaDX':'ton00','myBvl':function(_0x32a925,_0x45ffbd,_0x492a64){return _0x32a925(_0x45ffbd,_0x492a64);},'VnnbN':_0x45f065(0x1be),'HitRD':_0x45f065(0x1ad),'evbpa':_0x45f065(0x1e5),'Gagau':function(_0x1829b4,_0x3dcd2c){return _0x1829b4+_0x3dcd2c;},'LCqsG':_0x45f065(0x1d4),'xnhbf':'vlhzb','RTosG':'tOpWf','uGoxl':function(_0xe08c1c,_0x5cb606){return _0xe08c1c(_0x5cb606);},'ECXNU':function(_0x2b3c60,_0x5eae3b){return _0x2b3c60!==_0x5eae3b;},'Eedpi':_0x45f065(0x1ea),'rabtR':_0x45f065(0x190),'GEhUt':_0x45f065(0x1b8)};if(!_0x5c8ad9||!_0x5c8ad9[_0x45f065(0x1d9)]||!_0x5c8ad9['ma_vt']||!_0x5c8ad9[_0x45f065(0x170)]||!_0x5c8ad9['id_app']){if(_0x1b2e23[_0x45f065(0x189)](_0x1b2e23[_0x45f065(0x1e3)],_0x1b2e23[_0x45f065(0x1e0)]))return _0x40c1e3(_0x1b2e23['GEhUt']);else _0xf8b275[_0x45f065(0x16f)]({'sysorder':0x1,'bold':!![],'dien_giai':_0x1b2e23['IGdMe'],'sl_nhap':_0x1a7434[_0x45f065(0x194)],'tien_nhap':_0x3cf57d[_0x45f065(0x1c9)],'sl_xuat':0x0,'tien_xuat':0x0}),_0x4d0f21['push']({'sysorder':0x6,'bold':!![],'dien_giai':'Cộng\x20phát\x20sinh\x20trong\x20kỳ','sl_nhap':_0x57f80d[_0x45f065(0x18b)],'tien_nhap':_0x5617ea['tien_nhap'],'sl_xuat':_0x3bb041[_0x45f065(0x1ac)],'tien_xuat':_0xbb9d74[_0x45f065(0x1e6)]}),_0x1b73e4[_0x45f065(0x16f)]({'sysorder':0x9,'bold':!![],'dien_giai':_0x45f065(0x193),'sl_nhap':_0x1b2e23[_0x45f065(0x1a1)](_0x4d2b7c[_0x45f065(0x194)],_0x14d352[_0x45f065(0x18b)])-_0x382b87[_0x45f065(0x1ac)],'tien_nhap':_0x1b2e23[_0x45f065(0x192)](_0x1b2e23[_0x45f065(0x1a1)](_0x219818[_0x45f065(0x1c9)],_0xab1d59['tien_nhap']),_0xf6b097[_0x45f065(0x1e6)])}),_0x3fb2c0(null,_0x5340b0);}let _0x551e7a=_0x5c8ad9['ma_dvcs'],_0x2d8b80=_0x5c8ad9['ma_kho'],_0x4d4503=_0x5c8ad9['ma_vt'],_0x532587=_0x5c8ad9[_0x45f065(0x1d9)],_0x388673=_0x5c8ad9['den_ngay'],_0x2624a3=_0x5c8ad9[_0x45f065(0x1c0)];async[_0x45f065(0x1c6)]({'dn':function(_0x1e647d){const _0xb2f454=_0x45f065,_0xa2dc77={'QUMvI':function(_0x19dc00,_0x257e78){return _0x1b2e23['acOlM'](_0x19dc00,_0x257e78);},'iSslI':_0xb2f454(0x1da),'CrmHu':function(_0x29c9db,_0x2f535b){const _0x4c0212=_0xb2f454;return _0x1b2e23[_0x4c0212(0x17a)](_0x29c9db,_0x2f535b);},'oHrfs':function(_0x62970a,_0x37200a,_0x368154){return _0x1b2e23['gyScN'](_0x62970a,_0x37200a,_0x368154);}};if(_0x1b2e23[_0xb2f454(0x173)](_0x1b2e23[_0xb2f454(0x1d6)],_0x1b2e23[_0xb2f454(0x19c)]))_0x1b2e23[_0xb2f454(0x17a)](setImmediate,()=>{const _0x5176ca=_0xb2f454,_0x472f24={'ndQbC':function(_0x47af9c,_0x2cec1f){const _0x1fcae7=_0x2ed9;return _0xa2dc77[_0x1fcae7(0x1d0)](_0x47af9c,_0x2cec1f);},'EKjSH':function(_0x132115,_0x1ceb44,_0x18552c){return _0xa2dc77['oHrfs'](_0x132115,_0x1ceb44,_0x18552c);}};_0xa2dc77[_0x5176ca(0x1c5)](dkvt,_0x5c8ad9,function(_0x4c4e6b,_0x27fab2){const _0x5a15f0=_0x5176ca;if(_0xa2dc77['QUMvI'](_0xa2dc77[_0x5a15f0(0x17d)],_0xa2dc77[_0x5a15f0(0x17d)])){if(_0x4c4e6b)return _0xa2dc77['CrmHu'](_0x1e647d,_0x4c4e6b);_0x1e647d(null,_0x27fab2);}else{if(_0x3a82f0)return _0x472f24['ndQbC'](_0x59608b,_0x468c68);_0x472f24[_0x5a15f0(0x1aa)](_0x453142,null,_0x50e4ea);}});});else{const _0x79170={'rAvKo':function(_0xa1ad96,_0x137b42,_0x56c85b){return _0xa2dc77['oHrfs'](_0xa1ad96,_0x137b42,_0x56c85b);}};_0xa2dc77[_0xb2f454(0x1d0)](_0x591dca,()=>{const _0x3b0471=_0xb2f454,_0x3a8970={'nMVXn':function(_0x4357a4,_0x30d211){return _0x4357a4(_0x30d211);},'bNTWr':function(_0x3f0761,_0x3b445e,_0x1d975c){const _0x2b88d4=_0x2ed9;return _0x79170[_0x2b88d4(0x1c1)](_0x3f0761,_0x3b445e,_0x1d975c);}};_0x79170[_0x3b0471(0x1c1)](_0x48abb1,_0x23d809,function(_0x5df151,_0x45f6e3){const _0x369b86=_0x3b0471;if(_0x5df151)return _0x3a8970[_0x369b86(0x182)](_0x302944,_0x5df151);_0x3a8970[_0x369b86(0x1bb)](_0x202d6f,null,_0x45f6e3);});});}},'ps':function(_0x1516f5){const _0x508a93=_0x45f065,_0x34679b={'HxZUx':_0x1b2e23[_0x508a93(0x1bf)],'HiNMf':function(_0x4886b2,_0x4ca79a){const _0x6bc3e3=_0x508a93;return _0x1b2e23[_0x6bc3e3(0x17a)](_0x4886b2,_0x4ca79a);},'OIhte':function(_0xad306c,_0x3b58e2,_0x4f5985){const _0x450d85=_0x508a93;return _0x1b2e23[_0x450d85(0x1b4)](_0xad306c,_0x3b58e2,_0x4f5985);},'hrECB':function(_0x14e614,_0x678e10){const _0x552f77=_0x508a93;return _0x1b2e23[_0x552f77(0x173)](_0x14e614,_0x678e10);},'HXaAk':_0x1b2e23[_0x508a93(0x1ab)],'nkYZN':_0x1b2e23[_0x508a93(0x1d7)],'CFKdV':function(_0x26d822,_0x452411){return _0x26d822!==_0x452411;},'aKBZJ':_0x1b2e23[_0x508a93(0x1de)]};if(_0x1b2e23[_0x508a93(0x1e7)](_0x1b2e23[_0x508a93(0x1c2)],_0x1b2e23['QKzBZ'])){var _0x369ea4=_0x46ba6c['ps']['csum'](_0x1b2e23[_0x508a93(0x1cb)]);_0x1b2e23[_0x508a93(0x1b4)](_0x55ca47,null,_0x369ea4);}else setImmediate(()=>{const _0x4433d7=_0x508a93,_0x1f702d={'jlkRl':function(_0x2dd0bd,_0xb48f2,_0x57dccc){const _0x31ae9c=_0x2ed9;return _0x34679b[_0x31ae9c(0x199)](_0x2dd0bd,_0xb48f2,_0x57dccc);},'bNqOJ':function(_0x1c06ee,_0x5886a1){return _0x34679b['hrECB'](_0x1c06ee,_0x5886a1);},'FpoDq':_0x34679b['HXaAk']};if(_0x34679b[_0x4433d7(0x1df)]===_0x4433d7(0x175)){var _0x2c3946=_0x1e510c['ps'][_0x4433d7(0x16d)](_0x34679b[_0x4433d7(0x1ca)]);_0x56c344(null,_0x2c3946);}else{let _0x250377={'id_app':_0x2624a3,'ngay_ct':{'$gte':_0x532587,'$lte':_0x388673},'ma_vt':_0x4d4503};_0x2d8b80&&(_0x34679b[_0x4433d7(0x1d2)](_0x34679b[_0x4433d7(0x187)],_0x4433d7(0x1a2))?_0x250377[_0x4433d7(0x1a3)]=_0x2d8b80:_0x4825f9[_0x4433d7(0x1a3)]=_0x3a1ff7);_0x551e7a&&(_0x250377[_0x4433d7(0x176)]=_0x551e7a);if(_0x5c8ad9[_0x4433d7(0x16b)])_0x250377[_0x4433d7(0x16b)]=_0x5c8ad9[_0x4433d7(0x16b)];if(_0x5c8ad9[_0x4433d7(0x1b6)])_0x250377['han_sd']=_0x5c8ad9[_0x4433d7(0x1b6)];if(_0x5c8ad9['ma_tt1'])_0x250377[_0x4433d7(0x1e1)]=_0x5c8ad9[_0x4433d7(0x1e1)];if(_0x5c8ad9[_0x4433d7(0x1b0)])_0x250377[_0x4433d7(0x1b0)]=_0x5c8ad9[_0x4433d7(0x1b0)];if(_0x5c8ad9['ma_tt3'])_0x250377[_0x4433d7(0x1e8)]=_0x5c8ad9[_0x4433d7(0x1e8)];sokho[_0x4433d7(0x1ed)](_0x250377)[_0x4433d7(0x1c4)]()['then'](function(_0x3619a4){const _0x5793bd=_0x4433d7,_0x28a425={'ztFUu':_0x5793bd(0x1e6),'QCnFU':function(_0xe1924d,_0x493bc2,_0x3aede3){return _0x1f702d['jlkRl'](_0xe1924d,_0x493bc2,_0x3aede3);},'fUmUb':function(_0x407f51,_0x25b72a){const _0x55728b=_0x5793bd;return _0x1f702d[_0x55728b(0x180)](_0x407f51,_0x25b72a);},'teGlG':_0x1f702d[_0x5793bd(0x19e)]};_0x3619a4=_0x3619a4[_0x5793bd(0x1a9)](_0x33a919=>{const _0x12f16b=_0x5793bd,_0x198553={'pIOUM':_0x28a425[_0x12f16b(0x1d3)],'ZFTgu':function(_0x30477b,_0x5cc364,_0x5aa269){const _0x4a3cff=_0x12f16b;return _0x28a425[_0x4a3cff(0x1bd)](_0x30477b,_0x5cc364,_0x5aa269);}};if(_0x28a425[_0x12f16b(0x19a)](_0x28a425[_0x12f16b(0x1cd)],_0x28a425[_0x12f16b(0x1cd)])){var _0x1e8a98=_0x331d65['ps'][_0x12f16b(0x16d)](_0x198553[_0x12f16b(0x1a8)]);_0x198553[_0x12f16b(0x17e)](_0x1de6f1,null,_0x1e8a98);}else return _0x33a919['sl_nhap']=_0x33a919[_0x12f16b(0x1dc)],_0x33a919[_0x12f16b(0x1ac)]=_0x33a919[_0x12f16b(0x177)],_0x33a919;}),_0x1516f5(null,_0x3619a4);})[_0x4433d7(0x1cc)](_0x13d202=>{const _0x5e02b1=_0x4433d7;_0x34679b[_0x5e02b1(0x1b9)](_0x1516f5,_0x13d202);});}});}},function(_0x5e212a,_0x32d431){const _0x5116ae=_0x45f065,_0x395cb0={'GMVjC':_0x1b2e23['AZkDA'],'ZrKMR':function(_0x5c5442,_0x3e5932,_0xa59954){const _0x154653=_0x2ed9;return _0x1b2e23[_0x154653(0x181)](_0x5c5442,_0x3e5932,_0xa59954);},'IKeXB':_0x1b2e23[_0x5116ae(0x1d8)],'UoGDN':_0x1b2e23['egaDX'],'akJdC':function(_0xbb7d94,_0xa3b39b,_0x11fd41){const _0x5c2f0e=_0x5116ae;return _0x1b2e23[_0x5c2f0e(0x1a4)](_0xbb7d94,_0xa3b39b,_0x11fd41);},'ApOPE':_0x1b2e23[_0x5116ae(0x1cb)],'HOWEV':_0x5116ae(0x1e6),'QTfty':function(_0xc7efaf,_0x57aa46){return _0xc7efaf===_0x57aa46;},'jxduX':_0x1b2e23[_0x5116ae(0x178)],'PUVrS':_0x1b2e23[_0x5116ae(0x17f)],'wamtF':_0x1b2e23['IGdMe'],'SJJJT':_0x1b2e23[_0x5116ae(0x1cf)],'xgoXi':_0x5116ae(0x193),'usWsD':function(_0x4e2e32,_0x4eddcf){return _0x1b2e23['PxuBf'](_0x4e2e32,_0x4eddcf);},'GqhMM':function(_0x48c73c,_0x92d43f){const _0x446b02=_0x5116ae;return _0x1b2e23[_0x446b02(0x16e)](_0x48c73c,_0x92d43f);},'VyyWj':function(_0x5c652c,_0xf909bf,_0x155acd){return _0x5c652c(_0xf909bf,_0x155acd);},'vbdEs':_0x1b2e23['AlMUM'],'vLWXH':function(_0x4ed5db,_0x31833b,_0x448dcd){return _0x4ed5db(_0x31833b,_0x448dcd);}};if(_0x1b2e23['AdBhl'](_0x1b2e23[_0x5116ae(0x1eb)],_0x1b2e23[_0x5116ae(0x1b7)])){if(_0x5e212a)return _0x1b2e23['GGBXY'](_0x5116ae(0x1c7),_0x1b2e23[_0x5116ae(0x18f)])?_0x1b2e23['uGoxl'](_0x40c1e3,_0x5e212a):_0x1b2e23['soJAa'](_0x47907b,_0x526dc8);let _0x5f2002=[];_0x32d431['ps'][_0x5116ae(0x1b1)](function(_0x376e48){const _0x28c51f=_0x5116ae;_0x376e48[_0x28c51f(0x171)]=0x5,_0x376e48[_0x28c51f(0x1db)]=![],_0x5f2002[_0x28c51f(0x16f)](_0x376e48);}),async[_0x5116ae(0x1c3)]({'ton_dau':function(_0x25562d){const _0x3b6b9a=_0x5116ae,_0x2e8356={'chRaX':_0x395cb0[_0x3b6b9a(0x1bc)],'UsPqN':function(_0x436e9e,_0x17aab8,_0xac342a){const _0x2c17bb=_0x3b6b9a;return _0x395cb0[_0x2c17bb(0x1ce)](_0x436e9e,_0x17aab8,_0xac342a);}};if(_0x395cb0[_0x3b6b9a(0x179)]===_0x3b6b9a(0x16c)){var _0x433ee0=_0x1850e9['dn'][_0x3b6b9a(0x16d)](_0x2e8356['chRaX']);_0x2e8356[_0x3b6b9a(0x1a0)](_0x422471,null,_0x433ee0);}else{var _0x427bcd=_0x32d431['dn']['csum'](_0x395cb0['UoGDN']);_0x25562d(null,_0x427bcd);}},'du_dau':function(_0x50576b){const _0x3cf9ed=_0x5116ae;var _0x440735=_0x32d431['dn'][_0x3cf9ed(0x16d)](_0x395cb0[_0x3cf9ed(0x1bc)]);_0x395cb0['akJdC'](_0x50576b,null,_0x440735);},'sl_nhap':function(_0x38b695){const _0x14c385=_0x5116ae;var _0x25b177=_0x32d431['ps'][_0x14c385(0x16d)](_0x395cb0[_0x14c385(0x1d5)]);_0x38b695(null,_0x25b177);},'tien_nhap':function(_0x5d3f05){const _0x387aba=_0x5116ae,_0x8f51ec={'iMKVi':function(_0x4140c6,_0x45f42b){const _0x306bce=_0x2ed9;return _0x1b2e23[_0x306bce(0x174)](_0x4140c6,_0x45f42b);},'HtINg':_0x387aba(0x1b8)};if(_0x1b2e23[_0x387aba(0x197)](_0x1b2e23[_0x387aba(0x1e2)],_0x387aba(0x19b)))return _0x8f51ec[_0x387aba(0x1ec)](_0x5379c2,_0x8f51ec[_0x387aba(0x16a)]);else{var _0x21e0d4=_0x32d431['ps'][_0x387aba(0x16d)](_0x1b2e23[_0x387aba(0x1ae)]);_0x1b2e23[_0x387aba(0x1b4)](_0x5d3f05,null,_0x21e0d4);}},'sl_xuat':function(_0x1a7698){const _0x38b0e2=_0x5116ae;var _0x241f49=_0x32d431['ps'][_0x38b0e2(0x16d)](_0x38b0e2(0x1ac));_0x395cb0[_0x38b0e2(0x1ce)](_0x1a7698,null,_0x241f49);},'tien_xuat':function(_0x355fd7){const _0x30b773=_0x5116ae;var _0x4e6b69=_0x32d431['ps'][_0x30b773(0x16d)](_0x395cb0['HOWEV']);_0x395cb0[_0x30b773(0x1ce)](_0x355fd7,null,_0x4e6b69);}},function(_0x186af2,_0x3c39c1){const _0x16cbb=_0x5116ae,_0x1e7c83={'CCQjU':_0x395cb0['UoGDN'],'xBOuO':function(_0x58f836,_0x39d928,_0x4f05c2){return _0x58f836(_0x39d928,_0x4f05c2);}};if(_0x395cb0[_0x16cbb(0x195)](_0x395cb0[_0x16cbb(0x1a7)],_0x395cb0[_0x16cbb(0x191)])){var _0x2f2d6a=_0x512b04['dn']['csum'](_0x1e7c83['CCQjU']);_0x1e7c83[_0x16cbb(0x183)](_0x1f1f8e,null,_0x2f2d6a);}else _0x5f2002[_0x16cbb(0x16f)]({'sysorder':0x1,'bold':!![],'dien_giai':_0x395cb0[_0x16cbb(0x196)],'sl_nhap':_0x3c39c1['ton_dau'],'tien_nhap':_0x3c39c1[_0x16cbb(0x1c9)],'sl_xuat':0x0,'tien_xuat':0x0}),_0x5f2002[_0x16cbb(0x16f)]({'sysorder':0x6,'bold':!![],'dien_giai':_0x395cb0[_0x16cbb(0x18c)],'sl_nhap':_0x3c39c1[_0x16cbb(0x18b)],'tien_nhap':_0x3c39c1[_0x16cbb(0x1a6)],'sl_xuat':_0x3c39c1[_0x16cbb(0x1ac)],'tien_xuat':_0x3c39c1['tien_xuat']}),_0x5f2002['push']({'sysorder':0x9,'bold':!![],'dien_giai':_0x395cb0['xgoXi'],'sl_nhap':_0x395cb0[_0x16cbb(0x186)](_0x395cb0['GqhMM'](_0x3c39c1[_0x16cbb(0x194)],_0x3c39c1['sl_nhap']),_0x3c39c1[_0x16cbb(0x1ac)]),'tien_nhap':_0x395cb0['usWsD'](_0x395cb0['GqhMM'](_0x3c39c1[_0x16cbb(0x1c9)],_0x3c39c1[_0x16cbb(0x1a6)]),_0x3c39c1[_0x16cbb(0x1e6)])}),_0x395cb0[_0x16cbb(0x18a)](_0x40c1e3,null,_0x5f2002);});}else{var _0x47eb28=_0xb74d8a['ps'][_0x5116ae(0x16d)](_0x395cb0[_0x5116ae(0x1b5)]);_0x395cb0[_0x5116ae(0x18e)](_0x1d357e,null,_0x47eb28);}});};
|
package/server/libs/ctvttt.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
const dkvt=require("./dkvttt"),sokho=global.getModel("sokhott"),async=require("async");
|
|
2
|
-
module.exports=function($condition$$,$fn$$){if(!($condition$$&&$condition$$.tu_ngay&&$condition$$.ma_vt&&$condition$$.den_ngay&&$condition$$.id_app))return $fn$$("L\u1ed7i: B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: tu_ngay,den_ngay,ma_vt,id_app");let $ma_dvcs$$=$condition$$.ma_dvcs,$ma_kho$$=$condition$$.ma_kho,$ma_vt$$=$condition$$.ma_vt,$tu_ngay$$=$condition$$.tu_ngay,$den_ngay$$=$condition$$.den_ngay,$id_app$$=$condition$$.id_app;async.parallel({dn:function($callback$$){setImmediate(()=>
|
|
3
|
-
{dkvt($condition$$,function($error$$,$result$$){if($error$$)return $callback$$($error$$);$callback$$(null,$result$$)})})},ps:function($callback$$){setImmediate(()=>{let $query$$={id_app:$id_app$$,ngay_ct:{$gte:$tu_ngay$$,$lte:$den_ngay$$},ma_vt:$ma_vt$$};$ma_kho$$&&($query$$.ma_kho=$ma_kho$$);$ma_dvcs$$&&($query$$.ma_dvcs=$ma_dvcs$$);$condition$$.ma_lo&&($query$$.ma_lo=$condition$$.ma_lo);$condition$$.han_sd&&($query$$.han_sd=$condition$$.han_sd);$condition$$.ma_tt1&&($query$$.ma_tt1=$condition$$.ma_tt1);
|
|
4
|
-
$condition$$.ma_tt2&&($query$$.ma_tt2=$condition$$.ma_tt2);$condition$$.ma_tt3&&($query$$.ma_tt3=$condition$$.ma_tt3);sokho.find($query$$).lean().then(function($pss$$){$pss$$=$pss$$.map($ps$$=>{$ps$$.sl_nhap=$ps$$.sl_nhap_qd;$ps$$.sl_xuat=$ps$$.sl_xuat_qd;return $ps$$});$callback$$(null,$pss$$)}).catch($error$$=>{$callback$$($error$$)})})}},function($error$$,$results$$){if($error$$)return $fn$$($error$$);let $data$$=[];$results$$.ps.forEach(function($r$$){$r$$.sysorder=5;$r$$.bold=!1;$data$$.push($r$$)});
|
|
5
|
-
async.parallel({ton_dau:function($callback$$){var $ton_dau$$=$results$$.dn.csum("ton00");$callback$$(null,$ton_dau$$)},du_dau:function($callback$$){var $du_dau$$=$results$$.dn.csum("du00");$callback$$(null,$du_dau$$)},sl_nhap:function($callback$$){var $sl_nhap$$=$results$$.ps.csum("sl_nhap");$callback$$(null,$sl_nhap$$)},tien_nhap:function($callback$$){var $tien_nhap$$=$results$$.ps.csum("tien_nhap");$callback$$(null,$tien_nhap$$)},sl_xuat:function($callback$$){var $sl_xuat$$=$results$$.ps.csum("sl_xuat");
|
|
6
|
-
$callback$$(null,$sl_xuat$$)},tien_xuat:function($callback$$){var $tien_xuat$$=$results$$.ps.csum("tien_xuat");$callback$$(null,$tien_xuat$$)}},function($error$$,$results$$){$data$$.push({sysorder:1,bold:!0,dien_giai:"T\u1ed3n \u0111\u1ea7u k\u1ef3",sl_nhap:$results$$.ton_dau,tien_nhap:$results$$.du_dau,sl_xuat:0,tien_xuat:0});$data$$.push({sysorder:6,bold:!0,dien_giai:"C\u1ed9ng ph\u00e1t sinh trong k\u1ef3",sl_nhap:$results$$.sl_nhap,tien_nhap:$results$$.tien_nhap,sl_xuat:$results$$.sl_xuat,tien_xuat:$results$$.tien_xuat});
|
|
7
|
-
$data$$.push({sysorder:9,bold:!0,dien_giai:"T\u1ed3n cu\u1ed1i k\u1ef3",sl_nhap:$results$$.ton_dau+$results$$.sl_nhap-$results$$.sl_xuat,tien_nhap:$results$$.du_dau+$results$$.tien_nhap-$results$$.tien_xuat});$fn$$(null,$data$$)})})};
|
|
1
|
+
function _0x3359(_0x296280,_0x2c62f8){const _0x148f1e=_0x148f();return _0x3359=function(_0x335990,_0x32f147){_0x335990=_0x335990-0x111;let _0x5c20cb=_0x148f1e[_0x335990];if(_0x3359['XQROcn']===undefined){var _0x2a2a5d=function(_0x2002f0){const _0x2fd174='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x41a0be='',_0x2d3993='';for(let _0x25fbd4=0x0,_0x23e17,_0x349c9b,_0x2b6a78=0x0;_0x349c9b=_0x2002f0['charAt'](_0x2b6a78++);~_0x349c9b&&(_0x23e17=_0x25fbd4%0x4?_0x23e17*0x40+_0x349c9b:_0x349c9b,_0x25fbd4++%0x4)?_0x41a0be+=String['fromCharCode'](0xff&_0x23e17>>(-0x2*_0x25fbd4&0x6)):0x0){_0x349c9b=_0x2fd174['indexOf'](_0x349c9b);}for(let _0x442dee=0x0,_0x5ccc05=_0x41a0be['length'];_0x442dee<_0x5ccc05;_0x442dee++){_0x2d3993+='%'+('00'+_0x41a0be['charCodeAt'](_0x442dee)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d3993);};_0x3359['PJDUmj']=_0x2a2a5d,_0x296280=arguments,_0x3359['XQROcn']=!![];}const _0x1a4d18=_0x148f1e[0x0],_0x48ebe9=_0x335990+_0x1a4d18,_0x5803c4=_0x296280[_0x48ebe9];return!_0x5803c4?(_0x5c20cb=_0x3359['PJDUmj'](_0x5c20cb),_0x296280[_0x48ebe9]=_0x5c20cb):_0x5c20cb=_0x5803c4,_0x5c20cb;},_0x3359(_0x296280,_0x2c62f8);}const _0x4a9c16=_0x3359;(function(_0x90041c,_0x48ffd3){const _0x5e787e=_0x3359,_0x37abec=_0x90041c();while(!![]){try{const _0x58a8a2=-parseInt(_0x5e787e(0x167))/0x1*(parseInt(_0x5e787e(0x162))/0x2)+parseInt(_0x5e787e(0x132))/0x3+-parseInt(_0x5e787e(0x158))/0x4*(parseInt(_0x5e787e(0x155))/0x5)+parseInt(_0x5e787e(0x114))/0x6+parseInt(_0x5e787e(0x172))/0x7+-parseInt(_0x5e787e(0x13b))/0x8+-parseInt(_0x5e787e(0x14b))/0x9*(parseInt(_0x5e787e(0x111))/0xa);if(_0x58a8a2===_0x48ffd3)break;else _0x37abec['push'](_0x37abec['shift']());}catch(_0x4e4db2){_0x37abec['push'](_0x37abec['shift']());}}}(_0x148f,0xeaf34));function _0x148f(){const _0x1abe53=['BwfFDhqY','BNnSAM0','Dg9Ux2rHDq','C2XFEhvHDa','zM9YrwfJAa','rhfws2y','ntK0nMTVz2zWsa','r2fjuwy','DhvFBMDHEq','DeHfqLa','D0z2uMG','mta4sevSvNv5','yNbJwxi','u3r3C3i','wufyCe4','uLfQCgK','C2XFEhvHDf9Xza','yM9Sza','vhjcwK0','uuXSDwW','zwvfqNa','BgvHBG','oda2mZe4muDAA2XVzG','sLffDfy','mJa4mZbcz2Dsr20','DgLLBL94Dwf0','zMLUza','otG2mZK5ngL6EurfDW','C1fdrwq','wg9rCeK','BwfFBg8','seP2BuO','D1j3ENi','sKPTA0q','DMTpAge','Cw1qALq','wvzcsKu','u05LBLO','EwjSCuq','rfLbC3e','DgLLBL9UAgfW','v0X2wfu','BwfFDhqX','DgHLBG','q+g7Mw5NihbOW6f0ihnPBMGGDhjVBMCGA+g7SW','BwfFDhqZ','y3n1Bq','A2r3rNu','AgfUx3nK','v1jcsNO','CLz3wu0','zhvFzgf1','yNnOq2e','tvrxuwy','BenkDeG','vMnhtgy','zhuWma','ntqWoty4ngjdDvzKBW','Eezzsvy','lI9KA3z0Dhq','C2XFBMHHCf9Xza','yMLVvgC','Dg9Umda','ChvZAa','zhPSBee','zgvUx25NyxK','mJq3nZq1nKvhuKPYCW','DvPKEeO','vog7K24Gy3xHU5fPigVHU7m','EuvJEfO','C2XFBMHHCa','zLHjuxO','r05UAwe','BwfW','ENj1wgC','y2nTuK8','yxnor1C','r0PLEMK','AxbKD2m','yxn5BMm','BwfFzhzJCW','z2v0tw9KzwW','ndCYnwHHD2HiyW','BwfFDNq','C3LZB3jKzxi','qLfzreS','zxHWB3j0CW','CgfYywXSzwW','Ee15vLG','y2f0y2G','C29RAg90Da','uuzszwu','mZe4nZm1nufmtLrkwG','BwfFA2HV','yNzItfy','mtjhquPbBue','vuPkAfm','vog7K24GXjhHUQD1igVHU7m','tog7L2K6ieldOw8Gy8oHBYbUW6b5ihNdQNuGy+g6P3uGy8oHyYb0AgfTihpHU5e6ihr1x25NyxKSzgvUx25NyxKSBwfFDNqSAwrFyxbW'];_0x148f=function(){return _0x1abe53;};return _0x148f();}const dkvt=require(_0x4a9c16(0x134)),sokho=global[_0x4a9c16(0x14a)](_0x4a9c16(0x153)),async=require(_0x4a9c16(0x148));module[_0x4a9c16(0x14f)]=function(_0x21ebc2,_0x517f75){const _0x3639f4=_0x4a9c16,_0x535627={'HJvmJ':function(_0x4729c5,_0x4033fc){return _0x4729c5!==_0x4033fc;},'xFYIV':_0x3639f4(0x11e),'wRwzr':'SMDjA','qmPjT':function(_0xa653ab,_0x5058ce){return _0xa653ab(_0x5058ce);},'BQYDK':function(_0x236b8e,_0xa5d256,_0x48db37){return _0x236b8e(_0xa5d256,_0x48db37);},'DqVKf':_0x3639f4(0x115),'lCJtH':'ASgnN','eeEBp':function(_0x304706,_0x26a5b4){return _0x304706(_0x26a5b4);},'qQrdS':'jcAFB','WLvXU':_0x3639f4(0x15d),'lcGjP':_0x3639f4(0x15f),'zruXg':_0x3639f4(0x137),'yblqD':_0x3639f4(0x154),'dzllA':_0x3639f4(0x131),'YVBJE':'sl_nhap','guwkO':function(_0x24871b,_0x1384f0,_0x5d0424){return _0x24871b(_0x1384f0,_0x5d0424);},'tHEBP':function(_0x22059a,_0x3010d7,_0x1551ae){return _0x22059a(_0x3010d7,_0x1551ae);},'uZdxJ':'hbJfZ','YAXpN':_0x3639f4(0x125),'bvbLV':_0x3639f4(0x13d),'ipdwc':function(_0x56333f,_0xc3d8d3){return _0x56333f+_0xc3d8d3;},'cYDIn':function(_0x88bf65,_0x237124){return _0x88bf65-_0x237124;},'ttDIa':function(_0x1188e4,_0x3ab28f){return _0x1188e4+_0x3ab28f;},'RQjpi':function(_0x27a47b,_0x180092,_0x212fab){return _0x27a47b(_0x180092,_0x212fab);},'GJezi':function(_0x59ad09,_0x41e1e7,_0x28df51){return _0x59ad09(_0x41e1e7,_0x28df51);},'CqgLD':function(_0x108d04,_0x55c474,_0x55f782){return _0x108d04(_0x55c474,_0x55f782);},'AcbSH':'Fyykf','GNnia':function(_0x451eab,_0x10ff58){return _0x451eab===_0x10ff58;},'asNGW':_0x3639f4(0x16f),'bshCa':function(_0x1c8dc3,_0x4e012b){return _0x1c8dc3(_0x4e012b);},'vkOha':_0x3639f4(0x15b)};if(!_0x21ebc2||!_0x21ebc2[_0x3639f4(0x164)]||!_0x21ebc2[_0x3639f4(0x14c)]||!_0x21ebc2[_0x3639f4(0x13a)]||!_0x21ebc2['id_app'])return _0x535627[_0x3639f4(0x170)](_0x517f75,_0x535627[_0x3639f4(0x11b)]);let _0x247409=_0x21ebc2[_0x3639f4(0x149)],_0xcc3138=_0x21ebc2[_0x3639f4(0x156)],_0x334854=_0x21ebc2[_0x3639f4(0x14c)],_0x209c93=_0x21ebc2[_0x3639f4(0x164)],_0x306bb4=_0x21ebc2[_0x3639f4(0x13a)],_0x3cce07=_0x21ebc2['id_app'];async[_0x3639f4(0x150)]({'dn':function(_0x24ca82){const _0x5d06ac=_0x3639f4,_0x9479aa={'Stwsr':function(_0x35d8c4,_0x159fc8){return _0x535627['HJvmJ'](_0x35d8c4,_0x159fc8);},'uQUMW':_0x535627[_0x5d06ac(0x133)],'tEQES':_0x535627[_0x5d06ac(0x119)],'xWHJO':function(_0x291989,_0x404918){const _0x30dedc=_0x5d06ac;return _0x535627[_0x30dedc(0x11c)](_0x291989,_0x404918);},'UJJhS':function(_0x42dcfc,_0x3b7cc3,_0x164d43){const _0x402989=_0x5d06ac;return _0x535627[_0x402989(0x14e)](_0x42dcfc,_0x3b7cc3,_0x164d43);}};_0x535627[_0x5d06ac(0x11c)](setImmediate,()=>{const _0x43ac95=_0x5d06ac;_0x9479aa[_0x43ac95(0x159)](dkvt,_0x21ebc2,function(_0x14f7d2,_0x195e8a){const _0x2f6dae=_0x43ac95;if(_0x9479aa[_0x2f6dae(0x169)](_0x9479aa['uQUMW'],_0x9479aa['tEQES'])){if(_0x14f7d2)return _0x9479aa['xWHJO'](_0x24ca82,_0x14f7d2);_0x9479aa[_0x2f6dae(0x159)](_0x24ca82,null,_0x195e8a);}else _0x3f8cec[_0x2f6dae(0x149)]=_0x81e6e;});});},'ps':function(_0x3eeac6){const _0x5aa0f7=_0x3639f4,_0x27c139={'JJmkD':function(_0x252599,_0x4feffc){return _0x535627['HJvmJ'](_0x252599,_0x4feffc);},'fXIQz':_0x535627[_0x5aa0f7(0x161)],'WRBJz':_0x535627[_0x5aa0f7(0x12f)],'kdwFu':function(_0x27522e,_0x5bccb5,_0x55d98e){const _0x4eed9e=_0x5aa0f7;return _0x535627[_0x4eed9e(0x14e)](_0x27522e,_0x5bccb5,_0x55d98e);},'wFvRh':function(_0x1f1b65,_0x457b51){const _0x3a53aa=_0x5aa0f7;return _0x535627[_0x3a53aa(0x170)](_0x1f1b65,_0x457b51);},'iXGtF':function(_0x7813e9,_0x5418bc){const _0x26134d=_0x5aa0f7;return _0x535627[_0x26134d(0x170)](_0x7813e9,_0x5418bc);},'xMyVX':_0x535627['qQrdS'],'yEcxZ':_0x5aa0f7(0x163),'bpcYr':_0x5aa0f7(0x116)};_0x535627[_0x5aa0f7(0x118)](_0x5aa0f7(0x15d),_0x535627[_0x5aa0f7(0x122)])?(_0x5987e6[_0x5aa0f7(0x14d)]=0x5,_0x29d68a[_0x5aa0f7(0x16d)]=![],_0x1f02f5[_0x5aa0f7(0x138)](_0x57da8c)):_0x535627[_0x5aa0f7(0x11c)](setImmediate,()=>{const _0x4da2f7=_0x5aa0f7,_0x4a8a4a={'EGnVv':function(_0x5edf60,_0x11f31c){return _0x27c139['iXGtF'](_0x5edf60,_0x11f31c);}};let _0x56409b={'id_app':_0x3cce07,'ngay_ct':{'$gte':_0x209c93,'$lte':_0x306bb4},'ma_vt':_0x334854};_0xcc3138&&(_0x27c139[_0x4da2f7(0x11a)](_0x27c139[_0x4da2f7(0x151)],_0x27c139[_0x4da2f7(0x151)])?_0x4a8a4a['EGnVv'](_0x2b6a78,()=>{_0x534fa1(_0x3ccc67,function(_0x3cc0ed,_0x48b3b2){if(_0x3cc0ed)return _0x526f69(_0x3cc0ed);_0x370f27(null,_0x48b3b2);});}):_0x56409b[_0x4da2f7(0x156)]=_0xcc3138);if(_0x247409){if(_0x27c139[_0x4da2f7(0x13e)]===_0x27c139[_0x4da2f7(0x168)])return _0x3c97c3[_0x4da2f7(0x13f)]=_0x44d244[_0x4da2f7(0x135)],_0x47a9ad['sl_xuat']=_0x3d180d[_0x4da2f7(0x16c)],_0x2277cf;else _0x56409b[_0x4da2f7(0x149)]=_0x247409;}if(_0x21ebc2['ma_lo'])_0x56409b[_0x4da2f7(0x117)]=_0x21ebc2[_0x4da2f7(0x117)];if(_0x21ebc2[_0x4da2f7(0x129)])_0x56409b[_0x4da2f7(0x129)]=_0x21ebc2[_0x4da2f7(0x129)];if(_0x21ebc2['ma_tt1'])_0x56409b[_0x4da2f7(0x123)]=_0x21ebc2[_0x4da2f7(0x123)];if(_0x21ebc2['ma_tt2'])_0x56409b[_0x4da2f7(0x15c)]=_0x21ebc2[_0x4da2f7(0x15c)];if(_0x21ebc2['ma_tt3'])_0x56409b[_0x4da2f7(0x126)]=_0x21ebc2['ma_tt3'];sokho[_0x4da2f7(0x113)](_0x56409b)[_0x4da2f7(0x171)]()[_0x4da2f7(0x124)](function(_0x4a40a5){const _0x257079=_0x4da2f7;if(_0x27c139[_0x257079(0x11a)](_0x27c139[_0x257079(0x140)],_0x27c139[_0x257079(0x12a)]))_0x4a40a5=_0x4a40a5[_0x257079(0x142)](_0x1ac942=>{const _0x3540d0=_0x257079;return _0x1ac942[_0x3540d0(0x13f)]=_0x1ac942[_0x3540d0(0x135)],_0x1ac942[_0x3540d0(0x15f)]=_0x1ac942[_0x3540d0(0x16c)],_0x1ac942;}),_0x27c139[_0x257079(0x128)](_0x3eeac6,null,_0x4a40a5);else{const _0xfc1b79={'USqmc':function(_0x183c29,_0x416402){return _0x183c29(_0x416402);}};_0x4e71a7(_0x3c7033,function(_0xa072c,_0x54a2f9){if(_0xa072c)return _0xfc1b79['USqmc'](_0x331d70,_0xa072c);_0x58e722(null,_0x54a2f9);});}})[_0x4da2f7(0x152)](_0x22b697=>{const _0x357fe7=_0x4da2f7;_0x27c139[_0x357fe7(0x166)](_0x3eeac6,_0x22b697);});});}},function(_0x2cb370,_0x27d66e){const _0x2a7881=_0x3639f4,_0x1d72ea={'bioTg':function(_0x2e8d11,_0x391d7d,_0x40477c){const _0x22f396=_0x3359;return _0x535627[_0x22f396(0x146)](_0x2e8d11,_0x391d7d,_0x40477c);},'rVwYM':function(_0x36a28e,_0x323de7,_0x199aa9){const _0x121b0f=_0x3359;return _0x535627[_0x121b0f(0x16b)](_0x36a28e,_0x323de7,_0x199aa9);},'DYAsq':function(_0x59ece4,_0x278905,_0x294f59){return _0x535627['CqgLD'](_0x59ece4,_0x278905,_0x294f59);}};if(_0x2a7881(0x12e)!==_0x535627['AcbSH']){if(_0x2cb370){if(_0x535627[_0x2a7881(0x141)](_0x535627[_0x2a7881(0x145)],_0x535627[_0x2a7881(0x145)]))return _0x535627[_0x2a7881(0x12d)](_0x517f75,_0x2cb370);else{var _0x14f9b3=_0x15ef81['ps'][_0x2a7881(0x127)](_0x535627['lcGjP']);_0x535627[_0x2a7881(0x14e)](_0x118f14,null,_0x14f9b3);}}let _0x44db59=[];_0x27d66e['ps'][_0x2a7881(0x160)](function(_0x10bd15){const _0x5722c7=_0x2a7881;_0x10bd15['sysorder']=0x5,_0x10bd15[_0x5722c7(0x16d)]=![],_0x44db59[_0x5722c7(0x138)](_0x10bd15);}),async[_0x2a7881(0x150)]({'ton_dau':function(_0x55d503){const _0x264fec=_0x2a7881;var _0x4f779d=_0x27d66e['dn'][_0x264fec(0x127)]('ton00');_0x1d72ea[_0x264fec(0x136)](_0x55d503,null,_0x4f779d);},'du_dau':function(_0x2ee1d8){const _0x185d53=_0x2a7881,_0x404e08={'VcGLf':_0x535627[_0x185d53(0x143)],'ccmRO':function(_0x2ab4ff,_0x5acfc5,_0x973955){const _0x471dd7=_0x185d53;return _0x535627[_0x471dd7(0x14e)](_0x2ab4ff,_0x5acfc5,_0x973955);}};if(_0x535627[_0x185d53(0x11f)]===_0x185d53(0x154)){var _0x2473a0=_0x27d66e['dn'][_0x185d53(0x127)](_0x535627[_0x185d53(0x139)]);_0x535627[_0x185d53(0x14e)](_0x2ee1d8,null,_0x2473a0);}else{var _0x310d5c=_0x3070d4['dn']['csum'](_0x404e08[_0x185d53(0x130)]);_0x404e08[_0x185d53(0x144)](_0x3d1ff0,null,_0x310d5c);}},'sl_nhap':function(_0x4a3a9b){const _0x1d588f=_0x2a7881;var _0x259898=_0x27d66e['ps'][_0x1d588f(0x127)](_0x535627[_0x1d588f(0x11d)]);_0x535627[_0x1d588f(0x14e)](_0x4a3a9b,null,_0x259898);},'tien_nhap':function(_0x2f2717){const _0x4d61a7=_0x2a7881;var _0x278f50=_0x27d66e['ps'][_0x4d61a7(0x127)](_0x4d61a7(0x121));_0x535627['guwkO'](_0x2f2717,null,_0x278f50);},'sl_xuat':function(_0x223894){const _0x4627ef=_0x2a7881;var _0x4d8cb1=_0x27d66e['ps'][_0x4627ef(0x127)]('sl_xuat');_0x1d72ea[_0x4627ef(0x12b)](_0x223894,null,_0x4d8cb1);},'tien_xuat':function(_0x73f7a9){var _0x1500ba=_0x27d66e['ps']['csum']('tien_xuat');_0x73f7a9(null,_0x1500ba);}},function(_0x3d7656,_0x3a121f){const _0x170982=_0x2a7881,_0x3f9ab0={'LSqmZ':function(_0x59e4f6,_0x2ce117){return _0x535627['eeEBp'](_0x59e4f6,_0x2ce117);},'TrBZM':function(_0x1c848f,_0x5703ee,_0x286141){const _0x176134=_0x3359;return _0x535627[_0x176134(0x165)](_0x1c848f,_0x5703ee,_0x286141);}};if(_0x170982(0x173)===_0x535627[_0x170982(0x13c)]){if(_0x545153)return _0x3f9ab0['LSqmZ'](_0x5f2bdb,_0xc9825);_0x3f9ab0[_0x170982(0x16e)](_0x18513f,null,_0x31107d);}else _0x44db59['push']({'sysorder':0x1,'bold':!![],'dien_giai':_0x170982(0x15a),'sl_nhap':_0x3a121f[_0x170982(0x15e)],'tien_nhap':_0x3a121f[_0x170982(0x12c)],'sl_xuat':0x0,'tien_xuat':0x0}),_0x44db59['push']({'sysorder':0x6,'bold':!![],'dien_giai':_0x535627[_0x170982(0x16a)],'sl_nhap':_0x3a121f['sl_nhap'],'tien_nhap':_0x3a121f[_0x170982(0x121)],'sl_xuat':_0x3a121f[_0x170982(0x15f)],'tien_xuat':_0x3a121f['tien_xuat']}),_0x44db59[_0x170982(0x138)]({'sysorder':0x9,'bold':!![],'dien_giai':_0x535627[_0x170982(0x157)],'sl_nhap':_0x535627[_0x170982(0x147)](_0x3a121f['ton_dau'],_0x3a121f[_0x170982(0x13f)])-_0x3a121f['sl_xuat'],'tien_nhap':_0x535627['cYDIn'](_0x535627['ttDIa'](_0x3a121f[_0x170982(0x12c)],_0x3a121f['tien_nhap']),_0x3a121f[_0x170982(0x112)])}),_0x535627['RQjpi'](_0x517f75,null,_0x44db59);});}else{var _0x32a36f=_0x79ede8['ps'][_0x2a7881(0x127)](_0x2a7881(0x121));_0x1d72ea[_0x2a7881(0x120)](_0x37435b,null,_0x32a36f);}});};
|