|
@@ -1420,7 +1420,7 @@ class APIMgr():
|
|
|
return response
|
|
|
#电销
|
|
|
#个人信息查询
|
|
|
- def personal_info(self):
|
|
|
+ def personal_info(self):
|
|
|
header = GSTORE['headers']
|
|
|
session=self.get_session()
|
|
|
json = {
|
|
@@ -1719,8 +1719,115 @@ class APIMgr():
|
|
|
response = self.s.post(f"{cfg.target_host}/jyapi/jybx/core/participate/info",headers = headers , json = json)
|
|
|
return response
|
|
|
|
|
|
+ #校验招标搜索筛选条件
|
|
|
+ def check_search(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "bidField": "",
|
|
|
+ "searchvalue": "挖掘机",
|
|
|
+ "selectType": "content",
|
|
|
+ "industry": "建筑工程_勘察设计,建筑工程_工程施工,建筑工程_监理咨询,建筑工程_材料设备,建筑工程_机电安装,建筑工程_其他",
|
|
|
+ "minprice": "",
|
|
|
+ "maxprice": "",
|
|
|
+ "publishtime": "fiveyear",
|
|
|
+ "subtype": "招标结果",
|
|
|
+ "buyerclass": "",
|
|
|
+ "buyertel": "y",
|
|
|
+ "winnertel": "",
|
|
|
+ "notkey": "工地",
|
|
|
+ "buyer": "",
|
|
|
+ "winner": "",
|
|
|
+ "agency": "",
|
|
|
+ "fileExists": "1",
|
|
|
+ "regionMap": {
|
|
|
+ "河南": {}
|
|
|
+ },
|
|
|
+ "searchGroup": 0,
|
|
|
+ "searchMode": 1,
|
|
|
+ "wordsMode": 0,
|
|
|
+ "additionalWords": "",
|
|
|
+ "dateTime": "fiveyear"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/jybx/base/checkSearchScreen",headers = headers ,json = json)
|
|
|
+ return response
|
|
|
+
|
|
|
+ # 保存招标搜索筛选条件
|
|
|
+ def add_search(self,inkey):
|
|
|
+ check_response = self.check_search()
|
|
|
+ try:
|
|
|
+ check_data = check_response.json()
|
|
|
+ inkey_value = check_data.get('data')
|
|
|
+ if inkey_value:
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "bidField": "",
|
|
|
+ "searchvalue": "挖掘机",
|
|
|
+ "selectType": "content",
|
|
|
+ "industry": "建筑工程_勘察设计,建筑工程_工程施工,建筑工程_监理咨询,建筑工程_材料设备,建筑工程_机电安装,建筑工程_其他",
|
|
|
+ "minprice": "",
|
|
|
+ "maxprice": "",
|
|
|
+ "publishtime": "fiveyear",
|
|
|
+ "subtype": "招标结果",
|
|
|
+ "buyerclass": "",
|
|
|
+ "buyertel": "y",
|
|
|
+ "winnertel": "",
|
|
|
+ "notkey": "工地",
|
|
|
+ "buyer": "",
|
|
|
+ "winner": "",
|
|
|
+ "agency": "",
|
|
|
+ "fileExists": "1",
|
|
|
+ "regionMap": {
|
|
|
+ "河南": {}
|
|
|
+ },
|
|
|
+ "searchGroup": 0,
|
|
|
+ "searchMode": 1,
|
|
|
+ "wordsMode": 0,
|
|
|
+ "additionalWords": "",
|
|
|
+ "dateTime": "fiveyear",
|
|
|
+ "inkey": inkey_value
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/jybx/base/addSearchScreen", headers=headers, json=json)
|
|
|
+ return response
|
|
|
+ else:
|
|
|
+ print("未从 check_search 返回结果中找到 data 字段。")
|
|
|
+ return None
|
|
|
+ except ValueError:
|
|
|
+ print("无法将 check_search 的响应解析为 JSON。")
|
|
|
+ return None
|
|
|
|
|
|
-
|
|
|
+ #展示招标搜索筛选条件
|
|
|
+ def show_search(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "bidField": ""
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/jybx/base/showSearchScreen",headers = headers ,json = json)
|
|
|
+ return response
|
|
|
+
|
|
|
+ # 删除招标搜索筛选条件
|
|
|
+ def del_search(self,id_value):
|
|
|
+ show_response = self.show_search()
|
|
|
+ try:
|
|
|
+ show_data = show_response.json()
|
|
|
+ data = show_data.get('data')
|
|
|
+ if data and isinstance(data, list) and len(data) > 0:
|
|
|
+ search_id = data[0].get('id')
|
|
|
+ if search_id:
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "id": search_id
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/jybx/base/delSearchScreen", headers=headers, json=json)
|
|
|
+ return response
|
|
|
+ else:
|
|
|
+ print("未从 show_search 返回结果的 data 下找到 id 字段。")
|
|
|
+ return None
|
|
|
+ else:
|
|
|
+ print("未从 show_search 返回结果中找到有效的 data 列表。")
|
|
|
+ return None
|
|
|
+ except ValueError:
|
|
|
+ print("无法将 show_search 的响应解析为 JSON。")
|
|
|
+ return None
|
|
|
|
|
|
apimgr = APIMgr()
|
|
|
|