Browse Source

数据接口

release_0.0.1
巴林闲侠 2 years ago
parent
commit
34906462b0
  1. 1
      Highways4Good
  2. 27
      api/app/lib/controllers/data/vehicle.js
  3. 153
      api/app/lib/controllers/overview/building.js
  4. 2
      api/app/lib/controllers/overview/index.js
  5. 68
      api/app/lib/controllers/overview/management.js
  6. 49
      api/app/lib/controllers/overview/operation.js
  7. 9
      api/app/lib/models/road.js
  8. 17
      api/app/lib/models/statistic.js
  9. 34
      api/app/lib/routes/data/index.js
  10. 26
      api/app/lib/routes/overview/index.js
  11. 107
      api/log/development.log
  12. 0
      scripts/0.0.1/data/1_update_statistic_data.sql
  13. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/公交/车辆信息/四公司车辆信息(1).xls
  14. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/治超/非现场处罚总台账更新至2022.7.5(最新).xlsx
  15. 2
      scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js
  16. 2
      scripts/0.0.1/data/工具脚本(无需执行)/index.js
  17. 3
      scripts/0.0.1/data/工具脚本(无需执行)/道路_字段对应.json
  18. 3
      scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json
  19. 3
      scripts/0.0.1/data/工具脚本(无需执行)/道路_数据库表对应.json
  20. 2
      scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql

1
Highways4Good

@ -1 +0,0 @@
Subproject commit cbdfefa311b3a886f44cbc68f55bb6741655312b

27
api/app/lib/controllers/data/vehicle.js

@ -3,8 +3,13 @@
async function get (ctx) {
try {
const models = ctx.fs.dc.models;
const { type } = ctx.request.body;
const vehicleRes = await models.Vehicle.findAll()
const vehicleRes = await models.Statistic.findAll({
where: {
type
}
})
ctx.status = 200;
ctx.body = vehicleRes
@ -20,18 +25,18 @@ async function get (ctx) {
async function edit (ctx) {
try {
const models = ctx.fs.dc.models;
const { vehicleId, name, count } = ctx.request.body;
const { id, name, count, type } = ctx.request.body;
if (!vehicleId) {
const vehicleRes = await models.Vehicle.create({
name, count
if (!id) {
await models.Statistic.create({
name, count, type: type
})
} else {
const vehicleRes = await models.Vehicle.update({
name, count
await models.Statistic.update({
name, count, type: type
}, {
where: {
id: vehicleId
id: id
}
})
}
@ -49,11 +54,11 @@ async function edit (ctx) {
async function del (ctx) {
try {
const models = ctx.fs.dc.models;
const { vehicleId } = ctx.params;
const { id } = ctx.params;
const vehicleRes = await models.Vehicle.destroy({
await models.Statistic.destroy({
where: {
id: vehicleId
id: id
}
})

153
api/app/lib/controllers/overview/building.js

@ -0,0 +1,153 @@
'use strict';
const areaCode = {
"360121100000": "莲塘镇",
"360121101000": "向塘镇",
"360121102000": "三江镇",
"360121103000": "塘南镇",
"360121104000": "幽兰镇",
"360121105000": "蒋巷镇",
"360121106000": "武阳镇",
"360121107000": "冈上镇",
"360121108000": "广福镇",
"360121191000": "昌东镇",
"360121192000": "麻丘镇",
"360121200000": "泾口乡",
"360121201000": "南新乡",
"360121202000": "塔城乡",
"360121203000": "黄马乡",
"360121204000": "富山乡",
"360121205000": "东新乡",
"360121206000": "八一乡",
"360121403000": "小蓝经济开发区",
"360121471000": "银三角管理委员会",
"360121501000": "五星垦殖场",
"360121572000": "良种繁殖场",
}
async function roadState (ctx) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api;
const roadRes = await models.Road.findAll({})
const projectRoadRes = await models.Project.findAll({
type: 'road',
})
const roadState = {
// 在建数量
buildingRoad: 0,
// 已建数量
buildedRoad: 0,
// 乡镇统计
townRoad: {
},
// 类型统计
roadType: {
'县': 0,
'乡': 0,
'村': 0,
},
// 在建项目统计
townProject: {
},
// 等级统计
roadLevel: {
},
// 养护周期
curingPeriod: {
frequent: 0,
season: 0,
},
// 绿化里程
greenMileage: {
'县': {
canBeGreen: 0,
isGreen: 0,
},
'乡': {
canBeGreen: 0,
isGreen: 0,
},
'村': {
canBeGreen: 0,
isGreen: 0,
},
}
}
let roadCode = new Set()
for (let r of roadRes) {
roadCode.add(r.routeCode)
let townName = areaCode[r.townshipCode] || '其他'
if (roadState.townRoad[townName]) {
roadState.townRoad[townName].roadCode.add(r.routeCode)
roadState.townRoad[townName].mileage += Number(r.chainageMileage) || 0
} else {
roadState.townRoad[townName] = {
roadCode: new Set([r.routeCode]),
mileage: Number(r.chainageMileage) || 0,
}
}
roadState.roadType[r.level] = (roadState.roadType[r.level] || 0) + (Number(r.chainageMileage) || 0)
if (roadState.roadLevel[r.technicalLevel]) {
roadState.roadLevel[r.technicalLevel] += 1
} else {
roadState.roadLevel[r.technicalLevel] = 1
}
if (r.curingTime) {
if (r.curingTime.indexOf('经常') > -1) {
roadState.curingPeriod.frequent += 1
} else if (r.curingTime.indexOf('季节') > -1) {
roadState.curingPeriod.season += 1
}
}
roadState.greenMileage[r.level].canBeGreen += (Number(r.greeningMileage) || 0)
roadState.greenMileage[r.level].isGreen += (Number(r.greeningMileaged) || 0)
}
for (let p of projectRoadRes) {
if (p.type == 'road') {
if (p.done) {
roadState.buildedRoad += 1
} else {
roadState.buildingRoad += 1
}
}
let townName = p.buildUnit.replace('人民政府', '').replace('南昌县', '').replace('管委会', '')
if (roadState.townProject[townName]) {
roadState.townProject[townName] += 1
} else {
roadState.townProject[townName] = 1
}
}
roadState.buildedRoad += roadCode.size
for (let t of Object.keys(roadState.townRoad)) {
roadState.townRoad[t].roadCount = roadState.townRoad[t].roadCode.size
delete roadState.townRoad[t].roadCode
}
ctx.status = 200
ctx.body = roadState
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = {
roadState,
};

2
api/app/lib/controllers/overview/index.js

@ -0,0 +1,2 @@
'use strict';

68
api/app/lib/controllers/overview/management.js

@ -0,0 +1,68 @@
'use strict';
async function overSpeedList (ctx) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api;
const overSpeedRes = await models.Overspeed.findAll({
attributes: ['id', 'licensePlate', 'overrunRate', 'deductPoints', 'fine', 'processingTime'],
order: [['testTime', 'DESC']],
})
ctx.status = 200
ctx.body = {
processed: overSpeedRes.filter(s => s.processingTime).length,
overSpeedList: overSpeedRes,
}
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function overSpeedProcessed (ctx) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api;
const overSpeedCountRes = await models.Overspeed.count({
attributes: ['nameOfInspectionPoint'],
group: ['nameOfInspectionPoint'],
})
const overSpeedCountProcessedRes = await models.Overspeed.count({
attributes: ['nameOfInspectionPoint'],
where: { processingTime: { $ne: null } },
group: ['nameOfInspectionPoint'],
})
let data = []
for (let c of overSpeedCountRes) {
const corProcessed = overSpeedCountProcessedRes.find(d => d.nameOfInspectionPoint == c.nameOfInspectionPoint)
if (corProcessed) {
data.push({
name: c.nameOfInspectionPoint,
processed: corProcessed.count,
total: c.count,
})
}
}
ctx.status = 200
ctx.body = data
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = {
overSpeedList,
overSpeedProcessed
};

49
api/app/lib/controllers/overview/operation.js

@ -0,0 +1,49 @@
'use strict';
async function busCarLevelList (ctx) {
try {
const models = ctx.fs.dc.models;
const { userId } = ctx.fs.api;
let data = []
const busCarRes = await models.BusCar.findAll({
attributes: ['id', 'company', 'fleet', 'vehicleLicensePlateNumber'],
})
for (let c of busCarRes) {
const { company, fleet } = c
const corCompany = data.find(d => d.name === company)
if (!corCompany) {
data.push({
name: company,
child: [{
name: fleet,
child: [{ ...c.dataValues }]
}]
})
} else {
const corFleet = corCompany.child.find(d => d.name === fleet)
if (!corFleet) {
corCompany.child.push({
name: fleet,
child: [{ ...c.dataValues }]
})
} else {
corFleet.child.push({ ...c.dataValues })
}
}
}
ctx.status = 200
ctx.body = data
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = {
busCarLevelList
};

9
api/app/lib/models/road.js

@ -689,6 +689,15 @@ module.exports = dc => {
primaryKey: false,
field: "level",
autoIncrement: false
},
surfaceThickness: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "面层厚度",
primaryKey: false,
field: "surface_thickness",
autoIncrement: false
}
}, {
tableName: "road",

17
api/app/lib/models/vehicle.js → api/app/lib/models/statistic.js

@ -4,7 +4,7 @@
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const Vehicle = sequelize.define("vehicle", {
const Statistic = sequelize.define("statistic", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
@ -32,12 +32,21 @@ module.exports = dc => {
primaryKey: false,
field: "count",
autoIncrement: false
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "type",
autoIncrement: false
}
}, {
tableName: "vehicle",
tableName: "statistic",
comment: "",
indexes: []
});
dc.models.Vehicle = Vehicle;
return Vehicle;
dc.models.Statistic = Statistic;
return Statistic;
};

34
api/app/lib/routes/data/index.js

@ -11,14 +11,38 @@ module.exports = function (app, router, opts) {
// 运政
//客运车
async function setVehicleType (ctx, next) {
ctx.request.body = {
...(ctx.request.body || {}),
type: 'vehicle'
}
await next()
}
app.fs.api.logAttr['GET/vehicle'] = { content: '获取运政列表', visible: true };
router.get('/vehicle', vehicle.get);
router.get('/vehicle', setVehicleType, vehicle.get);
app.fs.api.logAttr['PUT/vehicle'] = { content: '编辑运政数据', visible: true };
router.put('/vehicle', vehicle.edit);
app.fs.api.logAttr['DEL/vehicle/:vehicleId'] = { content: '删除运政数据', visible: false };
router.del('/vehicle/:vehicleId', vehicle.del);
router.put('/vehicle', setVehicleType, vehicle.edit);
app.fs.api.logAttr['DEL/vehicle/:id'] = { content: '删除运政数据', visible: false };
router.del('/vehicle/:id', setVehicleType, vehicle.del);
// 路政
async function setRoadManageType (ctx, next) {
ctx.request.body = {
...(ctx.request.body || {}),
type: 'road_manage'
}
await next()
}
app.fs.api.logAttr['GET/road_manage'] = { content: '获取路政列表', visible: true };
router.get('/road_manage', setRoadManageType, vehicle.get);
app.fs.api.logAttr['PUT/road_manage'] = { content: '编辑路政数据', visible: true };
router.put('/road_manage', setRoadManageType, vehicle.edit);
app.fs.api.logAttr['DEL/road_manage/:id'] = { content: '删除路政数据', visible: false };
router.del('/road_manage/:id', setRoadManageType, vehicle.del);
// 出租/危货
app.fs.api.logAttr['GET/vehicle/specific'] = { content: '获取具体车辆列表', visible: true };

26
api/app/lib/routes/overview/index.js

@ -0,0 +1,26 @@
'use strict';
const operation = require('../../controllers/overview/operation');
const management = require('../../controllers/overview/management');
const build = require('../../controllers/overview/building');
module.exports = function (app, router, opts) {
// 运营
app.fs.api.logAttr['GET/operation/car_level'] = { content: '获取公交车辆层级信息', visible: false };
router.get('/operation/car_level', operation.busCarLevelList);
// 管理
app.fs.api.logAttr['GET/manage/overspeed'] = { content: '获取治超详情列', visible: false };
router.get('/manage/overspeed', management.overSpeedList);
app.fs.api.logAttr['GET/manage/overspeed/processed'] = { content: '获取治超监测点处理数据', visible: false };
router.get('/manage/overspeed/processed', management.overSpeedProcessed);
// 建设
app.fs.api.logAttr['GET/build/road_state'] = { content: '获取道路统计', visible: false };
router.get('/build/road_state', build.roadState);
// 领导驾驶
// 养护
}

107
api/log/development.log

@ -7161,3 +7161,110 @@
2022-07-23 11:26:40.514 - debug: [FS-LOGGER] Init.
2022-07-23 11:26:40.651 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 11:26:40.651 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:20:35.342 - debug: [FS-LOGGER] Init.
2022-07-23 14:20:35.455 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:20:35.455 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:20:42.513 - error: path: /bus/car/level, error: SequelizeDatabaseError: 字段 "name" 不存在
2022-07-23 14:20:49.231 - error: path: /bus/car/level, error: SequelizeDatabaseError: 字段 "name" 不存在
2022-07-23 14:21:03.178 - debug: [FS-LOGGER] Init.
2022-07-23 14:21:03.288 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:21:03.289 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:21:37.334 - debug: [FS-LOGGER] Init.
2022-07-23 14:21:37.446 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:21:37.447 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:36:46.046 - debug: [FS-LOGGER] Init.
2022-07-23 14:36:46.169 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:36:46.170 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:37:08.363 - error: path: /manage/overSpeed, error: TypeError: Cannot read property 'findAll' of undefined
2022-07-23 14:37:14.419 - error: path: /manage/overSpeed, error: TypeError: Cannot read property 'findAll' of undefined
2022-07-23 14:37:33.317 - debug: [FS-LOGGER] Init.
2022-07-23 14:37:33.436 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:37:33.436 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:38:22.690 - debug: [FS-LOGGER] Init.
2022-07-23 14:38:22.809 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:38:22.809 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:55:36.552 - debug: [FS-LOGGER] Init.
2022-07-23 14:55:36.694 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:55:36.694 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:56:29.460 - debug: [FS-LOGGER] Init.
2022-07-23 14:56:29.596 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:56:29.596 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:57:27.313 - debug: [FS-LOGGER] Init.
2022-07-23 14:57:27.441 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:57:27.442 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:58:18.331 - debug: [FS-LOGGER] Init.
2022-07-23 14:58:18.458 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:58:18.458 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 14:59:38.735 - debug: [FS-LOGGER] Init.
2022-07-23 14:59:38.861 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 14:59:38.862 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:00:10.681 - debug: [FS-LOGGER] Init.
2022-07-23 15:00:10.804 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:00:10.804 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:01:53.734 - debug: [FS-LOGGER] Init.
2022-07-23 15:01:53.857 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:01:53.857 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:01:58.068 - error: path: /manage/overspeed/processed, error: ReferenceError: Op is not defined
2022-07-23 15:02:02.859 - error: path: /manage/overspeed/processed, error: ReferenceError: Op is not defined
2022-07-23 15:02:16.875 - debug: [FS-LOGGER] Init.
2022-07-23 15:02:17.003 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:02:17.003 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:05:17.496 - debug: [FS-LOGGER] Init.
2022-07-23 15:05:17.633 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:05:17.634 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:06:45.506 - error: path: /manage/overspeed/processed, error: TypeError: Cannot read property 'count' of undefined
2022-07-23 15:07:07.567 - debug: [FS-LOGGER] Init.
2022-07-23 15:07:07.696 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:07:07.696 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:07:29.327 - debug: [FS-LOGGER] Init.
2022-07-23 15:07:29.460 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:07:29.460 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 15:33:08.052 - debug: [FS-LOGGER] Init.
2022-07-23 15:33:08.179 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 15:33:08.179 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:09:22.681 - debug: [FS-LOGGER] Init.
2022-07-23 16:09:22.808 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:09:22.808 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:10:03.079 - debug: [FS-LOGGER] Init.
2022-07-23 16:10:03.208 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:10:03.208 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:11:16.662 - debug: [FS-LOGGER] Init.
2022-07-23 16:11:16.790 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:11:16.790 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:13:52.199 - debug: [FS-LOGGER] Init.
2022-07-23 16:13:52.328 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:13:52.329 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:13:54.882 - error: path: /build/road_state, error: TypeError: Cannot read property 'size' of undefined
2022-07-23 16:13:57.027 - error: path: /build/road_state, error: TypeError: Cannot read property 'size' of undefined
2022-07-23 16:14:01.518 - error: path: /build/road_state, error: TypeError: Cannot read property 'size' of undefined
2022-07-23 16:14:48.055 - debug: [FS-LOGGER] Init.
2022-07-23 16:14:48.194 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:14:48.194 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:29:40.725 - debug: [FS-LOGGER] Init.
2022-07-23 16:29:40.862 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:29:40.863 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:39:51.192 - debug: [FS-LOGGER] Init.
2022-07-23 16:39:51.331 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:39:51.331 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 16:41:55.842 - debug: [FS-LOGGER] Init.
2022-07-23 16:41:55.980 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 16:41:55.980 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 17:14:55.573 - debug: [FS-LOGGER] Init.
2022-07-23 17:14:55.765 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 17:14:55.765 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 17:15:03.041 - error: path: /build/road_state, error: TypeError: Cannot read property 'indexOf' of null
2022-07-23 17:15:41.896 - debug: [FS-LOGGER] Init.
2022-07-23 17:15:42.032 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 17:15:42.032 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 17:28:33.162 - debug: [FS-LOGGER] Init.
2022-07-23 17:28:33.297 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 17:28:33.297 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 17:28:47.388 - debug: [FS-LOGGER] Init.
2022-07-23 17:28:47.535 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 17:28:47.536 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 17:43:26.624 - debug: [FS-LOGGER] Init.
2022-07-23 17:43:26.764 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 17:43:26.765 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-23 17:44:52.238 - debug: [FS-LOGGER] Init.
2022-07-23 17:44:52.386 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-23 17:44:52.387 - info: [FS-AUTH] Inject auth and api mv into router.

0
scripts/0.0.1/data/1_update_statistic_data.sql

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/公交/车辆信息/四公司车辆信息(1).xls

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/治超/非现场处罚总台账更新至2022.7.5(最新).xlsx

Binary file not shown.

2
scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js

@ -135,7 +135,7 @@ try {
continue
}
if (k == '所属车队') {
insertValues.push(v.split(':')[1]);
insertValues.push(v.split(':')[1].replace(/.公司/, ''));
continue
}
}

2
scripts/0.0.1/data/工具脚本(无需执行)/index.js

@ -64,7 +64,7 @@ try {
// 有手动更改 不要轻易再次执行脚本
const fileList = [
// {
// path: './data/道路/道第三方.xls',
// path: './data/道路/道第三方.xls',
// n: '道路',
// tableName: 'road'
// },

3
scripts/0.0.1/data/工具脚本(无需执行)/道路_字段对应.json

@ -72,5 +72,6 @@
"图形里程": "graphicMileage",
"桩号里程": "chainageMileage",
"所在区县": "districtcounty",
"所在地市": "locationCity"
"所在地市": "locationCity",
"面层厚度":"surfaceThickness"
}

3
scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json

@ -72,5 +72,6 @@
"graphicMileage": "图形里程",
"chainageMileage": "桩号里程",
"districtcounty": "所在区县",
"locationCity": "所在地市"
"locationCity": "所在地市",
"surfaceThickness":"面层厚度"
}

3
scripts/0.0.1/data/工具脚本(无需执行)/道路_数据库表对应.json

@ -72,5 +72,6 @@
"图形里程": "graphic_mileage",
"桩号里程": "chainage_mileage",
"所在区县": "districtcounty",
"所在地市": "location_city"
"所在地市": "location_city",
"面层厚度": "surface_thickness"
}

2
scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql

@ -78,3 +78,5 @@ ON column road.Graphic_Mileage is '图形里程'; alter TABLE road add Chainage_
ON column road.Chainage_Mileage is '桩号里程'; alter TABLE road add Districtcounty varchar(1024); comment
ON column road.Districtcounty is '所在区县'; alter TABLE road add Location_City varchar(1024); comment
ON column road.Location_City is '所在地市';
alter TABLE road add Surface_Thickness varchar(1024); comment
ON column road.Surface_Thickness is '面层厚度';
Loading…
Cancel
Save