Administrator
60 分钟以前 a58fe22470854de1d41900fcd114d0206b6366bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
华鑫成交记录管理
"""
 
 
#
# buy_orderno_map 买入数据map
# 返回代码:成交进度数据的字典
def process(datas, total_buyno_map):
    buyno_dict = {}
    last_no_dict = {}
    for d in datas:
        code = d[0]
        if code not in buyno_dict:
            buyno_dict[code] = []
        if last_no_dict.get(code) == d[6]:
            continue
        last_no_dict[code] = d[6]
        buyno_dict[code].append(d[6])
    fresults_dict = {}
    for code in buyno_dict:
        if code not in total_buyno_map:
            continue
        buyno_list = buyno_dict[code]
        buyno_list.reverse()
        for b in buyno_list:
            if b in total_buyno_map[code]:
                fresults_dict[code] = total_buyno_map[code][b]
                break
    return fresults_dict