def EachBatchGroupOperation(MysqlObject): GV.ReceiveStandardDataDict = copy.deepcopy(QJCM.QJC0831_Main()) if GV.ReceiveStandardDataDict: for SingleReceiveStandardDataListFileName in GV.ReceiveStandardDataDict: EBGO.InitEachBatchGlobalVariable() IFRRD.InitFinalResultRegisterDict(GV.ReceiveStandardDataDict[SingleReceiveStandardDataListFileName]) for ExtractTaskID in GV.ExtractPublicTaskInfoDict['ExtractTaskID']: if GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ExtractTaskID]['filename'].strip('.txt') == SingleReceiveStandardDataListFileName: CompanyName = (GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ExtractTaskID]['labelname']) BatchTuple = (GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ExtractTaskID]['labelname'], GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ExtractTaskID]['createtime']) OCC.InsertCooperationCompanyRegister(MysqlObject, CompanyName) ODEB.InsertBatchRegister(MysqlObject, BatchTuple) OTC.InsertTagClassifyRegister(MysqlObject) FTCM.FillTagClassifyMap(MysqlObject) OCV.InsertClassifyValueRegister(MysqlObject) FCVM.FillClassifyValueMap(MysqlObject) FDEB.FillDataExtractBatch(MysqlObject, BatchTuple[0], BatchTuple[1]) IRPN.InsertResultPersonNumber(MysqlObject) GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ExtractTaskID]['status']=5 Today=datetime.datetime.now() GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ExtractTaskID]['endtime'] = datetime.datetime.strftime(Today, '%Y-%m-%d %H:%M:%S') else: print('没有新的数据统计分析任务···')
def main0831(): MysqlObject = MSQLO.Mysql('192.168.7.31', 3306, 'ngoss_dim', 'ngoss_dim') #MysqlObject = MSQLO.Mysql('127.0.0.1', 3306, 'root', 'mysql') # print(MysqlObject._UseDatabase) #OriginDataPath = r'./QJC_Single/test10000.txt' GV.ReceiveStandardDataList = copy.deepcopy(QJCM.QJC0831_Main()) #print('done!') # print(GV.ReceiveStandardDataList) if GV.ReceiveStandardDataList: for SingleReceiveStandardDataList in GV.ReceiveStandardDataList: IFRRD.InitFinalResultRegisterDict( GV.ReceiveStandardDataList[SingleReceiveStandardDataList]) EPTI.ExtractPublicTaskInfo(MysqlObject) print(GV.ExtractPublicTaskInfoDict) # print(GV.FinalResultRegisterDict) CompanyName = ('广发银行信用卡') OCC.InsertCooperationCompanyRegister(MysqlObject, CompanyName) # CompanyName1 = ('PPmoney') # OCC.InsertCooperationCompanyRegister(MysqlObject, CompanyName1) BatchTuple = ('广发银行信用卡', '2018-08-27 08:23:45') ODEB.InsertBatchRegister(MysqlObject, BatchTuple) OTC.InsertTagClassifyRegister(MysqlObject) FTCM.FillTagClassifyMap(MysqlObject) OCV.InsertClassifyValueRegister(MysqlObject) FCVM.FillClassifyValueMap(MysqlObject) FDEB.FillDataExtractBatch(MysqlObject, '广发银行信用卡', '2018-08-27 08:23:45') # print(GV.FinalResultRegisterDict) IRPN.InsertResultPersonNumber(MysqlObject) else: print('没有新的数据统计分析任务···')
def main0831_2(): MysqlObject = MSQLO.Mysql('192.168.7.31', 3306, 'ngoss_dim', 'ngoss_dim') #MysqlObject = MSQLO.Mysql('127.0.0.1', 3306, 'root', 'mysql') # print(MysqlObject._UseDatabase) #OriginDataPath = r'./QJC_Single/test10000.txt' # print(GV.ReceiveStandardDataList) EPTI.ExtractPublicTaskInfo(MysqlObject) if len(GV.ExtractPublicTaskInfoDict['ExtractTaskID']) != 0: GV.ReceiveStandardDataDict = copy.deepcopy(QJCM.QJC0831_Main()) #for TaskID in GV.ReceiveStandardDataList[ExtractTaskID]: if GV.ReceiveStandardDataDict: for SingleReceiveStandardDataListFileName in GV.ReceiveStandardDataDict: EBGO.InitEachBatchGlobalVariable() IFRRD.InitFinalResultRegisterDict(GV.ReceiveStandardDataDict[ SingleReceiveStandardDataListFileName]) #print(GV.ExtractPublicTaskInfoDict) # print(GV.FinalResultRegisterDict) for ExtractTaskID in GV.ExtractPublicTaskInfoDict[ 'ExtractTaskID']: if GV.ExtractPublicTaskInfoDict['ExtractTaskID'][ ExtractTaskID]['filename'].strip( '.txt' ) == SingleReceiveStandardDataListFileName: # 插入公司映射记录··· #CompanyName = ('广发银行信用卡') CompanyName = ( GV.ExtractPublicTaskInfoDict['ExtractTaskID'] [ExtractTaskID]['labelname']) OCC.InsertCooperationCompanyRegister( MysqlObject, CompanyName) # CompanyName1 = ('PPmoney') # OCC.InsertCooperationCompanyRegister(MysqlObject, CompanyName1) #BatchTuple = ('广发银行信用卡', '2018-08-27 08:23:45') BatchTuple = ( GV.ExtractPublicTaskInfoDict['ExtractTaskID'] [ExtractTaskID]['labelname'], GV.ExtractPublicTaskInfoDict['ExtractTaskID'] [ExtractTaskID]['createtime']) ODEB.InsertBatchRegister(MysqlObject, BatchTuple) OTC.InsertTagClassifyRegister(MysqlObject) FTCM.FillTagClassifyMap(MysqlObject) OCV.InsertClassifyValueRegister(MysqlObject) FCVM.FillClassifyValueMap(MysqlObject) #FDEB.FillDataExtractBatch(MysqlObject, '广发银行信用卡', '2018-08-27 08:23:45') FDEB.FillDataExtractBatch(MysqlObject, BatchTuple[0], BatchTuple[1]) # print(GV.FinalResultRegisterDict) IRPN.InsertResultPersonNumber(MysqlObject) else: print('没有新的数据统计分析任务···')