Post on 10-Feb-2017
2015 Internship Delhivery
Hitesh Kumar Regar Ashok Kumar Bhukhar
Task Provided
Json File To Excel
In This we have bigsize JSON file and we have to generate excel file of JSON file have multiple dictionary type data according to key and value.
Specify the key included in Excel file .
Vendor Problem
In this two and more panels connected to a vendor. Combine all panel code for a vendor in single file with a unique code provided by Delhivery ,problem are vecodore code have some variation in each company
Extra Slip GenerationWe have contributed in godam(logistic system of Delhivery) to generate extra slip at outbound according to client requirement .Client will provide information whether extra slip should generated or not .
Challenges deep-dive
Json File To Excel
Key’s are change company to company key’s are not same for allcompany . for eg. some company have product color key and some have product material
Vendor Problem
very difficult to define common code For different type of product code type change so define a unique string processing algo are impossible for us .
Extra Slip Generation
Huge amount of tableAnd send two pdf in single HTTP ResponseThey have much amount of tabel and their relation and generation of two pdf are not possible in single HTTP request
Solution1.JSON Data To Excel File
To solve the problem we have used python dictionary data structure.
For all files scan keys and check if key in dictionary then ignore if not than add to dictionary.
Then using xlsxwriter row by rowcreate excel file .
Solution2. Vendor Code Problem
By using define some string processing algo create common code
1. Convert all char to capital
2. Remove , - _ . type char
3. Sort Them by word
4. Connect all word
5. Store in dictionary key:common code value:List Of Company with code
6. Then use json to excel script
Solution3. Extra Slip Generation
we study all uses table relation about their data and then
using Django Framework define extra slip
generation method and using JQuery one by one two pdf are
generated
Implementation
1 . Json to Excel File Converter
Python Script
Master File
Common code
Common Code
Amazon
jm xl
Myntra
jm-xl
Flipkart
jmxl
Common Code
IPHONEWHITE5S
FlipkartIphone 5s
white
Amazon white 5s Iphone
JMXL
commone code Amazon Code Flipkart Code Myntra Code
JMXL AB5HJ67KKDJDJDJD AKNJ73973873S LJDLFJNFD454
IPHONEWHITE5S DSHDJ5454KJKJJK FDFDJJK34343KKJ
2.Vendor Code Problem
Extra Slip Generation max gwth
Main Slip Request
Extra Slip Request
Data
Django Script
Jquery
Extra slip Response