def FindObjMP(Table: str, REF): if Table == Settings.Var_Process1(): Type = Settings.Dir_BD() else: Type = Settings.Dir_PBD() Ref, Worker, Provider, Reference, Presentation, Num_Rem, Num_Pre, Total_Weight, Initial_Date, Final_Date, CodeB, Num_Coils = \ SQLMP.FindMP(Type, REF) return (Reference, Presentation)
def FindESMPP(Provider: str, Presentation: str, Table: str, REF: str): if Provider == Settings.Var_Provider1(): if Presentation == Settings.Var_P1(): NameTable = Settings.Var_EC() else: NameTable = Settings.Var_EE() else: if Presentation == Settings.Var_P1(): NameTable = Settings.Var_IC() else: NameTable = Settings.Var_IE() if Table == Settings.Var_Process1(): Type = Settings.Dir_BD() else: Type = Settings.Dir_PBD() CodeB, Num_Pre, Num_Rem, Num_Coils, Num_CoilsR, Total_Weight, Total_WeightR, Measurement = SQLFunctionMPP.FindMPP( NameTable, Type, REF) return (Num_Coils, Num_CoilsR, Total_Weight, Total_WeightR)
def FindAllItemMP(Table: str, ItemToFind: str): if Table == Settings.Var_Process1(): Type = Settings.Dir_BD() else: Type = Settings.Dir_PBD() Refs, Workers, Providers, References, Presentations, NumRems, NumPres, TotalWeight, InitialDate, FinalDate, CodeBr, NumCoils = \ SQLMP.FindALLMP(Type) if ItemToFind == Settings.Var_Comp26(): return Refs elif ItemToFind == Settings.Var_Comp15(): return Workers elif ItemToFind == Settings.Var_Comp14(): return Providers elif ItemToFind == Settings.Var_Comp13(): return References elif ItemToFind == Settings.Var_Comp12(): return Presentations elif ItemToFind == Settings.Var_Comp9(): return NumRems elif ItemToFind == Settings.Var_Comp3(): return NumPres elif ItemToFind == Settings.Var_Comp6(): return NumCoils elif ItemToFind == Settings.Var_Comp4(): return TotalWeight elif ItemToFind == Settings.Var_Comp19(): return InitialDate elif ItemToFind == Settings.Var_Comp20(): return FinalDate elif ItemToFind == Settings.Var_Comp1(): return CodeBr