diff --git a/scripts/1.4.1/data/1_insert_road_data/index.js b/scripts/1.4.1/data/1_insert_road_data/index.js index 94a8d7fe..71fd29ba 100644 --- a/scripts/1.4.1/data/1_insert_road_data/index.js +++ b/scripts/1.4.1/data/1_insert_road_data/index.js @@ -8,12 +8,12 @@ try { // const pool = new Pool({ // user: 'postgres', // host: '10.8.30.32', - // database: 'highways4good', + // database: 'highwaytest', // password: '123', // port: 5432, // }) - // 测试环境 + // // 测试环境 const pool = new Pool({ user: 'highwayadmin', host: '10.8.40.223', @@ -138,14 +138,12 @@ try { Object.keys(r).forEach(key => { arr.push(key) }) - if (r.route_name == '中心路—山上村四组路') { + if (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 (del != r.del && spot != r.spot && township_code != isExit.township_code) { - villageSql += `UPDATE road SET village_id = ${villageId}, "del" = ${del}, spot = ${spot}, "township_code" = ${township_code ? township_code : `null`} WHERE id = ${isExit.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 { const { route_name = `null`, route_code = `null`, section_no = `null`, starting_place_name = `null`,