Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sterlite_custom_reports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
suryakant
sterlite_custom_reports
Commits
cf93420f
Commit
cf93420f
authored
Oct 27, 2023
by
mohammed.akhib
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATED CCPP QUERIES and CCPC
parent
e6c166f7
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1108 additions
and
706 deletions
+1108
-706
scripts/core/db/postgres/custom_report_query.py
scripts/core/db/postgres/custom_report_query.py
+665
-333
scripts/core/handler/event_handler.py
scripts/core/handler/event_handler.py
+5
-4
scripts/template/ccpc_report_template.py
scripts/template/ccpc_report_template.py
+24
-2
scripts/template/ccpp_report_template.py
scripts/template/ccpp_report_template.py
+414
-367
No files found.
scripts/core/db/postgres/custom_report_query.py
View file @
cf93420f
This diff is collapsed.
Click to expand it.
scripts/core/handler/event_handler.py
View file @
cf93420f
...
...
@@ -4,6 +4,7 @@ import pandas as pd
from
datetime
import
datetime
from
scripts.constants
import
ReportType
,
CommonConstants
,
PostgresConstant
from
scripts.template.ccpc_report_template
import
CCPCReportTemplate
from
scripts.template.ccpp_report_template
import
CCPPReportTemplate
from
scripts.template.refinery_report_template
import
SterliteRefineryTemplate
from
scripts.template.acp_report_template
import
ACPReportTemplate
from
scripts.core.logging.application_logging
import
logger
...
...
@@ -631,7 +632,7 @@ class CustomReportHandler:
logger
.
info
(
f
"date filter: {each_date_range}"
)
report_template
=
copy
.
deepcopy
(
ACPReportTemplate
.
REPORT_TEMPLATE
CCPPReportTemplate
.
CCPP_
REPORT_TEMPLATE
)
start_col
=
CommonConstants
.
START_COLUMN
start_row
=
CommonConstants
.
START_ROW
...
...
@@ -658,9 +659,9 @@ class CustomReportHandler:
input_json
=
each_blocks
,
writer
=
writer
,
workbook
=
workbook
,
sheet_name
=
sheet_name
,
start_col
=
start_col
,
start_row
=
start_row
,
header_merge_format
=
AC
PReportTemplate
.
COLUMN_HEADER_FORMAT
,
column_merge_format
=
AC
PReportTemplate
.
COLUMN_HEADER_FORMAT
,
blank_merge_format
=
AC
PReportTemplate
.
BLANK_COLUMN_HEADER_FORMAT
header_merge_format
=
CCP
PReportTemplate
.
COLUMN_HEADER_FORMAT
,
column_merge_format
=
CCP
PReportTemplate
.
COLUMN_HEADER_FORMAT
,
blank_merge_format
=
CCP
PReportTemplate
.
BLANK_COLUMN_HEADER_FORMAT
)
if
total_column
<
shape
[
1
]:
...
...
scripts/template/ccpc_report_template.py
View file @
cf93420f
...
...
@@ -25,6 +25,18 @@ class CCPCReportTemplate:
"MTD"
,
],
"query"
:
{
"Production"
:[
SterliteCCPCQuery
.
Production
.
QUERY_1
,
SterliteCCPCQuery
.
Production
.
QUERY_2
],
"BariumSulphateP"
:[
SterliteCCPCQuery
.
BariumSulphateP
.
QUERY_1
,
SterliteCCPCQuery
.
BariumSulphateP
.
QUERY_2
],
"Sodiumsilicate"
:[
SterliteCCPCQuery
.
Sodiumsilicate
.
QUERY_1
,
SterliteCCPCQuery
.
Sodiumsilicate
.
QUERY_2
],
"BLISTER"
:
[
SterliteCCPCQuery
.
BLISTER
.
QUERY_1
,
SterliteCCPCQuery
.
BLISTER
.
QUERY_2
,
...
...
@@ -295,7 +307,11 @@ class CCPCReportTemplate:
},
"MONTHWISE PRODUCTION DETAILS (MT)"
:
{
"columns"
:
[
"NOS"
,
"TARGET"
,
"PRODUCTION"
],
"query"
:
{},
"query"
:
{
"MonthWiseData"
:[
SterliteCCPCQuery
.
MonthWiseData
.
QUERY_1
]
},
"data"
:
[],
"data_column"
:
[
"nos"
,
"target"
,
"production"
],
"addition"
:
{
...
...
@@ -317,11 +333,17 @@ class CCPCReportTemplate:
"OD PRODN (MT) ="
],
"query"
:
{
"ProductionDetails1"
:[
SterliteCCPCQuery
.
ProductionDetails1
.
QUERY1
],
"ProductionDetails2"
:
[
SterliteCCPCQuery
.
ProductionDetails2
.
QUERY_1
]
},
"data"
:
[],
"data_column"
:
[
"
production details-no. of anodes
"
,
"
kpi
"
,
"a_shift"
,
"b_shift"
,
"c_shift"
,
...
...
scripts/template/ccpp_report_template.py
View file @
cf93420f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment