lesscode-tag 0.0.17__tar.gz → 0.0.18__tar.gz
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.
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/PKG-INFO +1 -1
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag/business.py +64 -0
- lesscode_tag-0.0.18/lesscode_tag/version.py +1 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag.egg-info/PKG-INFO +1 -1
- lesscode_tag-0.0.17/lesscode_tag/version.py +0 -1
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/README.md +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag/__init__.py +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag.egg-info/SOURCES.txt +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag.egg-info/dependency_links.txt +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag.egg-info/requires.txt +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/lesscode_tag.egg-info/top_level.txt +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/setup.cfg +0 -0
- {lesscode_tag-0.0.17 → lesscode_tag-0.0.18}/setup.py +0 -0
|
@@ -176,3 +176,67 @@ def format_special_tag_list(special_tag_list=None):
|
|
|
176
176
|
else:
|
|
177
177
|
bool_should_list.append(get_single_tag_condition(special_tag))
|
|
178
178
|
return {"bool": {"should": bool_should_list}}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def format_ck_param_tag(bool_should_more_list, especial_tag_list):
|
|
182
|
+
bool_should_list = {"relation": "or", "value": []}
|
|
183
|
+
if especial_tag_list is not None:
|
|
184
|
+
for tag in especial_tag_list:
|
|
185
|
+
if tag in ["已上市", "新三板挂牌"]:
|
|
186
|
+
market_tag = {
|
|
187
|
+
"已上市": 1,
|
|
188
|
+
"新三板挂牌": 2
|
|
189
|
+
}
|
|
190
|
+
bool_should_list["value"].append({
|
|
191
|
+
"relation": "has",
|
|
192
|
+
"column": "market_tag.status",
|
|
193
|
+
"value": market_tag[tag]
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
if tag in ["国家级专精特新企业", "高新技术企业", "技术实力", "省级单项冠军企业", "国家级单项冠军企业",
|
|
197
|
+
"龙头企业", "中国企业500强", "中国民营企业500强", "中国独角兽企业", "全球独角兽企业", "央企"]:
|
|
198
|
+
diy_tag = {
|
|
199
|
+
"国家级专精特新企业": 8,
|
|
200
|
+
"高新技术企业": 4,
|
|
201
|
+
"技术实力": 7,
|
|
202
|
+
"省级单项冠军企业": 11,
|
|
203
|
+
"国家级单项冠军企业": 13,
|
|
204
|
+
"龙头企业": 9,
|
|
205
|
+
"中国企业500强": 17,
|
|
206
|
+
"中国民营企业500强": 14,
|
|
207
|
+
"中国独角兽企业": 16,
|
|
208
|
+
"全球独角兽企业": 15,
|
|
209
|
+
"央企": 18,
|
|
210
|
+
}
|
|
211
|
+
bool_should_list["value"].append({
|
|
212
|
+
"relation": "has",
|
|
213
|
+
"column": "diy_tag_id",
|
|
214
|
+
"value": diy_tag[tag]
|
|
215
|
+
})
|
|
216
|
+
if tag == "省级专精特新企业":
|
|
217
|
+
bool_should_list["value"].append({
|
|
218
|
+
"relation": "and",
|
|
219
|
+
"value": [{"relation": "has", "column": "diy_tag_id", "value": 3},
|
|
220
|
+
{"relation": "not",
|
|
221
|
+
"value": [
|
|
222
|
+
{"relation": "has", "column": "diy_tag_id", "value": 8}]}]
|
|
223
|
+
})
|
|
224
|
+
if tag == "科技型中小企业":
|
|
225
|
+
bool_should_list["value"].append({
|
|
226
|
+
"relation": "has",
|
|
227
|
+
"column": "certification.name_id",
|
|
228
|
+
"value": 3
|
|
229
|
+
})
|
|
230
|
+
if tag in ["民营", "外资"]:
|
|
231
|
+
capital_type = {
|
|
232
|
+
"民营": 2,
|
|
233
|
+
"外资": 6
|
|
234
|
+
}
|
|
235
|
+
bool_should_list["value"].append({
|
|
236
|
+
"relation": "eq",
|
|
237
|
+
"column": "capital_type",
|
|
238
|
+
"value": capital_type[tag]
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
bool_should_more_list.append(bool_should_list)
|
|
242
|
+
return bool_should_more_list
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.18"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.17"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|