diff --git a/api/app/lib/models/road.js b/api/app/lib/models/road.js index e97addfb..52374d64 100644 --- a/api/app/lib/models/road.js +++ b/api/app/lib/models/road.js @@ -114,6 +114,51 @@ module.exports = dc => { field: "section_type", autoIncrement: false }, + routeCodeBeforeRoadNetworkAdjustment: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "路网调整前路线编码", + primaryKey: false, + field: "route_code_before_road_network_adjustment", + autoIncrement: false + }, + serialNumberOfOriginalSection: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "原路段序号", + primaryKey: false, + field: "serial_number_of_original_section", + autoIncrement: false + }, + startingStakeNumberOfTheOriginalRoadSection: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "原路段起点桩号", + primaryKey: false, + field: "starting_stake_number_of_the_original_road_section", + autoIncrement: false + }, + endingPointStakeNoOfTheOriginalRoadSection: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "原路段止点桩号", + primaryKey: false, + field: "ending_point_stake_no_of_the_original_road_section", + autoIncrement: false + }, + routeLevel: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "路线等级", + primaryKey: false, + field: "route_level", + autoIncrement: false + }, natureOfRoadSection: { type: DataTypes.STRING, allowNull: true, @@ -132,6 +177,24 @@ module.exports = dc => { field: "completion_time", autoIncrement: false }, + reconstructionTime: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "改建时间", + primaryKey: false, + field: "reconstruction_time", + autoIncrement: false + }, + natureOfConstruction: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "建设性质", + primaryKey: false, + field: "nature_of_construction", + autoIncrement: false + }, gbmAndCivilizedModelRoad: { type: DataTypes.STRING, allowNull: true, @@ -159,6 +222,15 @@ module.exports = dc => { field: "nature_of_charges", autoIncrement: false }, + tollStation: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "所属收费站", + primaryKey: false, + field: "toll_station", + autoIncrement: false + }, numberOfCulverts: { type: DataTypes.STRING, allowNull: true, @@ -330,6 +402,159 @@ module.exports = dc => { field: "repeated_section_route_code", autoIncrement: false }, + plannedFundCategory: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划资金类别", + primaryKey: false, + field: "planned_fund_category", + autoIncrement: false + }, + plannedYear: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划年度", + primaryKey: false, + field: "planned_year", + autoIncrement: false + }, + planDocumentNo: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划文号", + primaryKey: false, + field: "plan_document_no", + autoIncrement: false + }, + planItemUniqueCode: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划项目唯一编码", + primaryKey: false, + field: "plan_item_unique_code", + autoIncrement: false + }, + plannedProjectRouteCode: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划项目路线编码", + primaryKey: false, + field: "planned_project_route_code", + autoIncrement: false + }, + planProjectName: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划项目名称", + primaryKey: false, + field: "plan_project_name", + autoIncrement: false + }, + plannedProjectType: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划项目类型", + primaryKey: false, + field: "planned_project_type", + autoIncrement: false + }, + completionStatus: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "完工情况", + primaryKey: false, + field: "completion_status", + autoIncrement: false + }, + yearOfCompletion: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "完工年度", + primaryKey: false, + field: "year_of_completion", + autoIncrement: false + }, + plannedFundCategoryOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划资金类别_1", + primaryKey: false, + field: "planned_fund_category__one", + autoIncrement: false + }, + plannedYearOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划年度_1", + primaryKey: false, + field: "planned_year__one", + autoIncrement: false + }, + planDocumentNoOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划文号_1", + primaryKey: false, + field: "plan_document_no__one", + autoIncrement: false + }, + planItemUniqueCodeOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划项目唯一编码_1", + primaryKey: false, + field: "plan_item_unique_code__one", + autoIncrement: false + }, + planProjectNameOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "计划项目名称_1", + primaryKey: false, + field: "plan_project_name__one", + autoIncrement: false + }, + completionStatusOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "完工情况_1", + primaryKey: false, + field: "completion_status__one", + autoIncrement: false + }, + yearOfCompletionOne: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "完工年度_1", + primaryKey: false, + field: "year_of_completion__one", + autoIncrement: false + }, + stationRange: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "桩号范围", + primaryKey: false, + field: "station_range", + autoIncrement: false + }, reportingUnit: { type: DataTypes.STRING, allowNull: true, @@ -357,6 +582,15 @@ module.exports = dc => { field: "change_time", autoIncrement: false }, + lastRepairAndMaintenanceYear: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: "最近一次修复养护年度", + primaryKey: false, + field: "last_repair_and_maintenance_year", + autoIncrement: false + }, whetherMaintenanceManagedHighway: { type: DataTypes.STRING, allowNull: true, @@ -451,7 +685,7 @@ module.exports = dc => { type: DataTypes.STRING, allowNull: true, defaultValue: null, - comment: "县 / 乡 / 村", + comment: null, primaryKey: false, field: "level", autoIncrement: false diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js b/scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js index 076bd877..0caf44a5 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js +++ b/scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js @@ -24,27 +24,27 @@ try { await client.query('BEGIN') const fileList = [ - // { - // path: ['./data/道路/村道第三方.xls'], - // n: '道路', - // tableName: 'road', - // defaultKey: ['level'], - // defaultValue: ['村'], - // }, - // { - // path: ['./data/道路/县道第三方.xls'], - // n: '道路', - // tableName: 'road', - // defaultKey: ['level'], - // defaultValue: ['县'], - // }, - // { - // path:[ './data/道路/乡道第三方.xls'], - // n: '道路', - // tableName: 'road', - // defaultKey: ['level'], - // defaultValue: ['乡'], - // }, + { + path: ['./data/道路/村道第三方.xls'], + n: '道路', + tableName: 'road', + defaultKey: ['level'], + defaultValue: ['村'], + }, + { + path: ['./data/道路/县道第三方.xls'], + n: '道路', + tableName: 'road', + defaultKey: ['level'], + defaultValue: ['县'], + }, + { + path: ['./data/道路/乡道第三方.xls'], + n: '道路', + tableName: 'road', + defaultKey: ['level'], + defaultValue: ['乡'], + }, // { // path: (() => { // let p = []; diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/index.js b/scripts/0.0.1/data/工具脚本(无需执行)/index.js index 609cf1fe..34c9696b 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/index.js +++ b/scripts/0.0.1/data/工具脚本(无需执行)/index.js @@ -61,6 +61,7 @@ try { try { await client.query('BEGIN') + // 有手动更改 不要轻易再次执行脚本 const fileList = [ // { // path: './data/道路/乡道第三方.xls', diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/道路_字段对应.json b/scripts/0.0.1/data/工具脚本(无需执行)/道路_字段对应.json index 0fb97a7f..d942927b 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/道路_字段对应.json +++ b/scripts/0.0.1/data/工具脚本(无需执行)/道路_字段对应.json @@ -10,11 +10,19 @@ "止点分界点类别": "categoryOfDeadCenterAndDividingPoint", "止点桩号": "stopStation", "路段类型": "sectionType", + "路网调整前路线编码": "routeCodeBeforeRoadNetworkAdjustment", + "原路段序号": "serialNumberOfOriginalSection", + "原路段起点桩号": "startingStakeNumberOfTheOriginalRoadSection", + "原路段止点桩号": "endingPointStakeNoOfTheOriginalRoadSection", + "路线等级": "routeLevel", "路段性质": "natureOfRoadSection", "建成时间": "completionTime", + "改建时间": "reconstructionTime", + "建设性质": "natureOfConstruction", "GBM及文明样板路": "gBMAndCivilizedModelRoad", "地貌": "landforms", "收费性质": "natureOfCharges", + "所属收费站": "tollStation", "涵洞数量": "numberOfCulverts", "技术等级": "technicalLevel", "路面类型": "pavementType", @@ -34,9 +42,27 @@ "重复道路路段类型": "typeOfRepeatedRoadSection", "重复路段序号": "serialNumberOfRepeatedSection", "重复路段路线编码": "repeatedSectionRouteCode", + "计划资金类别": "plannedFundCategory", + "计划年度": "plannedYear", + "计划文号": "planDocumentNo", + "计划项目唯一编码": "planItemUniqueCode", + "计划项目路线编码": "plannedProjectRouteCode", + "计划项目名称": "planProjectName", + "计划项目类型": "plannedProjectType", + "完工情况": "completionStatus", + "完工年度": "yearOfCompletion", + "计划资金类别_1": "plannedFundCategoryOne", + "计划年度_1": "plannedYearOne", + "计划文号_1": "planDocumentNoOne", + "计划项目唯一编码_1": "planItemUniqueCodeOne", + "计划项目名称_1": "planProjectNameOne", + "完工情况_1": "completionStatusOne", + "完工年度_1": "yearOfCompletionOne", + "桩号范围": "stationRange", "填报单位": "reportingUnit", "变更原因": "reasonForChange", "变更时间": "changeTime", + "最近一次修复养护年度": "lastRepairAndMaintenanceYear", "是否按干线公路管理接养": "whetherMaintenanceManagedHighway", "备注": "remarks", "上年路线编码": "routeCodeOfLastYear", diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json b/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json index 3ba86fec..dc3b8659 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json +++ b/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json @@ -10,11 +10,19 @@ "categoryOfDeadCenterAndDividingPoint": "止点分界点类别", "stopStation": "止点桩号", "sectionType": "路段类型", + "routeCodeBeforeRoadNetworkAdjustment": "路网调整前路线编码", + "serialNumberOfOriginalSection": "原路段序号", + "startingStakeNumberOfTheOriginalRoadSection": "原路段起点桩号", + "endingPointStakeNoOfTheOriginalRoadSection": "原路段止点桩号", + "routeLevel": "路线等级", "natureOfRoadSection": "路段性质", "completionTime": "建成时间", + "reconstructionTime": "改建时间", + "natureOfConstruction": "建设性质", "gBMAndCivilizedModelRoad": "GBM及文明样板路", "landforms": "地貌", "natureOfCharges": "收费性质", + "tollStation": "所属收费站", "numberOfCulverts": "涵洞数量", "technicalLevel": "技术等级", "pavementType": "路面类型", @@ -34,9 +42,27 @@ "typeOfRepeatedRoadSection": "重复道路路段类型", "serialNumberOfRepeatedSection": "重复路段序号", "repeatedSectionRouteCode": "重复路段路线编码", + "plannedFundCategory": "计划资金类别", + "plannedYear": "计划年度", + "planDocumentNo": "计划文号", + "planItemUniqueCode": "计划项目唯一编码", + "plannedProjectRouteCode": "计划项目路线编码", + "planProjectName": "计划项目名称", + "plannedProjectType": "计划项目类型", + "completionStatus": "完工情况", + "yearOfCompletion": "完工年度", + "plannedFundCategoryOne": "计划资金类别_1", + "plannedYearOne": "计划年度_1", + "planDocumentNoOne": "计划文号_1", + "planItemUniqueCodeOne": "计划项目唯一编码_1", + "planProjectNameOne": "计划项目名称_1", + "completionStatusOne": "完工情况_1", + "yearOfCompletionOne": "完工年度_1", + "stationRange": "桩号范围", "reportingUnit": "填报单位", "reasonForChange": "变更原因", "changeTime": "变更时间", + "lastRepairAndMaintenanceYear": "最近一次修复养护年度", "whetherMaintenanceManagedHighway": "是否按干线公路管理接养", "remarks": "备注", "routeCodeOfLastYear": "上年路线编码", diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据库表对应.json b/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据库表对应.json index 8ee22df0..f30e22a9 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据库表对应.json +++ b/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据库表对应.json @@ -10,11 +10,19 @@ "止点分界点类别": "category_of_dead_center_and_dividing_point", "止点桩号": "stop_station", "路段类型": "section_type", + "路网调整前路线编码": "route_code_before_road_network_adjustment", + "原路段序号": "serial_number_of_original_section", + "原路段起点桩号": "starting_stake_number_of_the_original_road_section", + "原路段止点桩号": "ending_point_stake_no_of_the_original_road_section", + "路线等级": "route_level", "路段性质": "nature_of_road_section", "建成时间": "completion_time", + "改建时间": "reconstruction_time", + "建设性质": "nature_of_construction", "GBM及文明样板路": "gBM_and_civilized_model_road", "地貌": "landforms", "收费性质": "nature_of_charges", + "所属收费站": "toll_station", "涵洞数量": "number_of_culverts", "技术等级": "technical_level", "路面类型": "pavement_type", @@ -34,9 +42,27 @@ "重复道路路段类型": "type_of_repeated_road_section", "重复路段序号": "serial_number_of_repeated_section", "重复路段路线编码": "repeated_section_route_code", + "计划资金类别": "planned_fund_category", + "计划年度": "planned_year", + "计划文号": "plan_document_No", + "计划项目唯一编码": "plan_item_unique_code", + "计划项目路线编码": "planned_project_route_code", + "计划项目名称": "plan_project_name", + "计划项目类型": "planned_project_type", + "完工情况": "completion_status", + "完工年度": "year_of_completion", + "计划资金类别_1": "planned_fund_category__one", + "计划年度_1": "planned_year__one", + "计划文号_1": "plan_document_No__one", + "计划项目唯一编码_1": "plan_item_unique_code__one", + "计划项目名称_1": "plan_project_name__one", + "完工情况_1": "completion_status__one", + "完工年度_1": "year_of_completion__one", + "桩号范围": "station_range", "填报单位": "reporting_unit", "变更原因": "reason_for_change", "变更时间": "change_time", + "最近一次修复养护年度": "last_repair_and_maintenance_year", "是否按干线公路管理接养": "whether_maintenance_managed_highway", "备注": "remarks", "上年路线编码": "route_code_of_last_year", diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql b/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql index c903d9f1..e9418153 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql +++ b/scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql @@ -14,12 +14,20 @@ ON column road.Category_Of_Starting_Point_And_Dividing_Point is '起点分界点 ON column road.Stop_Place_Name is '止点地名'; alter TABLE road add Category_Of_Dead_Center_And_Dividing_Point varchar(1024); comment ON column road.Category_Of_Dead_Center_And_Dividing_Point is '止点分界点类别'; alter TABLE road add Stop_Station varchar(1024); comment ON column road.Stop_Station is '止点桩号'; alter TABLE road add Section_Type varchar(1024); comment -ON column road.Section_Type is '路段类型'; alter TABLE road add Nature_Of_Road_Section varchar(1024); comment +ON column road.Section_Type is '路段类型'; alter TABLE road add Route_Code_Before_Road_Network_Adjustment varchar(1024); comment +ON column road.Route_Code_Before_Road_Network_Adjustment is '路网调整前路线编码'; alter TABLE road add Serial_Number_Of_Original_Section varchar(1024); comment +ON column road.Serial_Number_Of_Original_Section is '原路段序号'; alter TABLE road add Starting_Stake_Number_Of_The_Original_Road_Section varchar(1024); comment +ON column road.Starting_Stake_Number_Of_The_Original_Road_Section is '原路段起点桩号'; alter TABLE road add Ending_Point_Stake_No_Of_The_Original_Road_Section varchar(1024); comment +ON column road.Ending_Point_Stake_No_Of_The_Original_Road_Section is '原路段止点桩号'; alter TABLE road add Route_Level varchar(1024); comment +ON column road.Route_Level is '路线等级'; alter TABLE road add Nature_Of_Road_Section varchar(1024); comment ON column road.Nature_Of_Road_Section is '路段性质'; alter TABLE road add Completion_Time varchar(1024); comment -ON column road.Completion_Time is '建成时间'; alter TABLE road add GBM_And_Civilized_Model_Road varchar(1024); comment +ON column road.Completion_Time is '建成时间'; alter TABLE road add Reconstruction_Time varchar(1024); comment +ON column road.Reconstruction_Time is '改建时间'; alter TABLE road add Nature_Of_Construction varchar(1024); comment +ON column road.Nature_Of_Construction is '建设性质'; alter TABLE road add GBM_And_Civilized_Model_Road varchar(1024); comment ON column road.GBM_And_Civilized_Model_Road is 'GBM及文明样板路'; alter TABLE road add Landforms varchar(1024); comment ON column road.Landforms is '地貌'; alter TABLE road add Nature_Of_Charges varchar(1024); comment -ON column road.Nature_Of_Charges is '收费性质'; alter TABLE road add Number_Of_Culverts varchar(1024); comment +ON column road.Nature_Of_Charges is '收费性质'; alter TABLE road add Toll_Station varchar(1024); comment +ON column road.Toll_Station is '所属收费站'; alter TABLE road add Number_Of_Culverts varchar(1024); comment ON column road.Number_Of_Culverts is '涵洞数量'; alter TABLE road add Technical_Level varchar(1024); comment ON column road.Technical_Level is '技术等级'; alter TABLE road add Pavement_Type varchar(1024); comment ON column road.Pavement_Type is '路面类型'; alter TABLE road add Pavement_Width varchar(1024); comment @@ -38,10 +46,28 @@ ON column road.Greening_Mileage is '可绿化里程'; alter TABLE road add Green ON column road.Greening_Mileaged is '已绿化里程'; alter TABLE road add Type_Of_Repeated_Road_Section varchar(1024); comment ON column road.Type_Of_Repeated_Road_Section is '重复道路路段类型'; alter TABLE road add Serial_Number_Of_Repeated_Section varchar(1024); comment ON column road.Serial_Number_Of_Repeated_Section is '重复路段序号'; alter TABLE road add Repeated_Section_Route_Code varchar(1024); comment -ON column road.Repeated_Section_Route_Code is '重复路段路线编码'; alter TABLE road add Reporting_Unit varchar(1024); comment +ON column road.Repeated_Section_Route_Code is '重复路段路线编码'; alter TABLE road add Planned_Fund_Category varchar(1024); comment +ON column road.Planned_Fund_Category is '计划资金类别'; alter TABLE road add Planned_Year varchar(1024); comment +ON column road.Planned_Year is '计划年度'; alter TABLE road add Plan_Document_No varchar(1024); comment +ON column road.Plan_Document_No is '计划文号'; alter TABLE road add Plan_Item_Unique_Code varchar(1024); comment +ON column road.Plan_Item_Unique_Code is '计划项目唯一编码'; alter TABLE road add Planned_Project_Route_Code varchar(1024); comment +ON column road.Planned_Project_Route_Code is '计划项目路线编码'; alter TABLE road add Plan_Project_Name varchar(1024); comment +ON column road.Plan_Project_Name is '计划项目名称'; alter TABLE road add Planned_Project_Type varchar(1024); comment +ON column road.Planned_Project_Type is '计划项目类型'; alter TABLE road add Completion_Status varchar(1024); comment +ON column road.Completion_Status is '完工情况'; alter TABLE road add Year_Of_Completion varchar(1024); comment +ON column road.Year_Of_Completion is '完工年度'; alter TABLE road add Planned_Fund_Category__One varchar(1024); comment +ON column road.Planned_Fund_Category__One is '计划资金类别_1'; alter TABLE road add Planned_Year__One varchar(1024); comment +ON column road.Planned_Year__One is '计划年度_1'; alter TABLE road add Plan_Document_No__One varchar(1024); comment +ON column road.Plan_Document_No__One is '计划文号_1'; alter TABLE road add Plan_Item_Unique_Code__One varchar(1024); comment +ON column road.Plan_Item_Unique_Code__One is '计划项目唯一编码_1'; alter TABLE road add Plan_Project_Name__One varchar(1024); comment +ON column road.Plan_Project_Name__One is '计划项目名称_1'; alter TABLE road add Completion_Status__One varchar(1024); comment +ON column road.Completion_Status__One is '完工情况_1'; alter TABLE road add Year_Of_Completion__One varchar(1024); comment +ON column road.Year_Of_Completion__One is '完工年度_1'; alter TABLE road add Station_Range varchar(1024); comment +ON column road.Station_Range is '桩号范围'; alter TABLE road add Reporting_Unit varchar(1024); comment ON column road.Reporting_Unit is '填报单位'; alter TABLE road add Reason_For_Change varchar(1024); comment ON column road.Reason_For_Change is '变更原因'; alter TABLE road add Change_Time varchar(1024); comment -ON column road.Change_Time is '变更时间'; alter TABLE road add Whether_Maintenance_Managed_Highway varchar(1024); comment +ON column road.Change_Time is '变更时间'; alter TABLE road add Last_Repair_And_Maintenance_Year varchar(1024); comment +ON column road.Last_Repair_And_Maintenance_Year is '最近一次修复养护年度'; alter TABLE road add Whether_Maintenance_Managed_Highway varchar(1024); comment ON column road.Whether_Maintenance_Managed_Highway is '是否按干线公路管理接养'; alter TABLE road add Remarks varchar(1024); comment ON column road.Remarks is '备注'; alter TABLE road add Route_Code_Of_Last_Year varchar(1024); comment ON column road.Route_Code_Of_Last_Year is '上年路线编码'; alter TABLE road add Route_Name_Of_Last_Year varchar(1024); comment