|
@@ -20,6 +20,19 @@ def add_mchid(mchid):
|
|
|
def get_mchids():
|
|
|
return list(_all_mchids)
|
|
|
|
|
|
+def mch_paths(reader: MerchantReader, tuple_pathes: dict, days: list):
|
|
|
+ count = len(days)
|
|
|
+ for mchid, tup in tuple_pathes.items():
|
|
|
+ mch_datas = reader.init_data(count)
|
|
|
+ for _card_type, _spec in tup:
|
|
|
+ for i, day in enumerate(days):
|
|
|
+ data = reader.read(day, mchid, _card_type, _spec)
|
|
|
+ if data is not None:
|
|
|
+ column_pos = i * 86400
|
|
|
+ view = mch_datas[:, column_pos:column_pos + 86400]
|
|
|
+ view += data
|
|
|
+ yield mchid, None, None, mch_datas
|
|
|
+
|
|
|
def allpathes(reader: MerchantReader, tuple_pathes: dict, days: list, spec=None):
|
|
|
count = len(days)
|
|
|
show_detail = True if len(list(tuple_pathes.keys())) == 1 else False
|