Sfoglia il codice sorgente

基本完毕(只差一个)

sptkw 1 anno fa
parent
commit
e3b3a48bd7

+ 42 - 0
amac/amac_canceled_fund_manager_api.py

@@ -0,0 +1,42 @@
+import json
+
+import Utils
+from Config import mysql_pool, conn, headers, page, size
+
+start_time = Utils.data_time()
+print("开始时间(精确到毫秒)[已注销私募基金管理人]:", start_time)
+
+
+# 因为这里数据一条人员信息amac_member_user中包含了对应的多个证书,所以需要先循环把证书拿出来
+def savetodb(data):
+    # 判断是否为空,为空则跳过直接返回
+    if data is None: return
+
+    person_record = []
+    for item in data:
+        # 构建人员信息记录
+        this_data = {
+            'user_tenant_id': item.get("userTenantId"),
+            'org_name': item.get("orgName"),
+            'org_code': item.get("orgCode"),
+            'establishment_time': item.get("establishmentTime"),
+            'org_sign_date': item.get("orgSignDate"),
+            'cancel_date': item.get("cancelDate"),
+            'status': item.get("status")
+        }
+
+        person_record.append(this_data)
+    # 批量插入
+    mysql_pool.insert('amac_canceled_fund_manager', person_record)
+
+
+this_page = page
+this_size = size
+payload = json.dumps({"regiProvinceFsc": "province", "offiProvinceFsc": "province"})
+
+# 已注销私募基金管理人
+http_url = "/amac-infodisc/api/cancelled/manager"
+
+Utils.get_page_result(http_url, this_page, this_size, payload, headers, conn, savetodb, __file__)
+
+print(f"[已注销私募基金管理人]结束时间(精确到毫秒): {Utils.data_time()} - {start_time}")

+ 71 - 0
amac/amac_private_fund_registration_process_api.py

@@ -0,0 +1,71 @@
+import json
+
+import Utils
+from Config import mysql_pool, conn, headers, page, size
+
+start_time = Utils.data_time()
+print("开始时间(精确到毫秒)[私募基金管理人登记办理流程]:", start_time)
+
+
+# 因为这里数据一条人员信息amac_member_user中包含了对应的多个证书,所以需要先循环把证书拿出来
+def savetodb(data):
+    # 判断是否为空,为空则跳过直接返回
+    if data is None: return
+
+    person_record = []
+    for item in data:
+        # 构建人员信息记录
+        this_data = {
+            'id': item.get("id"),
+            'apply_id': item.get("applyId"),
+            'audit_id': item.get("auditId"),
+            'org_name': item.get("orgName"),
+            'org_status': item.get("orgStatus"),
+            'org_status_name': item.get("orgStatusName"),
+            'org_type': item.get("orgType"),
+            'org_type_name': item.get("orgTypeName"),
+            'register_address': item.get("registerAddress"),
+            'office_address': item.get("officeAddress"),
+            'latfirm_name': item.get("latfirmName"),
+            'legaller_name': item.get("legallerName"),
+            'first_submit_date': item.get("firstSubmitDate"),
+            'last_submit_date': item.get("lastSubmitDate"),
+            'last_update_date': item.get("lastUpdateDate"),
+            'total_audit_day': item.get("totalAuditDay"),
+            'total_fixed_day': item.get("totalFixedDay"),
+            'last_fixed_count': item.get("lastFixedCount"),
+            'audit_start_date': item.get("auditStartDate"),
+            'new_total_fixed_day': item.get("newTotalFixedDay"),
+            'first_return_no_list_date': item.get("firstReturnNoListDate"),
+            'no_list_return_count': item.get("noListReturnCount"),
+            'mark_star': item.get("markStar"),
+            'suspend_date': item.get("suspendDate"),
+            'regain_date': item.get("regainDate"),
+            'terminate_date': item.get("terminateDate"),
+            'interrupt_date': item.get("interruptDate"),
+            'interrupt_duration': item.get("interruptDuration"),
+            'office_province': item.get("officeProvince"),
+            'office_city': item.get("officeCity"),
+            'office_district': item.get("officeDistrict"),
+            'office_adr_agg': item.get("officeAdrAgg"),
+            'register_province': item.get("registerProvince"),
+            'register_city': item.get("registerCity"),
+            'register_district': item.get("registerDistrict"),
+            'reg_adr_agg': item.get("regAdrAgg")
+        }
+
+        person_record.append(this_data)
+    # 批量插入
+    mysql_pool.insert('amac_private_fund_registration_process', person_record)
+
+
+this_page = page
+this_size = size
+payload = json.dumps({"regiProvinceFsc": "province", "offiProvinceFsc": "province"})
+
+# 私募基金管理人登记办理流程
+http_url = "/amac-infodisc/api/pof/manager/register-flow"
+
+Utils.get_page_result(http_url, this_page, this_size, payload, headers, conn, savetodb, __file__)
+
+print(f"[私募基金管理人登记办理流程]结束时间(精确到毫秒): {Utils.data_time()} - {start_time}")

+ 71 - 0
amac/amac_terminated_institution_api.py

@@ -0,0 +1,71 @@
+import json
+
+import Utils
+from Config import mysql_pool, conn, headers, page, size
+
+start_time = Utils.data_time()
+print("开始时间(精确到毫秒)[终止机构]:", start_time)
+
+
+# 因为这里数据一条人员信息amac_member_user中包含了对应的多个证书,所以需要先循环把证书拿出来
+def savetodb(data):
+    # 判断是否为空,为空则跳过直接返回
+    if data is None: return
+
+    person_record = []
+    for item in data:
+        # 构建人员信息记录
+        this_data = {
+            'id': item.get("id"),
+            'apply_id': item.get("applyId"),
+            'audit_id': item.get("auditId"),
+            'org_name': item.get("orgName"),
+            'org_status': item.get("orgStatus"),
+            'org_status_name': item.get("orgStatusName"),
+            'org_type': item.get("orgType"),
+            'org_type_name': item.get("orgTypeName"),
+            'register_address': item.get("registerAddress"),
+            'office_address': item.get("officeAddress"),
+            'latfirm_name': item.get("latfirmName"),
+            'legaller_name': item.get("legallerName"),
+            'first_submit_date': item.get("firstSubmitDate"),
+            'last_submit_date': item.get("lastSubmitDate"),
+            'last_update_date': item.get("lastUpdateDate"),
+            'total_audit_day': item.get("totalAuditDay"),
+            'total_fixed_day': item.get("totalFixedDay"),
+            'last_fixed_count': item.get("lastFixedCount"),
+            'audit_start_date': item.get("auditStartDate"),
+            'new_total_fixed_day': item.get("newTotalFixedDay"),
+            'first_return_no_list_date': item.get("firstReturnNoListDate"),
+            'no_list_return_count': item.get("noListReturnCount"),
+            'mark_star': item.get("markStar"),
+            'suspend_date': item.get("suspendDate"),
+            'regain_date': item.get("regainDate"),
+            'terminate_date': item.get("terminateDate"),
+            'interrupt_date': item.get("interruptDate"),
+            'interrupt_duration': item.get("interruptDuration"),
+            'office_province': item.get("officeProvince"),
+            'office_city': item.get("officeCity"),
+            'office_district': item.get("officeDistrict"),
+            'office_adr_agg': item.get("officeAdrAgg"),
+            'register_province': item.get("registerProvince"),
+            'register_city': item.get("registerCity"),
+            'register_district': item.get("registerDistrict"),
+            'reg_adr_agg': item.get("regAdrAgg")
+        }
+
+        person_record.append(this_data)
+    # 批量插入
+    mysql_pool.insert('amac_terminated_institution', person_record)
+
+
+this_page = page
+this_size = size
+payload = json.dumps({"orgStatusList": ["终止办理"], "regiProvinceFsc": "province", "offiProvinceFsc": "province"})
+
+# 终止机构
+http_url = "/amac-infodisc/api/pof/manager/register-flow"
+
+Utils.get_page_result(http_url, this_page, this_size, payload, headers, conn, savetodb, __file__)
+
+print(f"[终止机构]结束时间(精确到毫秒): {Utils.data_time()} - {start_time}")

+ 6 - 1
amac/main.py

@@ -15,7 +15,12 @@ python_files = [
     # 'amac_fund_company_collective_investment_products_api.py'  # 基金公司及子公司集合资管产品
     # 'amac_asset_backed_special_plan_api.py'  # 资产支持专项计划公示
     # 'amac_futures_company_collection_product_api.py'  # 期货公司集合资管产品
-    'amac_private_fund_manager_api.py'  # 私募基金管理人
+    # 'amac_private_fund_manager_api.py'  # 私募基金管理人
+    # 'amac_private_fund_registration_process_api.py'  # 私募基金管理人登记办理流程
+    # 'amac_suspended_institution_api.py'  # 中止机构-[数据为空,无法知道数据类型]
+    # 'amac_terminated_institution_api.py'  # 终止机构
+    # ''  #
+    'amac_canceled_fund_manager_api.py'  # 已注销私募基金管理人
 
 ]