You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
7.5 KiB

  1. import json
  2. data_format_prod = {
  3. 'Prod_Name': None, 'BBD': None, 'Nutrients': [], 'Calories': 0, 'Cooked': False 'Allergens': [], 'Problematic': False, 'Process': None, 'ED': None
  4. }
  5. data_format_proc = {
  6. 'Harvested': {'Date': '', 'Location': '', 'Product': '','Problematic':False},
  7. 'Transport1': {'Duration': 0, 'Moved to,from': '-', 'Condition': True, 'Stopped': False,'Problematic':False},
  8. 'Process': {'Location': '', 'Processes': '','Problematic':False},
  9. 'Transport2': {'Duration': 0, 'Moved to,from': '-', 'Condition': True, 'Stopped': False,'Problematic':False},
  10. 'Packaging': {'Location': '', 'Material': '', 'Cancerogen': True,'Problematic':False}
  11. }
  12. data_1_prod = {
  13. 'Prod_Name': "Milk", 'BBD': "24.08.2018", 'Nutrients': ['Protein', 'Fat', 'Lactose', 'Glucose'],
  14. 'Calories': 120, 'Cooked': False, 'Allergens': ['Lactose'], 'Problematic': False,
  15. 'Process': 'Pastorized', 'ED': "02.09.2018"
  16. }
  17. data_2_prod = {
  18. 'Prod_Name': "Chocolate", 'BBD': "28.01.2019", 'Nutrients': ['Lactose', 'Glucose', 'Cocoa'],
  19. 'Calories': 180, 'Cooked': False, 'Allergens': ['Cocoa', 'Lactose'], 'Problematic': False, 'Process': 'None', 'ED': "21.02.2019"
  20. }
  21. data_3_prod = {
  22. 'Prod_Name': "Delitos", 'BBD': "19.12.2018", 'Nutrients': ['Protein', 'Carbohydrate', 'Fibre', 'Soduium', 'Fat', 'Salt'],
  23. 'Calories': 160, 'Cooked': True, 'Allergens': ['Lactose','Gluten', 'Nuts'], 'Problematic': False,
  24. 'Process': 'Fried', 'ED': "02.09.2018"
  25. }
  26. data_4_prod = {
  27. 'Prod_Name': "Gullon Sugar Free Shortbread Biscuits", 'BBD': "02.11.2018", 'Nutrients': ['Protein', 'Carbohydrate', 'Fibre', 'Sodium', 'Fat', 'Sugar', 'Salt'],
  28. 'Calories': 439, 'Cooked': True, 'Allergens': ['Lactose', 'Wheat', 'Soya'], 'Problematic': False,
  29. 'Process': 'Baking', 'ED': "08.12.2018"
  30. }
  31. data_5_prod = {
  32. 'Prod_Name': Gluten Free Penne Rigate, 'BBD': 18.02.2019, 'Nutrients': ['Protein', 'Carbohydrate', 'Fiber', 'Sodium', 'Fat', 'Salt'], 'Calories': 359,'Cooked': False 'Allergens': ['Wheat'],
  33. 'Problematic': False, 'Process': 'Klining', 'ED': 18.02.2020
  34. }
  35. data_6_prod = {
  36. 'Prod_Name': EGE Gluten Free Corn Stach, 'BBD': 27.03.2019, 'Nutrients': ['Fat', 'Carbohydrate', 'Protein'], 'Calories': 360,'Cooked': False 'Allergens': ['Corn'],
  37. 'Problematic': False, 'Process': Scalping, 'ED': 20.02.2020
  38. }
  39. data_7_prod = {
  40. 'Prod_Name': Tropical Heat Peanuts, 'BBD': 04.02.2019, 'Nutrients': ['Protein', 'Carbohydrate', 'Sugar', 'Saturated Fat', 'Mono-unsaturated Fat', 'Poly-unsaturated Fat', 'Fibre','Salt'], 'Calories': 602,'Cooked': False 'Allergens': ['Peanuts'],
  41. 'Problematic': False, 'Roasted': None, 'ED': 09.03.2020
  42. }
  43. data_1_proc = {
  44. 'Harvested': {
  45. 'Date': '18.08.2018', 'Location': 'Larson Family',
  46. 'Product': 'Raw Milk'
  47. ,'Problematic':False
  48. },
  49. 'Transport1': {
  50. 'Duration': 9, 'Moved to,from': 'Larson Family-McCarty Family Farms', 'Condition': True,
  51. 'Stopped': True
  52. ,'Problematic':True
  53. }, 'Process': {
  54. 'Location': 'McCarty Family Farms',
  55. 'Processes': 'Reverse Osmosis,Nanofiltration,Ultrafiltration,Microfiltration'
  56. ,'Problematic':False
  57. },
  58. 'Transport2': {
  59. 'Duration': 13, 'Moved to,from': 'McCarty Family Farms-JJX Packaging', 'Condition': True,
  60. 'Stopped': True
  61. ,'Problematic':False
  62. },
  63. 'Packaging': {'Location': 'JJX Packaging', 'Material': 'Carton', 'Cancerogen': False,'Problematic':True}
  64. }
  65. data_2_proc = {
  66. 'Harvested': {
  67. 'Date': '27.01.2018', 'Location': 'India',
  68. 'Product': 'Cocoa','Problematic':True
  69. },
  70. 'Transport1': {'Duration': 71, 'Moved to,from': 'India-Nestle ', 'Condition': True, 'Stopped': True,'Problematic':False},
  71. 'Process': {'Location': 'Nestle', 'Processes': 'Roasting,Pulp,Conching,Moulding','Problematic':False},
  72. 'Transport2': {
  73. 'Duration': 4, 'Moved to,from': 'Nestle-Ulma Packaging', 'Condition': True,
  74. 'Stopped': False,'Problematic':False
  75. },
  76. 'Packaging': {'Location': 'Ulma Packaging', 'Material': 'Foil', 'Cancerogen': False,'Problematic':False}
  77. }
  78. data_3_proc = {
  79. 'Harvested': {'Date': '06.05.2018', 'Location': 'India', 'Product': 'Potatoe','Problematic':False},
  80. 'Transport1': {'Duration': 19, 'Moved to,from': 'India-Gee Tee Industries', 'Condition': True, 'Stopped': True,'Problematic':False},
  81. 'Process': {'Location': 'Gee Tee Industries', 'Processes': 'Peeling, Slicing, Frying','Problematic':False},
  82. 'Transport2': {'Duration': 0, 'Moved to,from': 'Gee Tee Industries-Gee Tee Industries', 'Condition': True, 'Stopped': False,'Problematic':False},
  83. 'Packaging': {'Location': 'Gee Tee Industries', 'Material': 'Polypropylene', 'Cancerogen': False,'Problematic': False}
  84. }
  85. data_4_proc = {
  86. 'Harvested': {'Date': '14.05.2017', 'Location': 'Turkey', 'Product': 'Wheat','Problematic':False},
  87. 'Transport1': {'Duration': 23, 'Moved to,from': 'Turkey-Galletas Gullon SA', 'Condition': True, 'Stopped': True,'Problematic':False},
  88. 'Process': {'Location': 'Galletas Gullon SA', 'Processes': 'Kneading, Moulding, Baking, Cooling','Problematic':False},
  89. 'Transport2': {'Duration': 7, 'Moved to,from': 'Galletas Gullon SA-Greif Packaging Spain SA', 'Condition': True, 'Stopped': False,'Problematic':False},
  90. 'Packaging': {'Location': 'Greif Packaging Spain SA', 'Material': 'Carton', 'Cancerogen': False,'Problematic':False}
  91. }
  92. data_5_proc = {
  93. 'Harvested': {'Date': '15.06.2017', 'Location': 'Russia', 'Product': 'Wheat','Problematic':False},
  94. 'Transport1': {'Duration': 29, 'Moved to,from': 'Russia-Barilla', 'Condition': True, 'Stopped': True,'Problematic':False},
  95. 'Process': {'Location': 'Barilla', 'Processes': 'Pressing, Moulding, Klining, Ensiling ','Problematic':False},
  96. 'Transport2': {'Duration': 1, 'Moved to,from': 'Barilla-Barilla', 'Condition': True, 'Stopped': False,'Problematic':False},
  97. 'Packaging': {'Location': 'Barilla', 'Material': 'Carton', 'Cancerogen': False,'Problematic':False}
  98. }
  99. data_6_proc = {
  100. 'Harvested': {'Date': '16.08.2017', 'Location': 'USA', 'Product': 'Corn','Problematic':False},
  101. 'Transport1': {'Duration': 28, 'Moved to,from': 'USA-EGE Gluten Free Food Product Company', 'Condition': True, 'Stopped': True,'Problematic':False},
  102. 'Process': {'Location': 'EGE Gluten Free Food Product Company', 'Processes': 'Cleaning, Maceration, Core Scalping, Bran Scalping, Protein Scalping, Starch Purification','Problematic':False},
  103. 'Transport2': {'Duration': 1, 'Moved to,from': 'EGE Gluten Free Food Product Company-Starpak Packaging Company', 'Condition': True, 'Stopped': False,'Problematic':False},
  104. 'Packaging': {'Location': 'Starpak Packaging Company', 'Material': 'Recyclable Plastic', 'Cancerogen': False,'Problematic':False}
  105. }
  106. data_7_proc = {
  107. 'Harvested': {'Date': '02.04.2018', 'Location': 'Kenya', 'Product': 'Peanuts','Problematic':False},
  108. 'Transport1': {'Duration': 8, 'Moved to,from': 'Kenya-Deepa Industries LTD', 'Condition': True, 'Stopped': True,'Problematic':False},
  109. 'Process': {'Location': 'Deepa Industries LTD', 'Processes': 'Peeling, Roasting, Salting','Problematic':False},
  110. 'Transport2': {'Duration': 0.5, 'Moved to,from': 'Deepa Industries LTD-Deepa Industries LTD', 'Condition': True, 'Stopped': False,'Problematic':False},
  111. 'Packaging': {'Location': 'Deepa Industries LTD', 'Material': 'Plastic', 'Cancerogen': False,'Problematic':False}
  112. }
  113. Products = [data_1_prod, data_2_prod, data_3_prod, data_4_prod,data_5_prod,data_6_prod,data_7_prod]
  114. Processes = [data_1_proc, data_2_proc, data_3_proc,data_4_proc,data_5_proc,data_6_proc,data_7_proc]
  115. for i in range(len(Products)):
  116. with open('../database/content/Products/'+str(i+1) + '.json', 'w') as outfile:
  117. json.dump(Products[i], outfile)
  118. outfile.close()
  119. for i in range(len(Processes)):
  120. with open('../database/content/Processes/'+str(i+1) + '.json', 'w') as outfile:
  121. json.dump(Processes[i], outfile)
  122. outfile.close()