mns-common 1.2.9.2__py3-none-any.whl → 1.2.9.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mns-common might be problematic. Click here for more details.

@@ -128,11 +128,32 @@ def get_company_info_detail(symbol: str = "688272") -> pd.DataFrame:
128
128
  data_df['address'] = address
129
129
  market_id = data_json['data']['market_id']
130
130
  data_df['market_id'] = market_id
131
+ # 初始化数据
132
+ data_df['main_business_list'] = [[]]
133
+ data_df['most_profitable_business'] = ''
134
+ data_df['most_profitable_business_rate'] = ''
135
+ data_df['most_profitable_business_profit'] = ''
131
136
 
137
+ # 业务构成
138
+ main_business_list = data_json['data']['main_business']
139
+ # 最盈利业务
140
+ profitable_business = data_json['data']['profitable_business']
141
+
142
+ data_df['main_business_list'] = [main_business_list]
143
+
144
+ most_profitable_business = profitable_business['name']
145
+
146
+ most_profitable_business_rate = profitable_business['profit_rate']
147
+
148
+ most_profitable_business_profit = profitable_business['profit']
149
+
150
+ data_df['most_profitable_business'] = most_profitable_business
151
+ data_df['most_profitable_business_rate'] = most_profitable_business_rate
152
+ data_df['most_profitable_business_profit'] = most_profitable_business_profit
132
153
  return data_df
133
154
  except BaseException as e:
134
155
  logger.error("获取symbol公司详细信息异常:{},{}", symbol, e)
135
156
 
136
157
 
137
158
  if __name__ == '__main__':
138
- get_company_info('688272')
159
+ get_company_info_detail('688272')
@@ -21,8 +21,18 @@ class MongodbUtil:
21
21
 
22
22
  def get_db(self):
23
23
  port = self.port
24
-
25
- client = pymongo.MongoClient("mongodb://192.168.200.2:" + port + "/patience")
24
+ mac_address = ip_util.get_mac_address()
25
+ if port == "remote":
26
+ client = pymongo.MongoClient("mongodb://100.87.2.149:" + '27017' + "/patience")
27
+ elif port == "remote1":
28
+ client = pymongo.MongoClient("mongodb://100.87.2.149:" + '27019' + "/patience")
29
+ # 家里
30
+ elif mac_address is not None and mac_address == ip_util.WINDOWS_MAC_ADDRESS_CD:
31
+ client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
32
+ elif '192.168.1' in ip_util.get_host_ip() and mac_address is not None and mac_address == ip_util.APPLE_AIR_MAC_ADDRESS:
33
+ client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
34
+ else:
35
+ client = pymongo.MongoClient("mongodb://127.0.0.1:" + port + "/patience")
26
36
  return client.patience
27
37
 
28
38
  def group(self, query, coll_name):
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mns_common
3
- Version: 1.2.9.2
3
+ Version: 1.2.9.5
4
4
 
@@ -48,7 +48,7 @@ mns_common/api/ths/concept/app/ths_concept_detail_app.py,sha256=pPrpntV1tQlgdsSe
48
48
  mns_common/api/ths/concept/app/ths_concept_index_app.py,sha256=_7QuYoMKOnMqDE85mfWtBGZ1NDvRUDRpC0b0rMdrku0,8171
49
49
  mns_common/api/ths/concept/web/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
50
50
  mns_common/api/ths/concept/web/ths_common_js_api.py,sha256=ekU9BtSX0xFkeFDVn9QQG_qgQXhpSmZKGKpgkDbeYk4,381
51
- mns_common/api/ths/concept/web/ths_company_info_web.py,sha256=Q_yofooG5ruwWQRDIieTqDiKWcfr8cGSLghLLsmoyVg,6670
51
+ mns_common/api/ths/concept/web/ths_company_info_web.py,sha256=m9nSdeX_vouMZ88VY1B-X79jHtsySKZQv7h2kqxDnq0,7625
52
52
  mns_common/api/ths/concept/web/ths_concept_detail_web.py,sha256=F7PIXPd1dbAR0VbqukeZYRWXEjZT-8Dxjj05lgdCSAc,8540
53
53
  mns_common/api/ths/concept/web/ths_concept_index_web.py,sha256=zULAWpnmpnwc2MOZt7fiMHuAFoJZoln50dunWCGCvHY,7300
54
54
  mns_common/api/ths/self_choose/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
@@ -114,7 +114,7 @@ mns_common/constant/db_name_constant.py,sha256=3o0HsZHomPXqw5UwRYWDhgvSBRj2lUoXZ
114
114
  mns_common/constant/price_enum.py,sha256=nhcPxk0AFdQAp8IsNr5EP9xURLqqJuSl6ljIzTp7Wyo,1093
115
115
  mns_common/constant/redis_msg_constant.py,sha256=fMtI_WbJ2IkMX4qGwvR5MkMO0NqU8XgUUZqQzHIRscU,501
116
116
  mns_common/constant/self_choose_constant.py,sha256=QJVSwUpnXvMYA62V3_8ptDqBdI2J8S5FqI5rYSJTwT0,496
117
- mns_common/db/MongodbUtil.py,sha256=KN7StZYcyng9ga9ywNxvwI4wq4UjOOo3CNY4Kmp5E3k,11024
117
+ mns_common/db/MongodbUtil.py,sha256=oO6t_kKiC13uS4M3OyyQkc_ktfOKhBgWLu49LVy4QQo,11745
118
118
  mns_common/db/MongodbUtilLocal.py,sha256=xLUTeeZ83BbqPtUEwy7QmPtkSfwPyNB_5ggkn-eMpBQ,7560
119
119
  mns_common/db/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
120
120
  mns_common/utils/__init__.py,sha256=xu36nA6MJTauswUWPfKIKH0E-lpOAHTw2TL5QI_6TeY,165
@@ -125,7 +125,7 @@ mns_common/utils/date_handle_util.py,sha256=-WJF_0DRkPkKlfQ5lVqJu8mH3EhpIZ-EBrz0
125
125
  mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
126
126
  mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
127
127
  mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
128
- mns_common-1.2.9.2.dist-info/METADATA,sha256=8MO0MDtrsAxtMEEFi0Vuwj9Rg6sjI6pL7S5ojKaLQWw,61
129
- mns_common-1.2.9.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
130
- mns_common-1.2.9.2.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
131
- mns_common-1.2.9.2.dist-info/RECORD,,
128
+ mns_common-1.2.9.5.dist-info/METADATA,sha256=V-ZNYe1LxqePHvuZkyWlcxhV4xp2Dxjpoz6E4Y--Y9A,61
129
+ mns_common-1.2.9.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
130
+ mns_common-1.2.9.5.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
131
+ mns_common-1.2.9.5.dist-info/RECORD,,