|
@ -138,13 +138,15 @@ try { |
|
|
Object.keys(r).forEach(key => { |
|
|
Object.keys(r).forEach(key => { |
|
|
arr.push(key) |
|
|
arr.push(key) |
|
|
}) |
|
|
}) |
|
|
console.log(arr) |
|
|
if (r.route_name == '协成-塘南(乡道改)') { |
|
|
let isExit = allRoads.find(s => s.route_code == r.route_code && s.section_no == r.section_no && s.route_name == r.route_name) |
|
|
console.log(1) |
|
|
|
|
|
} |
|
|
|
|
|
let isExit = allRoads.find(s => s.route_code == r.route_code && (s.section_no == r.section_no || !s.section_no) && s.route_name == r.route_name) |
|
|
if (isExit) { |
|
|
if (isExit) { |
|
|
villageSql += `UPDATE road SET village_id = ${villageId}, "del" = ${del}, spot = ${spot}, "township_code" = ${township_code ? township_code : `null`} WHERE id = ${r.id};\n` |
|
|
villageSql += `UPDATE road SET village_id = ${villageId}, "del" = ${del}, spot = ${spot}, "township_code" = ${township_code ? township_code : `null`} WHERE id = ${isExit.id};\n` |
|
|
} else { |
|
|
} else { |
|
|
const { |
|
|
const { |
|
|
route_name = `null`, route_code = `null`, section_no = `null`, township_code = `null`, starting_place_name = `null`, |
|
|
route_name = `null`, route_code = `null`, section_no = `null`, starting_place_name = `null`, |
|
|
start_station = `null`, category_of_starting_point_and_dividing_point = `null`, stop_place_name = `null`, |
|
|
start_station = `null`, category_of_starting_point_and_dividing_point = `null`, stop_place_name = `null`, |
|
|
category_of_dead_center_and_dividing_point = `null`, stop_station = `null`, section_type = `null`, |
|
|
category_of_dead_center_and_dividing_point = `null`, stop_station = `null`, section_type = `null`, |
|
|
route_code_before_road_network_adjustment = `null`, serial_number_of_original_section = `null`, |
|
|
route_code_before_road_network_adjustment = `null`, serial_number_of_original_section = `null`, |
|
@ -195,7 +197,7 @@ try { |
|
|
${del}, |
|
|
${del}, |
|
|
${spot}, |
|
|
${spot}, |
|
|
${route_name ? `'${r.route_name}'` : `null`}, ${route_code ? `'${r.route_code}'` : `null`}, |
|
|
${route_name ? `'${r.route_name}'` : `null`}, ${route_code ? `'${r.route_code}'` : `null`}, |
|
|
${section_no ? `'${r.section_no}'` : `null`}, ${township_code ? `'${r.township_code}'` : `null`}, |
|
|
${section_no ? `'${r.section_no}'` : `null`}, ${township_code ? `'${township_code}'` : `null`}, |
|
|
${starting_place_name ? `'${r.starting_place_name}'` : `null`}, |
|
|
${starting_place_name ? `'${r.starting_place_name}'` : `null`}, |
|
|
${start_station ? `'${r.start_station}'` : `null`}, ${category_of_starting_point_and_dividing_point ? `'${r.category_of_starting_point_and_dividing_point}'` : `null`}, |
|
|
${start_station ? `'${r.start_station}'` : `null`}, ${category_of_starting_point_and_dividing_point ? `'${r.category_of_starting_point_and_dividing_point}'` : `null`}, |
|
|
${stop_place_name ? `'${r.stop_place_name}'` : `null`}, |
|
|
${stop_place_name ? `'${r.stop_place_name}'` : `null`}, |
|
@ -244,6 +246,7 @@ try { |
|
|
${location_city ? `'${r.location_city}'` : `null`}, ${level ? `'${r.level}'` : `null`}, |
|
|
${location_city ? `'${r.location_city}'` : `null`}, ${level ? `'${r.level}'` : `null`}, |
|
|
${surface_thickness ? `'${r.surface_thickness}'` : `null`} |
|
|
${surface_thickness ? `'${r.surface_thickness}'` : `null`} |
|
|
);\n` |
|
|
);\n` |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|