|  |  |  | @ -65,16 +65,15 @@ def update_real_data(): | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             db_red_update(_id, red_date_id, update_data) | 
			
		
	
		
			
				
					|  |  |  |  |             # 插入 IndexGroup index_group | 
			
		
	
		
			
				
					|  |  |  |  |             insert_index_group( | 
			
		
	
		
			
				
					|  |  |  |  |                 {'dateId': red_date_id, 'type': 'history', 'index_group': json.dumps(history_index_group)}) | 
			
		
	
		
			
				
					|  |  |  |  |             insert_index_group({'dateId': red_date_id, 'type': 'last', 'index_group': json.dumps(last_index_group)}) | 
			
		
	
		
			
				
					|  |  |  |  |             insert_index_group(red_date_id, 'history', json.dumps(history_index_group)) | 
			
		
	
		
			
				
					|  |  |  |  |             insert_index_group(red_date_id, 'last', json.dumps(last_index_group)) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if blue_date_id['five'] == old_history_date_id: | 
			
		
	
		
			
				
					|  |  |  |  |         # 插入 real_blue, prv_index, post_index, history_index | 
			
		
	
		
			
				
					|  |  |  |  |         real_blue = all_data[-1]['blue'] | 
			
		
	
		
			
				
					|  |  |  |  |         forecast_blue_data = db_blue_get_data_by_date_id(blue_date_id['five'], 5) | 
			
		
	
		
			
				
					|  |  |  |  |         for data in forecast_blue_data: | 
			
		
	
		
			
				
					|  |  |  |  |             _id = data['id'] | 
			
		
	
		
			
				
					|  |  |  |  |             if blue_date_id['five'] == old_history_date_id: | 
			
		
	
		
			
				
					|  |  |  |  |                 # 插入 real_blue, prv_index, post_index, history_index | 
			
		
	
		
			
				
					|  |  |  |  |                 real_blue = all_data[-1]['blue'] | 
			
		
	
		
			
				
					|  |  |  |  |             forecast_blue_data = db_blue_get_data_by_date_id(blue_date_id['five'], 5) | 
			
		
	
		
			
				
					|  |  |  |  |             for data in forecast_blue_data: | 
			
		
	
		
			
				
					|  |  |  |  |                 _id = data['id'] | 
			
		
	
		
			
				
					|  |  |  |  |             prv_index = general_blue_index(real_blue, json.loads(data['prv'])) | 
			
		
	
		
			
				
					|  |  |  |  |             post_index = general_blue_index(real_blue, json.loads(data['post'])) | 
			
		
	
		
			
				
					|  |  |  |  |             history_index = general_blue_index(real_blue, json.loads(data['history'])) | 
			
		
	
	
		
			
				
					|  |  |  | @ -86,11 +85,11 @@ def update_real_data(): | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             db_blue_update(blue_date_id['five'], update_data, _id, 5) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if blue_date_id['three'] == old_history_date_id: | 
			
		
	
		
			
				
					|  |  |  |  |         real_blue = all_data[-1]['blue'] | 
			
		
	
		
			
				
					|  |  |  |  |         forecast_blue_data = db_blue_get_data_by_date_id(blue_date_id['three'], 3) | 
			
		
	
		
			
				
					|  |  |  |  |         for data in forecast_blue_data: | 
			
		
	
		
			
				
					|  |  |  |  |             _id = data['id'] | 
			
		
	
		
			
				
					|  |  |  |  |             if blue_date_id['three'] == old_history_date_id: | 
			
		
	
		
			
				
					|  |  |  |  |                 real_blue = all_data[-1]['blue'] | 
			
		
	
		
			
				
					|  |  |  |  |             forecast_blue_data = db_blue_get_data_by_date_id(blue_date_id['three'], 3) | 
			
		
	
		
			
				
					|  |  |  |  |             for data in forecast_blue_data: | 
			
		
	
		
			
				
					|  |  |  |  |                 _id = data['id'] | 
			
		
	
		
			
				
					|  |  |  |  |             prv_index = general_blue_index(real_blue, json.loads(data['prv'])) | 
			
		
	
		
			
				
					|  |  |  |  |             post_index = general_blue_index(real_blue, json.loads(data['post'])) | 
			
		
	
		
			
				
					|  |  |  |  |             history_index = general_blue_index(real_blue, json.loads(data['history'])) | 
			
		
	
	
		
			
				
					|  |  |  | @ -102,8 +101,9 @@ def update_real_data(): | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             db_blue_update(blue_date_id['three'], update_data, _id, 3) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             # 插入预测数据 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | # 插入预测数据 | 
			
		
	
		
			
				
					|  |  |  |  | def general_forecast_data(): | 
			
		
	
		
			
				
					|  |  |  |  |     forecast_blue() | 
			
		
	
		
			
				
					|  |  |  |  |     red_forecast() | 
			
		
	
	
		
			
				
					|  |  |  | 
 |