Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
payment-report
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9a47ec7e
authored
Jul 17, 2022
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Peningkatan kecepatan query PBB
1 parent
1b5b288c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
payment_report/scripts/pbb.py
payment_report/scripts/pbb.py
View file @
9a47ec7
...
...
@@ -61,10 +61,10 @@ class App(BaseApp):
if
'h2h_db_url'
in
self
.
conf
:
factory
=
self
.
get_factory
(
'h2h_db_url'
)
self
.
h2h_session
=
factory
()
self
.
base_q_log
=
self
.
h2h_session
.
query
(
Log
)
.
filter_by
(
mti
=
'0210'
,
bit_003
=
PAYMENT_CODE
,
bit_039
=
'00'
)
else
:
self
.
h2h_session
=
None
self
.
h2h_session
=
self
.
prod_session
self
.
base_q_log
=
self
.
h2h_session
.
query
(
Log
)
.
filter_by
(
mti
=
'0210'
,
bit_003
=
PAYMENT_CODE
,
bit_039
=
'00'
)
def
get_iso_reversal_orm
(
self
):
# Override
return
self
.
iso_reversal_orm
...
...
@@ -126,10 +126,10 @@ class App(BaseApp):
except
BitNotSet
:
user_id
=
None
return
iso
.
get_channel
()
.
strip
(),
info
[
'channel'
],
iso
.
get_stan
(),
\
iso
.
get_ntb
(),
iso
.
get_bank_id
(
),
user_id
,
row_inq
.
tgl
iso
.
get_ntb
(),
str
(
iso
.
get_bank_id
()
),
user_id
,
row_inq
.
tgl
def
get_iso_v2
(
self
):
q
=
self
.
base_q_log
.
filter
(
func
.
trim
(
Log
.
bit_061
)
==
self
.
invoice_id
)
q
=
self
.
base_q_log
.
filter
_by
(
bit_061
=
self
.
invoice_id
)
q
=
q
.
order_by
(
Log
.
id
.
desc
())
row
=
q
.
first
()
if
not
row
:
...
...
@@ -137,7 +137,7 @@ class App(BaseApp):
channel_id
=
row
.
bit_018
.
strip
()
channel_nama
=
get_channel_name_by_row
(
row
)
return
channel_id
,
channel_nama
,
row
.
bit_011
,
\
row
.
bit_048
.
strip
(),
int
(
row
.
bit_032
)
,
row
.
bit_107
row
.
bit_048
.
strip
(),
row
.
bit_032
,
row
.
bit_107
def
create_data
(
self
,
psppt
):
# Override
self
.
invoice_id
=
get_id
(
psppt
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment