2 Commits e063c05e1c ... 65425c55a2

Auteur SHA1 Bericht Datum
  weijianghai 65425c55a2 导出车辆低效明细 4 maanden geleden
  weijianghai e063c05e1c 导出车辆低效明细 4 maanden geleden

+ 3 - 2
car/car-chao-bao/car_chao-bao.py

@@ -64,6 +64,7 @@ def data_process():
         "廊坊市分公司": "廊坊",
         "秦皇岛市分公司": "秦皇岛",
         "省公司本部": "省公司本部",
+        "省本部": "省公司本部",
         "石家庄市分公司": "石家庄",
         "唐山市分公司": "唐山",
         "邢台市分公司": "邢台",
@@ -564,7 +565,7 @@ def data_process():
         except Exception:
             return None
 
-    df['公里数'] = df['公里数'].apply(get_num)
+    df['进厂公里数'] = df['进厂公里数'].apply(get_num)
     df['截止数据提取日行驶里程'] = df['截止数据提取日行驶里程'].apply(get_num)
     df['超出建议保养公里数'] = df['超出建议保养公里数'].apply(get_num)
 
@@ -576,7 +577,7 @@ def data_process():
 
     df['超出建议保养时间(天)'] = df['超出建议保养时间(天)'].apply(get_int)
     # 打印DataFrame的信息
-    print(df.info())
+    df.info()
 
     # 将处理后的数据保存到CSV文件中
     df.to_csv(path_or_buf=output_path,

+ 2 - 1
car/car-guo-jian/car_guo_jian.py

@@ -64,6 +64,7 @@ def data_process():
         "廊坊市分公司": "廊坊",
         "秦皇岛市分公司": "秦皇岛",
         "省公司本部": "省公司本部",
+        "省本部": "省公司本部",
         "石家庄市分公司": "石家庄",
         "唐山市分公司": "唐山",
         "邢台市分公司": "邢台",
@@ -548,7 +549,7 @@ def data_process():
     df['年检时间'] = df['年检时间'].apply(lambda x: None if pd.isna(x) else pd.to_datetime(x).strftime('%Y%m'))
 
     # 打印DataFrame的信息
-    print(df.info())
+    df.info()
 
     # 将处理后的数据保存到CSV文件中
     df.to_csv(path_or_buf=output_path,

+ 1 - 1
car/car-li-cheng-day-missing/car_li_cheng_day_missing.py

@@ -69,7 +69,7 @@ with psycopg.connect(
 df = pd.DataFrame(a)
 
 # 打印 DataFrame 的基本信息(如列名、数据类型等)
-print(df.info())
+df.info()
 
 # 将缺失日期保存到 Excel 文件中
 df.to_excel(

+ 1 - 1
car/car-wei-zhang/car_wei_zhang.py

@@ -548,7 +548,7 @@ def data_process():
     df['处理年月'] = df['处理时间'].apply(lambda x: None if pd.isna(x) else pd.to_datetime(x).strftime('%Y%m'))
 
     # 打印DataFrame的信息
-    print(df.info())
+    df.info()
 
     # 将处理后的数据保存到CSV文件中
     df.to_csv(path_or_buf=output_path,

+ 1 - 1
car/car-yue-jie-missing/car_yue_jie_missing.py

@@ -63,7 +63,7 @@ with psycopg.connect(
 # 将列表a转换为pandas DataFrame
 df = pd.DataFrame(a)
 # 打印DataFrame的基本信息,便于调试
-print(df.info())
+df.info()
 # 将DataFrame保存为Excel文件,文件名为“睿行车辆越界报警日统计缺失数据日期.xlsx”
 df.to_excel(
     f"{start_date.strftime('%Y%m')}睿行车辆越界报警日统计缺失数据日期.xlsx",

+ 2 - 2
house/house-abnormal-data/house_abnormal_data.py

@@ -110,7 +110,7 @@ def data_process():
         ny = t.replace('.xlsx', '').split('_')[0]  # 提取年月信息
         ds = t.replace('.xlsx', '').split('_')[1]  # 提取地市信息
         tmp = pd.read_excel(output_dir + t, skiprows=8, header=None)  # 读取Excel文件内容
-        if '省本部' in ds or '省公司' in ds:
+        if '省本部' in ds or '省公司' in ds or '本部' in ds:
             tmp = pd.read_excel(output_dir + t, skiprows=8, header=None, nrows=1)  # 特殊处理省本部文件
         tmp['年月'] = ny  # 添加年月列
         tmp['地市'] = ds  # 添加地市列
@@ -263,7 +263,7 @@ def data_process():
     df['city_name'] = df.apply(get_city_name, axis=1)
 
     # 输出DataFrame的基本信息
-    print(df.info())
+    df.info()
 
     # 将处理后的数据保存为CSV文件
     df.to_csv(path_or_buf=output_path,

+ 4 - 3
house/house-building/house_building.py

@@ -331,14 +331,15 @@ def data_process():
     df.insert(0, '年月', year_month)  # 在数据框第一列插入年月列
 
     # 打印数据框信息
-    print(df.info())
+    df.info()
 
     # 将结果保存为CSV文件
     df.to_csv(
         path_or_buf=output_path,
         index=False,
         header=[
-            'year_month', 'first_unit', 'second_unit', 'third_unit', 'building_name', 'building_id',
+            'year_month', 'first_unit', 'second_unit', 'third_unit', 'building_name', 'inventory_status',
+            'inventory_situation', 'modify', 'building_to_be_verified', 'floor_room_to_be_verified', 'building_id',
             'housing_acquisition_rate', 'site_name', 'site_id', 'land_name', 'housing_source', 'acquisition_date',
             'house_year_began', 'investor', 'management_level', 'building_structure', 'total_floors', 'frontage',
             'courtyard', 'whole_building', 'property_ownership_certificate',
@@ -360,7 +361,7 @@ def data_import():
     # 目标表和文件信息
     table = "house.building_month"  # 数据库目标表名
     # 表字段列名,用于指定导入数据的列顺序
-    columns = "year_month,first_unit,second_unit,third_unit,building_name,building_id,housing_acquisition_rate,site_name,site_id,land_name,housing_source,acquisition_date,house_year_began,investor,management_level,building_structure,total_floors,frontage,courtyard,whole_building,property_ownership_certificate,no_property_ownership_certificate_reason,unrelated_assets,assets_num,assets_tag_num,usage_status,building_use,ownership_status,floor_area,building_area,building_area_self_use,building_area_rent,building_area_idle,building_area_unusable,usable_area,usable_area_self_use,usable_area_rent,usable_area_idle,usable_area_unusable,community_assistant_name,community_assistant_unit,lng_jt,lat_jt,address,property_owner,checked,area_no,area_name,city_no,city_name,city_id,city,district_id,district,year_no,month_no,house_age"
+    columns = "year_month,first_unit,second_unit,third_unit,building_name,inventory_status,inventory_situation,modify,building_to_be_verified,floor_room_to_be_verified,building_id,housing_acquisition_rate,site_name,site_id,land_name,housing_source,acquisition_date,house_year_began,investor,management_level,building_structure,total_floors,frontage,courtyard,whole_building,property_ownership_certificate,no_property_ownership_certificate_reason,unrelated_assets,assets_num,assets_tag_num,usage_status,building_use,ownership_status,floor_area,building_area,building_area_self_use,building_area_rent,building_area_idle,building_area_unusable,usable_area,usable_area_self_use,usable_area_rent,usable_area_idle,usable_area_unusable,community_assistant_name,community_assistant_unit,lng_jt,lat_jt,address,property_owner,checked,area_no,area_name,city_no,city_name,city_id,city,district_id,district,year_no,month_no,house_age"
     # 构造执行 PowerShell 脚本的命令
     command = f"powershell -File {script_path} -db_host {db_host} -db_port {db_port} -db_username {db_username} -db_password {db_password} -dbname {dbname} -table {table} -filename {output_path} -columns {columns}"
     # 打印生成的命令,方便调试和日志记录

+ 1 - 1
house/house-fang-jian/house_fang_jian.py

@@ -320,7 +320,7 @@ def data_process():
     df.insert(0, '年月', year_month)
 
     # 打印 DataFrame 的信息
-    print(df.info())
+    df.info()
 
     # 将处理后的数据保存为 CSV 文件
     df.to_csv(

+ 10 - 9
house/house-land/house_land.py

@@ -331,21 +331,22 @@ def data_process():
     df.insert(0, '年月', year_month)
 
     # 打印DataFrame的基本信息
-    print(df.info())
+    df.info()
 
     # 将处理后的数据保存为CSV文件
     df.to_csv(
         path_or_buf=output_path,
         index=False,
         header=[
-            'year_month', 'first_unit', 'second_unit', 'third_unit', 'land_name', 'land_id', 'land_ownership',
-            'use_right_type', 'land_use', 'acquisition_date', 'idle_start_date', 'site_name', 'site_id',
-            'address', 'investor', 'management_level', 'ownership_status', 'usage_status', 'total_land_area',
+            'year_month', 'first_unit', 'second_unit', 'third_unit', 'land_name', 'inventory_status',
+            'inventory_situation', 'modify', 'to_be_verified', 'land_no', 'land_id', 'land_ownership',
+            'use_right_type', 'land_use', 'acquisition_date', 'idle_start_date', 'site_name', 'site_id', 'address',
+            'investor', 'management_level', 'ownership_status', 'usage_status', 'total_land_area',
             'land_area_self_use', 'land_area_idle', 'land_area_rent', 'land_area_unusable', 'has_land_deed',
-            'no_land_deed_reason', 'land_preservation_risk', 'open_space', 'courtyard', 'unrelated_assets',
-            'assets_num', 'assets_tag_num', 'responsible_department', 'person_in_charge', 'lng_jt', 'lat_jt',
-            'property_owner', 'special_specification', 'area_no', 'area_name', 'city_no', 'city_name', 'city_id',
-            'city', 'district_id', 'district'
+            'no_land_deed_reason', 'land_preservation_risk', 'independent_parcel_of_land', 'open_space', 'courtyard',
+            'unrelated_assets', 'assets_num', 'assets_tag_num', 'responsible_department', 'person_in_charge', 'lng_jt',
+            'lat_jt','property_owner', 'special_specification', 'area_no', 'area_name', 'city_no', 'city_name',
+            'city_id', 'city', 'district_id', 'district'
         ],
         encoding='utf-8-sig'  # 确保中文字符不会乱码
     )
@@ -357,7 +358,7 @@ def data_import():
     # 目标表和文件信息
     table = "house.land_month"  # 数据库目标表名
     # 表字段列名,用于指定导入数据的列顺序
-    columns = "year_month,first_unit,second_unit,third_unit,land_name,land_id,land_ownership,use_right_type,land_use,acquisition_date,idle_start_date,site_name,site_id,address,investor,management_level,ownership_status,usage_status,total_land_area,land_area_self_use,land_area_idle,land_area_rent,land_area_unusable,has_land_deed,no_land_deed_reason,land_preservation_risk,open_space,courtyard,unrelated_assets,assets_num,assets_tag_num,responsible_department,person_in_charge,lng_jt,lat_jt,property_owner,special_specification,area_no,area_name,city_no,city_name,city_id,city,district_id,district"
+    columns = "year_month,first_unit,second_unit,third_unit,land_name,inventory_status,inventory_situation,modify,to_be_verified,land_no,land_id,land_ownership,use_right_type,land_use,acquisition_date,idle_start_date,site_name,site_id,address,investor,management_level,ownership_status,usage_status,total_land_area,land_area_self_use,land_area_idle,land_area_rent,land_area_unusable,has_land_deed,no_land_deed_reason,land_preservation_risk,independent_parcel_of_land,open_space,courtyard,unrelated_assets,assets_num,assets_tag_num,responsible_department,person_in_charge,lng_jt,lat_jt,property_owner,special_specification,area_no,area_name,city_no,city_name,city_id,city,district_id,district"
     # 构造执行 PowerShell 脚本的命令
     command = f"powershell -File {script_path} -db_host {db_host} -db_port {db_port} -db_username {db_username} -db_password {db_password} -dbname {dbname} -table {table} -filename {output_path} -columns {columns}"
     # 打印生成的命令,方便调试和日志记录

+ 1 - 1
house/house-site/house_site.py

@@ -340,7 +340,7 @@ def data_process():
     # 在 DataFrame 中插入 '年月' 列
     df.insert(0, '年月', year_month)
     # 打印 DataFrame 的基本信息
-    print(df.info())
+    df.info()
     # 将处理后的数据保存为 CSV 文件
     df.to_csv(path_or_buf=output_path,
               index=False,

+ 1 - 1
house/house-zu-ru-he-tong/house_zu_ru_he_tong.py

@@ -292,7 +292,7 @@ def data_process():
     df['地址纬度坐标'] = df['地址纬度坐标'].map(remove_extra_dots)
     df.insert(0, '年月', year_month)  # 在数据框的第一列插入年月字段
     # 打印数据框的基本信息
-    print(df.info())
+    df.info()
     # 将处理后的数据保存到CSV文件中
     df.to_csv(path_or_buf=output_path,
               index=False,

+ 1 - 1
test_token.py

@@ -61,7 +61,7 @@ s = {
     "TIME_STAMP": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),  # 当前时间戳
     "REQUEST_URL": "",  # 请求URL(此处为空字符串)
     "LOGIN_ID": "test",  # 登录ID
-    "EXPIRE_TIME": 3600,  # 过期时间(单位:秒)
+    "EXPIRE_TIME": 36000,  # 过期时间(单位:秒)
 }
 
 # 将字典转换为JSON格式字符串,并调用encrypt函数对其进行加密最后打印加密结果