Allgemeintoleranz wird nun eingetragen, wenn in SIVAS ein
Fertigungsverfahren vorliegt.
This commit is contained in:
2024-04-09 12:34:17 +02:00
4 changed files with 19 additions and 8 deletions
+2
View File
@@ -1815,10 +1815,12 @@ class GuiLogic():
# Werte der Combobox setzen
if pdm_kategorie_neu == "Baugruppe":
cblist = self._config.Fertigung.get_list_in_section("FertigungsartenBaugruppe")
cblist.insert(0, '')
ret['cb_fertigungsart_neu'] = cblist
elif pdm_kategorie_neu == "Einzelteil":
cblist = self._config.Fertigung.get_list_in_section("Fertigungsarten")
cblist.insert(0, '')
ret['cb_fertigungsart_neu'] = cblist
else:
ret['cb_fertigungsart_neu'] = ''
+1 -2
View File
@@ -598,7 +598,6 @@ class RightFrameBezeichnung(AllFrames):
text = self.bezeichnung1_neu.get()
if len(text) < 45:
self.bezeichnung1_neu_entry.configure(foreground='black')
self._controller.set_gui_data("bezeichnung1_neu", text)
elif len(text) < 51:
self.bezeichnung1_neu_entry.configure(foreground='orange')
else:
@@ -1718,7 +1717,7 @@ class App():
style.theme_use('clam')
# gesamtes Fenster durch Scrollbar, aber auch mit Mausrad verschieben
self._root.bind('<MouseWheel>', self.OnMouseWheel)
#self._root.bind('<MouseWheel>', self.OnMouseWheel)
container = ttk.Frame(self._root)
container.pack()
+15 -5
View File
@@ -82,7 +82,7 @@ def get_sivas_dbase(sivas_id, out_dir):
print(f"Can't execute SIVAS-database query. Check VPN connection and check the path of %SIVAS_DATABASE_QUERY% in cremig_setenv.bat")
return False
def get_sivas_teilestamm(sivas_ids, out_dir):
def get_sivas_teilestamm(sivas_ids, out_dir, overwrite=True):
"""call the sivas exe for getting all csv files with the item data for the given sivas ids"""
sivas_teilestamm_exe = os.environ.get('SIVAS_TEILESTAMM')
@@ -92,9 +92,13 @@ def get_sivas_teilestamm(sivas_ids, out_dir):
ids_to_generate = []
for id in sivas_ids:
id = id.replace(" ", "")
out_file = os.path.join(out_dir, id + ".csv")
if not os.path.isfile(out_file):
id = id.replace(" ", "")
if not overwrite:
out_file = os.path.join(out_dir, id + ".csv")
if not os.path.isfile(out_file):
ids_to_generate.append(id)
continue
else:
ids_to_generate.append(id)
if not id.isnumeric():
@@ -127,6 +131,7 @@ if __name__ == '__main__':
parser.add_argument('-r', '--rd', action='store_true', help='fetch list of existing parts from network drive')
parser.add_argument('-b', '--blacklist', action='store_true', help='fetch list of not allowed parts from network drive')
parser.add_argument('-t', '--teilestamm', action='store_true', help='fetch teilestamm-data for given partnumbers as csv')
parser.add_argument('-w', '--overwrite', action='store_true', help='vorhandene CSV-Dateien werden nicht erneut aus SIVAS abgefragt')
args = parser.parse_args()
@@ -138,8 +143,13 @@ if __name__ == '__main__':
elif args.sivasid:
if args.teilestamm:
get_sivas_teilestamm(args.sivasid, out_dir)
overwrite = args.overwrite
if overwrite:
get_sivas_teilestamm(args.sivasid, out_dir, overwrite = True)
else:
get_sivas_teilestamm(args.sivasid, out_dir, overwrite = False)
else:
get_sivas_dbase(args.sivasid, out_dir)