Exemple #1
0
 def handPick(self):
     data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
     id_cherry = data_cherry[0]
     id_panen = data_cherry[1]
     status = data_cherry[2]
     proses = data_cherry[3]
     berat = self.root.ids.screen_manager.get_screen("green_hand_pick").ids.berat_green_hand_pick.text
     harga = self.root.ids.screen_manager.get_screen("green_hand_pick").ids.biaya_green_hand_pick.text
     tanggal = self.root.ids.screen_manager.get_screen("green_hand_pick").ids.date_picker_label.text
     
     id_gabahK = m_produksi.getGabahKering(id_cherry)[0]
     m_produksi.inputHandPick(id_gabahK,berat,harga,tanggal,id_panen)
     # id_gabahB = m_produksi.getGabahBasah(id_cherry)[0]
     #id_bean = m_produksi.getGreenBean(id_cherry)[0]
     self.root.ids.screen_manager.get_screen("green_hand_pick").ids.berat_green_hand_pick.text = ""
     self.root.ids.screen_manager.get_screen("green_hand_pick").ids.biaya_green_hand_pick.text = ""
     self.root.ids.screen_manager.get_screen("green_hand_pick").ids.date_picker_label.text = ""
     ################
     data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
     id_panen = data_cherry[1]
     status = data_cherry[2]
     proses = data_cherry[3]
     if proses == "Wet Hull" or proses == "Natural Wet Hull" or proses == "Honey Wet Hull":
         subprocess = ["Panen","Cherry Wet Mill","Gabah Basah Transport","Gabah Basah Bongkar","Gabah Basah Jemur","Gabah Kering Hull","Gabah Kering Jemur","Green Bean Suton","Green Bean Grading","Green Bean Sorter","Green Bean Hand Pick"]
     else:
         subprocess = ["Panen","Cherry Wet Mill","Gabah Basah Transport","Gabah Basah Bongkar","Gabah Basah Jemur","Gabah Kering Hull","Green Bean Suton","Green Bean Grading","Green Bean Sorter","Green Bean Hand Pick"]
     data = m_produksi.getDataSubProcess(status,proses,id_panen,True)
     result =  []
     result.append(int(berat))
     j = 0
     
     if status != "wetmill":
         for i in data:
             print(i ,j)
             j+=1
             result.append(i[0])
     elif status == "wetmill":
         result.append(data[0][0])
     beratSubProcess = []
     for i in result:
         print(i)
         beratSubProcess.append(i)
     
     subprocess = subprocess[0:len(beratSubProcess)]
     print(beratSubProcess)
     print(subprocess)
     print("FINAL")
     self.root.ids.screen_manager.current = "hasilakhir"
     plt.plot((subprocess),(beratSubProcess),'k-o') # ((Subproses),(Berat)) 
     plt.title("Berat Per Subproses", fontsize=10)
     plt.yticks(fontsize=7)
     plt.xticks(fontsize=6)
     plt.xticks(rotation=15, fontsize=5)
     # plt.tight_layout()
     # box.add_widget(FigureCanvasKivyAgg(plt.gcf()))
     self.root.ids.screen_manager.get_screen("hasilakhir").ids.box.add_widget(FigureCanvasKivyAgg(plt.gcf()))
     self.root.ids.screen_manager.transition.direction = "left"
Exemple #2
0
 def getAllSubProcess(self):
     data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
     id_cherry = data_cherry[0]
     id_panen = data_cherry[1]
     id_gabahB = m_produksi.getGabahBasah(id_cherry)[0]
     id_gabahK = m_produksi.getGabahKering(id_cherry)[0]
     id_bean = m_produksi.getGreenBean(id_cherry)[0]
Exemple #3
0
 def transport(self):
     data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
     id_cherry = data_cherry[0]
     id_panen = data_cherry[1]
     berat = self.root.ids.screen_manager.get_screen("gb_transport").ids.berat_gb_transport.text
     harga = self.root.ids.screen_manager.get_screen("gb_transport").ids.biaya_gb_transport.text
     tanggal = self.root.ids.screen_manager.get_screen("gb_transport").ids.date_picker_label.text
     m_produksi.inputTransport(id_cherry,berat,harga,tanggal,id_panen)
     self.root.ids.screen_manager.get_screen("gb_transport").ids.berat_gb_transport.text = ""
     self.root.ids.screen_manager.get_screen("gb_transport").ids.biaya_gb_transport.text = ""
     self.root.ids.screen_manager.get_screen("gb_transport").ids.date_picker_label.text = ""
Exemple #4
0
 def color(self):
     data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
     id_cherry = data_cherry[0]
     id_panen = data_cherry[1]
     berat = self.root.ids.screen_manager.get_screen("green_color").ids.berat_green_color.text
     harga = self.root.ids.screen_manager.get_screen("green_color").ids.biaya_green_color.text
     tanggal = self.root.ids.screen_manager.get_screen("green_color").ids.date_picker_label.text
     result = m_produksi.getGabahKering(id_cherry)
     m_produksi.inputColor(result[0],berat,harga,tanggal,id_panen)
     self.root.ids.screen_manager.get_screen("green_color").ids.berat_green_color.text = ""
     self.root.ids.screen_manager.get_screen("green_color").ids.biaya_green_color.text = ""
     self.root.ids.screen_manager.get_screen("green_color").ids.date_picker_label.text = ""
Exemple #5
0
 def wetmill(self):
     
     data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
     id_cherry = data_cherry[0]
     id_panen = data_cherry[1]
     berat = self.root.ids.screen_manager.get_screen("cheri").ids.berat_cherry_wet_mill.text
     harga = self.root.ids.screen_manager.get_screen("cheri").ids.biaya_cherry_wet_mill.text
     tanggal = self.root.ids.screen_manager.get_screen("cheri").ids.date_picker_label.text  
     m_produksi.inputWetMill(id_cherry,berat,harga,tanggal,id_panen)
     self.root.ids.screen_manager.get_screen("cheri").ids.berat_cherry_wet_mill.text = ""
     self.root.ids.screen_manager.get_screen("cheri").ids.biaya_cherry_wet_mill.text = ""
     self.root.ids.screen_manager.get_screen("cheri").ids.date_picker_label.text = ""
Exemple #6
0
 def dataPanen(self):
     self.tanggal = self.root.ids.screen_manager.get_screen("search").ids.date_picker_label.text
     self.blok = self.root.ids.screen_manager.get_screen("search").ids.search_blok.text
     self.varietas = self.root.ids.screen_manager.get_screen("search").ids.search_varietas.text
     self.tipe_proses = self.root.ids.screen_manager.get_screen("search").ids.search_proses.text
     try :
         data_cherry = m_panen.getPanen(self.tanggal,self.blok,self.varietas,self.tipe_proses)
         self.root.ids.screen_manager.get_screen("search").ids.date_picker_label.text = ''
         self.root.ids.screen_manager.get_screen("search").ids.search_blok.text = ''
         self.root.ids.screen_manager.get_screen("search").ids.search_varietas.text = ''
         self.root.ids.screen_manager.get_screen("search").ids.search_proses.text = ''
         status = data_cherry[2]
         print(data_cherry)
         if status == "cherry":
             ##panggil halaman wetmill  
             self.root.ids.screen_manager.current = "cheri"
             self.root.ids.toolbar.title = "Cherry-Wett Mill"
         elif status == "wetmill": 
             ##panggil halaman transport
             self.root.ids.screen_manager.current = "gb_transport"
             self.root.ids.toolbar.title = "GB-Transport Ke Pabrik"
         elif status == "transport":
             ##panggil halaman bongkar
             self.root.ids.screen_manager.current = "gb_bongkar"
             self.root.ids.toolbar.title = "GB-Bongkar"
         elif status == "bongkar":
             ##panggil halaman jemur
             self.root.ids.screen_manager.current = "gb_jemur"
             self.root.ids.toolbar.title = "GB-Jemur"
         elif status == "gb_jemur":
             ##panggil halaman gk hull
             self.root.ids.screen_manager.current = "gk_hull"
             self.root.ids.toolbar.title = "GK-Hull"
         elif status == "gk_hull" :
             if self.tipe_proses == "Wet Hull" or self.tipe_proses == "Natural Wet Hull" or self.tipe_proses == "Honey Wet Hull":
                 ##panggil gk_jemur
                 print("GK JEMUR")
                 self.root.ids.screen_manager.current = "gk_jemur"
                 self.root.ids.toolbar.title = "GK-Jemur Wet Hull"
             else:
                 ##panggil GreenSuton
                 print("GREEN SUTON")
                 self.root.ids.screen_manager.current = "green_suton"
                 self.root.ids.toolbar.title = "Green Bean-Suton"
         elif status == "gk_jemur" :
             ##panggil GreenSuton 
             #print("GREEN SUTON")
             self.root.ids.screen_manager.current = "green_suton"
             self.root.ids.toolbar.title = "Green Bean-Suton"
         elif status == "green_suton":
             ##panggil GreenGrading
             #print("GRADING")
             self.root.ids.screen_manager.current = "green_grading"
             self.root.ids.toolbar.title = "Green Bean-Grading"
         elif status == "green_grading":
             ##panggil Green Color
             self.root.ids.screen_manager.current = "green_color"
             self.root.ids.toolbar.title = "Green Bean-Color Sorter"
         elif status == "green_color":
             ##panggil Green HandPick
             #finalReport(self)
             self.root.ids.screen_manager.current = "green_hand_pick"
             self.root.ids.toolbar.title = "Green Bean-Hand Pick"      
     except:
         print("ERROR :",self.tanggal,self.blok,self.varietas,self.tipe_proses)
         toast("Data tidak ditemukan")
         self.root.ids.screen_manager.get_screen("search").ids.date_picker_label.text = ''
         self.root.ids.screen_manager.get_screen("search").ids.search_blok.text = ''
         self.root.ids.screen_manager.get_screen("search").ids.search_varietas.text = ''
         self.root.ids.screen_manager.get_screen("search").ids.search_proses.text = ''