示例#1
0
 def Check_And_Add_ListT():
     Lotes, Refs, Weights, WeightD = SQLT.FindALLT(Settings.Dir_CBDR())
     Lotes2, Refs2, Weights2, WeightD2 = SQLT.FindALLT(Settings.Dir_BDR())
     New_Lotes = []
     New_Refs = []
     New_Weight = []
     New_WeightD = []
     for x in range(len(Refs)):
         if Refs[x] not in New_Refs:
             New_Lotes.append(Lotes[x])
             New_Refs.append(Refs[x])
             New_Weight.append(Weights[x])
             New_WeightD.append(WeightD[x])
     for x in range(len(Refs2)):
         if Refs2[x] not in New_Refs:
             New_Lotes.append(Lotes2[x])
             New_Refs.append(Refs2[x])
             New_Weight.append(Weights2[x])
             New_WeightD.append(WeightD2[x])
     SQLT.DeleteALLT(Settings.Dir_CBDR())
     SQLT.DeleteALLT(Settings.Dir_BDR())
     for x in range(len(New_Refs)):
         SQLT.AddT(Settings.Dir_CBDR(), New_Lotes[x], New_Refs[x],
                   New_Weight[x], New_WeightD[x])
         SQLT.AddT(Settings.Dir_BDR(), New_Lotes[x], New_Refs[x],
                   New_Weight[x], New_WeightD[x])
示例#2
0
 def UpgradeMP():
     Ref2, Worker2, Provider2, Reference2, Presentation2, NumRem2, NumPre2, TotalWeight2, InitialD2, FinalD2, CodeB2, NumCoils2 = SQLMP.FindALLMP(
         Settings.Dir_CBD())
     Refs, Workers, Providers, References, Presentations, NumRems, NumPres, NumCoils, NumCoilsR, TotalWeight, TotalWeightR, InitialDate, FinalDate, CodeBr = SQLMPR.FindALLMPR(
         Settings.Dir_BDR())
     New_Refs = []
     New_Workers = []
     New_Providers = []
     New_References = []
     New_Presentation = []
     New_NumRem = []
     New_NumPre = []
     New_NumCoils = []
     New_NumCoilsR = []
     New_TotalW = []
     New_TotalWR = []
     New_Initial = []
     New_Final = []
     New_CodeB = []
     for x in range(len(Refs)):
         if Refs[x] not in New_Refs:
             New_Refs.append(Refs[x])
             New_Workers.append(Workers[x])
             New_Providers.append(Providers[x])
             New_References.append(References[x])
             New_Presentation.append(Presentations[x])
             New_NumRem.append(NumRems[x])
             New_NumPre.append(NumPres[x])
             New_NumCoils.append(NumCoils[x])
             New_NumCoilsR.append(NumCoilsR[x])
             New_TotalW.append(TotalWeight[x])
             New_TotalWR.append(TotalWeightR[x])
             New_Initial.append(InitialDate[x])
             New_Final.append(FinalDate[x])
             New_CodeB.append(CodeBr[x])
     for x in range(len(Ref2)):
         if Ref2[x] not in New_Refs:
             New_Refs.append(Ref2[x])
             New_Workers.append(Worker2[x])
             New_Providers.append(Provider2[x])
             New_References.append(Reference2[x])
             New_Presentation.append(Presentation2[x])
             New_NumRem.append(NumRem2[x])
             New_NumPre.append(NumPre2[x])
             New_NumCoils.append(NumCoils2[x])
             New_NumCoilsR.append(0)
             New_TotalW.append(TotalWeight2[x])
             New_TotalWR.append(0)
             New_Initial.append(InitialD2[x])
             New_Final.append(FinalD2[x])
             New_CodeB.append(CodeB2[x])
     SQLMPR.DeleteALLMPR(Settings.Dir_BDR())
     for x in range(len(New_Refs)):
         SQLMPR.AddMPR(Settings.Dir_BDR(), New_Refs[x], New_Workers[x],
                       New_Providers[x], New_References[x],
                       New_Presentation[x], New_NumRem[x], New_NumPre[x],
                       New_NumCoils[x], New_NumCoilsR[x], New_TotalW[x],
                       New_TotalWR[x], New_Initial[x], New_Final[x],
                       New_CodeB[x])
示例#3
0
 def Check_And_Add_ListMFR():
     Lotes, Refs, CodeCs, References, Workers, Providers, Bottles, Weights, WeightDeps, Steameds, InitialD, FinalD = SQLMFR.FindALLMFR(
         Settings.Dir_BDR())
     Lotes2, Refs2, CodeCs2, References2, Workers2, Providers2, Bottles2, Weights2, WeightDeps2, Steameds2, InitialD2, FinalD2 = SQLMFR.FindALLMFR(
         Settings.Dir_CBDR())
     New_Lotes = []
     New_Refs = []
     New_CodeC = []
     New_References = []
     New_Worker = []
     New_Provider = []
     New_Bottles = []
     New_Weight = []
     New_WeightD = []
     New_Steamed = []
     New_InitialD = []
     New_FinalD = []
     for x in range(len(Refs)):
         if Refs[x] not in New_Refs:
             New_Lotes.append(Lotes[x])
             New_Refs.append(Refs[x])
             New_CodeC.append(CodeCs[x])
             New_References.append(References[x])
             New_Worker.append(Workers[x])
             New_Provider.append(Providers[x])
             New_Bottles.append(Bottles[x])
             New_Weight.append(Weights[x])
             New_WeightD.append(WeightDeps[x])
             New_Steamed.append(Steameds[x])
             New_InitialD.append(InitialD[x])
             New_FinalD.append(FinalD[x])
     for x in range(len(Refs2)):
         if Refs2[x] not in New_Refs:
             New_Lotes.append(Lotes2[x])
             New_Refs.append(Refs2[x])
             New_CodeC.append(CodeCs2[x])
             New_References.append(References2[x])
             New_Worker.append(Workers2[x])
             New_Provider.append(Providers2[x])
             New_Bottles.append(Bottles2[x])
             New_Weight.append(Weights2[x])
             New_WeightD.append(WeightDeps2[x])
             New_Steamed.append(Steameds2[x])
             New_InitialD.append(InitialD2[x])
             New_FinalD.append(FinalD2[x])
     SQLMFR.DeleteALLMFR(Settings.Dir_CBDR())
     SQLMFR.DeleteALLMFR(Settings.Dir_BDR())
     for x in range(len(New_Refs)):
         SQLMFR.AddMFR(Settings.Dir_CBDR(), New_Lotes[x], New_Refs[x],
                       New_CodeC[x], New_References[x], New_Worker[x],
                       New_Provider[x], New_Bottles[x], New_Weight[x],
                       New_WeightD[x], New_Steamed[x], New_InitialD[x],
                       New_FinalD[x])
         SQLMFR.AddMFR(Settings.Dir_BDR(), New_Lotes[x], New_Refs[x],
                       New_CodeC[x], New_References[x], New_Worker[x],
                       New_Provider[x], New_Bottles[x], New_Weight[x],
                       New_WeightD[x], New_Steamed[x], New_InitialD[x],
                       New_FinalD[x])
示例#4
0
 def Check_And_Add_ListMR(NameTable: str):
     Refs, CodeCs, Workers, Machines, InitialD, FinalD, Num_works, Steameds, CodeBr = SQLFunctionTime.FindALLMR(
         NameTable, Settings.Dir_BDR())
     Refs2, CodeCs2, Workers2, Machines2, InitialD2, FinalD2, Num_works2, Steameds2, CodeBr2 = SQLFunctionTime.FindALLMR(
         NameTable, Settings.Dir_CBDR())
     New_Refs = []
     New_CodeC = []
     New_Worker = []
     New_Machine = []
     New_InitialD = []
     New_FinalD = []
     New_Works = []
     New_Steamed = []
     New_CodeB = []
     for x in range(len(Refs)):
         if Refs[x] not in New_Refs:
             New_Refs.append(Refs[x])
             New_CodeC.append(CodeCs[x])
             New_Worker.append(Workers[x])
             New_Machine.append(Machines[x])
             New_InitialD.append(InitialD[x])
             New_FinalD.append(FinalD[x])
             New_Works.append(Num_works[x])
             New_Steamed.append(Steameds[x])
             New_CodeB.append(CodeBr[x])
     for x in range(len(Refs2)):
         if Refs2[x] not in New_Refs:
             New_Refs.append(Refs2[x])
             New_CodeC.append(CodeCs2[x])
             New_Worker.append(Workers2[x])
             New_Machine.append(Machines2[x])
             New_InitialD.append(InitialD2[x])
             New_FinalD.append(FinalD2[x])
             New_Works.append(Num_works2[x])
             New_Steamed.append(Steameds2[x])
             New_CodeB.append(CodeBr2[x])
     SQLFunctionTime.DeleteALLMR(NameTable, Settings.Dir_CBDR())
     SQLFunctionTime.DeleteALLMR(NameTable, Settings.Dir_BDR())
     for x in range(len(New_Refs)):
         SQLFunctionTime.AddMR(NameTable, Settings.Dir_CBDR(), New_Refs[x],
                               New_CodeC[x], New_Worker[x], New_Machine[x],
                               New_InitialD[x], New_FinalD[x], New_Works[x],
                               New_Steamed[x], New_CodeB[x])
         SQLFunctionTime.AddMR(NameTable, Settings.Dir_BDR(), New_Refs[x],
                               New_CodeC[x], New_Worker[x], New_Machine[x],
                               New_InitialD[x], New_FinalD[x], New_Works[x],
                               New_Steamed[x], New_CodeB[x])
示例#5
0
 def FindObjMPR(Table: str, REF: str):
     if Table == Settings.Var_Process1():
         Type = Settings.Dir_BDR()
     else:
         Type = Settings.Dir_PBDR()
     Refs, Workers, Providers, References2, Presentations, NumRems, NumPres, NumCoils, NumCoilsR, TotalWeight, TotalWeightR, InitialDate, FinalDate, CodeBr = SQLMPR.FindMPR(
         Type, REF)
     return (Providers, References2, Presentations)
示例#6
0
 def UpgradeMPP(NameTable: str):
     CodeBr2, NumPre2, NumRem2, NumBox2, NumCoils2, TotalW2, Measure2 = SQLFunctionMPP.FindALLMPP(
         NameTable, Settings.Dir_CBD())
     CodeBr, NumPre, NumRem, NumCoils, NumCoilsR, TotalW, TotalWR, Measure = SQLFunction.FindALLMPPR(
         NameTable, Settings.Dir_BDR())
     New_CodeB = []
     New_NumPre = []
     New_NumRem = []
     New_NumCoils = []
     New_NumCoilsR = []
     New_TotalW = []
     New_TotalWR = []
     New_Measure = []
     for x in range(len(CodeBr)):
         if CodeBr[x] not in New_CodeB:
             New_CodeB.append(CodeBr[x])
             New_NumPre.append(NumPre[x])
             New_NumRem.append(NumRem[x])
             New_NumCoils.append(NumCoils[x])
             New_NumCoilsR.append(NumCoilsR[x])
             New_TotalW.append(TotalW[x])
             New_TotalWR.append(TotalWR[x])
             New_Measure.append(Measure[x])
     for x in range(len(CodeBr2)):
         if CodeBr2[x] not in New_CodeB:
             New_CodeB.append(CodeBr2[x])
             New_NumPre.append(NumPre2[x])
             New_NumRem.append(NumRem2[x])
             New_NumCoils.append(NumCoils2[x])
             New_NumCoilsR.append(0)
             New_TotalW.append(TotalW2[x])
             New_TotalWR.append(0)
             New_Measure.append(Measure2[x])
     SQLFunction.DeleteALLMPPR(NameTable, Settings.Dir_BDR())
     for x in range(len(New_CodeB)):
         SQLFunction.AddMPPR(NameTable, Settings.Dir_BDR(), New_CodeB[x],
                             New_NumRem[x], New_NumPre[x], New_NumCoils[x],
                             New_NumCoilsR[x], New_TotalW[x],
                             New_TotalWR[x], New_Measure[x])
示例#7
0
 def Check_And_Add_ListPM(NameTable: str):
     Refs, CodeCs, Workers, Machines, Reasons, InitialD, FinalD = SQLFunctionPP.FindALLPM(
         NameTable, Settings.Dir_BDR())
     Refs2, CodeCs2, Workers2, Machines2, Reasons2, InitialD2, FinalD2 = SQLFunctionPP.FindALLPM(
         NameTable, Settings.Dir_CBDR())
     New_Refs = []
     New_CodeCs = []
     New_Workers = []
     New_Machines = []
     New_Reasons = []
     New_Initial = []
     New_Final = []
     for x in range(len(Refs)):
         if Refs[x] not in New_Refs:
             New_Refs.append(Refs[x])
             New_Workers.append(Workers[x])
             New_CodeCs.append(CodeCs[x])
             New_Machines.append(Machines[x])
             New_Reasons.append(Reasons[x])
             New_Initial.append(InitialD[x])
             New_Final.append(FinalD[x])
     for x in range(len(Refs2)):
         if Refs2[x] not in New_Refs:
             New_Refs.append(Refs2[x])
             New_Workers.append(Workers2[x])
             New_CodeCs.append(CodeCs2[x])
             New_Machines.append(Machines2[x])
             New_Reasons.append(Reasons2[x])
             New_Initial.append(InitialD2[x])
             New_Final.append(FinalD2[x])
     SQLFunctionPP.DeleteALLPM(NameTable, Settings.Dir_CBDR())
     SQLFunctionPP.DeleteALLPM(NameTable, Settings.Dir_BDR())
     for x in range(len(New_Refs)):
         SQLFunctionPP.AddPM(NameTable, Settings.Dir_CBDR(), New_Refs[x],
                             New_Workers[x], New_CodeCs[x], New_Machines[x],
                             New_Reasons[x], New_Initial[x], New_Final[x])
         SQLFunctionPP.AddPM(NameTable, Settings.Dir_BDR(), New_Refs[x],
                             New_Workers[x], New_CodeCs[x], New_Machines[x],
                             New_Reasons[x], New_Initial[x], New_Final[x])
示例#8
0
 def Check_And_Add_ListP():
     Refs, CodeCs, Weight_tare, Weights, WeightD_tare, WeightD = SQLP.FindALLP(
         Settings.Dir_CBDR())
     Refs2, CodeCs2, Weight_tare2, Weights2, WeightD_tare2, WeightD2 = SQLP.FindALLP(
         Settings.Dir_BDR())
     New_Refs = []
     New_CodeC = []
     New_Weight_tare = []
     New_Weight = []
     New_WeightD_tare = []
     New_WeightD = []
     for x in range(len(Refs)):
         if Refs[x] not in New_Refs:
             New_Refs.append(Refs[x])
             New_CodeC.append(CodeCs[x])
             New_Weight_tare.append(Weight_tare[x])
             New_Weight.append(Weights[x])
             New_WeightD_tare.append(WeightD_tare[x])
             New_WeightD.append(WeightD[x])
     for x in range(len(Refs2)):
         if Refs2[x] not in New_Refs:
             New_Refs.append(Refs2[x])
             New_CodeC.append(CodeCs2[x])
             New_Weight_tare.append(Weight_tare2[x])
             New_Weight.append(Weights2[x])
             New_WeightD_tare.append(WeightD_tare2[x])
             New_WeightD.append(WeightD2[x])
     SQLP.DeleteALLP(Settings.Dir_CBDR())
     SQLP.DeleteALLP(Settings.Dir_BDR())
     for x in range(len(New_Refs)):
         SQLP.AddP(Settings.Dir_CBDR(), New_Refs[x], New_CodeC[x],
                   New_Weight_tare[x], New_Weight[x], New_WeightD_tare[x],
                   New_WeightD[x])
         SQLP.AddP(Settings.Dir_BDR(), New_Refs[x], New_CodeC[x],
                   New_Weight_tare[x], New_Weight[x], New_WeightD_tare[x],
                   New_WeightD[x])
示例#9
0
 def UpgradeMPPR(Provider: str, Presentation: str, Table: str,
                 REMISION: str, CODE: str, DATO_MOD, Value):
     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_BDR()
     else:
         Type = Settings.Dir_PBDR()
     SQLFunction.UpdateMPPR(NameTable, Type, REMISION, CODE, DATO_MOD,
                            Value)
示例#10
0
 def FindESMPPR(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_BDR()
     else:
         Type = Settings.Dir_PBDR()
     CodeBr, NumPre, NumRem, NumCoils, NumCoilsR, TotalW, TotalWR, Measure = SQLFunction.FindsMPPR(
         NameTable, Type, REF)
     return (NumCoils, NumCoilsR, TotalW, TotalWR)
示例#11
0
 def FindObjMPPR(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_BDR()
     else:
         Type = Settings.Dir_PBDR()
     CodeB, Num_Pre, Num_Rem, Num_Coils, Num_CoilsR, Total_Weight, Total_WeightR, Measurement = SQLFunction.FindCodeBMPPR(
         NameTable, Type, REF)
     return (CodeB)
示例#12
0
 def FindAllItemMPR(Table: str, ItemToFind: str):
     if Table == Settings.Var_Process1():
         Type = Settings.Dir_BDR()
     else:
         Type = Settings.Dir_PBDR()
     Refs, Workers, Providers, References, Presentations, NumRems, NumPres, NumCoils, NumCoilsR, TotalWeight, TotalWeightR, InitialDate, FinalDate, CodeBr = SQLMPR.FindALLMPR(
         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_Comp7(): return NumCoilsR
     elif ItemToFind == Settings.Var_Comp4(): return TotalWeight
     elif ItemToFind == Settings.Var_Comp28(): return TotalWeightR
     elif ItemToFind == Settings.Var_Comp19(): return InitialDate
     elif ItemToFind == Settings.Var_Comp20(): return FinalDate
     elif ItemToFind == Settings.Var_Comp1(): return CodeBr
示例#13
0
 def UpgradeMPR(Table: str, REMISION: str, DATO_MOD, Value):
     if Table == Settings.Var_Process1():
         Type = Settings.Dir_BDR()
     else:
         Type = Settings.Dir_PBDR()
     SQLMPR.UpdateMPR(Type, REMISION, DATO_MOD, Value)