Commit 01bb1207 authored by suryakant's avatar suryakant

Query Update

parent 60eb2c4e
...@@ -53,7 +53,7 @@ class CommonConstants: ...@@ -53,7 +53,7 @@ class CommonConstants:
FREQUENCY = 'D' FREQUENCY = 'D'
START_COLUMN = 0 START_COLUMN = 0
START_ROW = 2 START_ROW = 2
OVERALL_COLUMN_WIDTH = 25 OVERALL_COLUMN_WIDTH = 27
class ReportType: class ReportType:
......
...@@ -174,7 +174,6 @@ class CustomReportHandler: ...@@ -174,7 +174,6 @@ class CustomReportHandler:
logger.info("Iterating through each block to create a dataframe") logger.info("Iterating through each block to create a dataframe")
# Iterate through the categories and concatenate their data # Iterate through the categories and concatenate their data
# print(input_json)
for category, category_data in input_json.items(): for category, category_data in input_json.items():
data = category_data.get('data', []) data = category_data.get('data', [])
...@@ -235,8 +234,10 @@ class CustomReportHandler: ...@@ -235,8 +234,10 @@ class CustomReportHandler:
start_row = CommonConstants.START_ROW start_row = CommonConstants.START_ROW
total_column = 0 total_column = 0
workbook = writer.book workbook = writer.book
sheet_name = each_date_range[ sheet_name = datetime.strptime(each_date_range[
CommonConstants.DAY_START_DATE] CommonConstants.DAY_START_DATE], "%Y-%m-%d").\
strftime("%d %b %Y")
worksheet = None worksheet = None
# Iterating over sterlite json file # Iterating over sterlite json file
......
...@@ -177,11 +177,16 @@ class SterliteRefineryTemplate: ...@@ -177,11 +177,16 @@ class SterliteRefineryTemplate:
"query": { "query": {
"AcpCcpcCcp": [ "AcpCcpcCcp": [
SterliteRefineryQuery.AcpCcpcCcp.QUERY_1, SterliteRefineryQuery.AcpCcpcCcp.QUERY_1,
SterliteRefineryQuery.AcpCcpcCcp.QUERY_2,
SterliteRefineryQuery.AcpCcpcCcp.QUERY_3,
] ]
}, },
"data": [], "data": [],
"data_column": ["rm_anode_receipt_details", "on_date", "data_column": ["rm_anode_receipt_details", "on_date",
"mtd", "ytd"], "mtd", "ytd"],
"addition": {
"primary": "rm_anode_receipt_details"
}
}, },
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment