Browse Source

数据脚本

release_0.0.1
巴林闲侠 2 years ago
parent
commit
b219b25af4
  1. 75
      api/app/lib/controllers/data/road.js
  2. 135
      api/app/lib/controllers/data/vehicle.js
  3. 1
      api/app/lib/controllers/organization/department.js
  4. 94
      api/app/lib/models/department.js
  5. 286
      api/app/lib/models/municipal_business.js
  6. 385
      api/app/lib/models/municipal_vehicle.js
  7. 922
      api/app/lib/models/road.js
  8. 201
      api/app/lib/models/user.js
  9. 74
      api/app/lib/models/user_token.js
  10. 38
      api/app/lib/routes/data/index.js
  11. 161
      api/log/development.log
  12. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/桥梁/桥第三方.xls
  13. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/出租车/运输事业发展中心巡游出租车辆信息表.xlsx
  14. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌南化物流有限责任公司危货业户信息表.xlsx
  15. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌宁昌物流运输有限公司危货业户信息表.xlsx
  16. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌市万利特种气体有限公司危货业户信息表.xlsx
  17. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌江竹实业有限公司危货业户信息表.xlsx
  18. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/江西昌海运输有限公司危货业户信息表.xlsx
  19. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/江西省通越运输有限公司危货业户信息表.xlsx
  20. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/江西雨辰环保科技有限公司危货业户信息表.xlsx
  21. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/出租车/运输事业发展中心巡游出租车辆信息表.xlsx
  22. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌南化物流有限责任公司危货车辆信息表.xlsx
  23. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌宁昌物流运输有限公司危货车辆信息表.xlsx
  24. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌市万利特种气体有限公司危货车辆信息表.xlsx
  25. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌江竹实业有限公司危货车辆信息表.xlsx
  26. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/江西昌海运输有限公司危货车辆信息表.xlsx
  27. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/江西省通越运输有限公司危货车辆信息表.xlsx
  28. BIN
      scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/江西雨辰环保科技有限公司危货车辆信息表.xlsx
  29. 81
      scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js
  30. 31
      scripts/0.0.1/data/工具脚本(无需执行)/index.js
  31. 30
      scripts/0.0.1/data/工具脚本(无需执行)/运政业户_字段对应.json
  32. 30
      scripts/0.0.1/data/工具脚本(无需执行)/运政业户_数据字段对应.json
  33. 30
      scripts/0.0.1/data/工具脚本(无需执行)/运政业户_数据库表对应.json
  34. 34
      scripts/0.0.1/data/工具脚本(无需执行)/运政业户_数据脚本对应.sql
  35. 41
      scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_字段对应.json
  36. 41
      scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_数据字段对应.json
  37. 41
      scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_数据库表对应.json
  38. 45
      scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_数据脚本对应.sql
  39. 50
      scripts/0.0.1/data/工具脚本(无需执行)/道路_数据字段对应.json

75
api/app/lib/controllers/data/road.js

@ -1,7 +1,8 @@
'use strict'; 'use strict';
const roadKeyMap = require('./road.json') const roadKeyMap = require('./road.json')
console.log(roadKeyMap);
async function importIn (ctx) { async function importIn (ctx) {
// 数据导入
try { try {
const models = ctx.fs.dc.models; const models = ctx.fs.dc.models;
const { level } = ctx.query; const { level } = ctx.query;
@ -31,7 +32,77 @@ async function importIn (ctx) {
} }
} }
async function get (ctx) {
try {
const models = ctx.fs.dc.models;
const { level } = ctx.query;
const roadRes = await models.Road.findAll({
where: {
level
},
order: [['id', 'DESC']]
})
ctx.status = 200;
ctx.body = roadRes
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function edit (ctx) {
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body;
if (!data.roadId) {
await models.Road.create(data)
} else {
await models.Vehicle.update(
data, {
where: {
id: data.roadId
}
})
}
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function del (ctx) {
try {
const models = ctx.fs.dc.models;
const { roadId } = ctx.params;
await models.Road.destroy({
where: {
id: roadId
}
})
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = { module.exports = {
importIn, importIn,
get, edit, del,
}; };

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

@ -56,7 +56,138 @@ async function del (ctx) {
id: vehicleId id: vehicleId
} }
}) })
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function specificGet (ctx) {
try {
const models = ctx.fs.dc.models;
const { type } = ctx.query;
const vehicleRes = await models.MunicipalVehicle.findAll({
where: {
type
}
})
ctx.status = 200;
ctx.body = vehicleRes
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function specificEdit (ctx) {
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body;
if (!data.vehicleId) {
const vehicleRes = await models.Vehicle.create(data)
} else {
const vehicleRes = await models.Vehicle.update(data, {
where: {
id: data.vehicleId
}
})
}
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function specificDel (ctx) {
try {
const models = ctx.fs.dc.models;
const { vehicleId } = ctx.params;
const vehicleRes = await models.Vehicle.destroy({
where: {
id: vehicleId
}
})
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function businessGet (ctx) {
try {
const models = ctx.fs.dc.models;
const businessRes = await models.MunicipalBusiness.findAll()
ctx.status = 200;
ctx.body = businessRes
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function businessEdit (ctx) {
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body;
if (!data.businessId) {
await models.MunicipalBusiness.create(data)
} else {
await models.MunicipalBusiness.update(data, {
where: {
id: data.businessId
}
})
}
ctx.status = 204
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function businessDel (ctx) {
try {
const models = ctx.fs.dc.models;
const { businessId } = ctx.params;
await models.Vehicle.MunicipalBusiness({
where: {
id: businessId
}
})
ctx.status = 204 ctx.status = 204
} catch (error) { } catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
@ -69,4 +200,6 @@ async function del (ctx) {
module.exports = { module.exports = {
get, edit, del, get, edit, del,
specificGet, specificEdit, specificDel,
businessGet, businessEdit, businessDel
}; };

1
api/app/lib/controllers/organization/department.js

@ -78,6 +78,7 @@ async function editDep (ctx) {
} else { } else {
await models.Department.create({ await models.Department.create({
name: name, name: name,
delete: false,
dependence: dependence || null, dependence: dependence || null,
}) })
} }

94
api/app/lib/models/department.js

@ -2,51 +2,51 @@
'use strict'; 'use strict';
module.exports = dc => { module.exports = dc => {
const DataTypes = dc.ORM; const DataTypes = dc.ORM;
const sequelize = dc.orm; const sequelize = dc.orm;
const Department = sequelize.define("department", { const Department = sequelize.define("department", {
id: { id: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false, allowNull: false,
defaultValue: "nextval(department_id_seq1::regclass)", defaultValue: null,
comment: null, comment: null,
primaryKey: true, primaryKey: true,
field: "id", field: "id",
autoIncrement: false, autoIncrement: true,
unique: "department_id_uindex" unique: "department_id_uindex"
}, },
name: { name: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: false, primaryKey: false,
field: "name", field: "name",
autoIncrement: false autoIncrement: false
}, },
dependence: { dependence: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: false, primaryKey: false,
field: "dependence", field: "dependence",
autoIncrement: false autoIncrement: false
}, },
delete: { delete: {
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: false, primaryKey: false,
field: "delete", field: "delete",
autoIncrement: false autoIncrement: false
} }
}, { }, {
tableName: "department", tableName: "department",
comment: "", comment: "",
indexes: [] indexes: []
}); });
dc.models.Department = Department; dc.models.Department = Department;
return Department; return Department;
}; };

286
api/app/lib/models/municipal_business.js

@ -0,0 +1,286 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const MunicipalBusiness = sequelize.define("municipalBusiness", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "municipal_business_id_uindex"
},
nameOfBusinessOwner: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "业户名称",
primaryKey: false,
field: "name_of_business_owner",
autoIncrement: false
},
productName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "品名",
primaryKey: false,
field: "product_name",
autoIncrement: false
},
creditSocialCode: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "信用社会代码",
primaryKey: false,
field: "credit_social_code",
autoIncrement: false
},
administrativeDivision: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "行政区划",
primaryKey: false,
field: "administrative_division",
autoIncrement: false
},
economicNature: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经济性质",
primaryKey: false,
field: "economic_nature",
autoIncrement: false
},
address: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "地址",
primaryKey: false,
field: "address",
autoIncrement: false
},
contactNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "联系电话",
primaryKey: false,
field: "contact_number",
autoIncrement: false
},
email: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "电子邮箱",
primaryKey: false,
field: "email",
autoIncrement: false
},
legalRepresentative: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "法定代表人",
primaryKey: false,
field: "legal_representative",
autoIncrement: false
},
typeOfLegalPersonCertificate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "法人证件类型",
primaryKey: false,
field: "type_of_legal_person_certificate",
autoIncrement: false
},
natureOfTransportation: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "运输性质",
primaryKey: false,
field: "nature_of_transportation",
autoIncrement: false
},
legalPersonCertificateNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "法人证件号码",
primaryKey: false,
field: "legal_person_certificate_number",
autoIncrement: false
},
telephoneNumberOfLegalRepresentative: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "法定代表人电话",
primaryKey: false,
field: "telephone_number_of_legal_representative",
autoIncrement: false
},
nameOfThePersonInChargeOfTheBusiness: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营业户负责人姓名",
primaryKey: false,
field: "name_of_the_person_in_charge_of_the_business",
autoIncrement: false
},
telephoneNumberOfThePersonInChargeOfTheBusiness: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营业户负责人电话号码",
primaryKey: false,
field: "telephone_number_of_the_person_in_charge_of_the_business",
autoIncrement: false
},
handledBy: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经办人",
primaryKey: false,
field: "handled_by",
autoIncrement: false
},
phoneNumberOfHandler: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经办人电话",
primaryKey: false,
field: "phone_number_of_handler",
autoIncrement: false
},
natureOfBusiness: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营范围",
primaryKey: false,
field: "nature_of_business",
autoIncrement: false
},
businessStatus: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营状态",
primaryKey: false,
field: "business_status",
autoIncrement: false
},
businessLicenseNo: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营许可证号",
primaryKey: false,
field: "business_license_no",
autoIncrement: false
},
fromTheExpiryDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "有效期起",
primaryKey: false,
field: "from_the_expiry_date",
autoIncrement: false
},
expiryDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "有效期止",
primaryKey: false,
field: "expiry_date",
autoIncrement: false
},
issuingAuthority: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "发证机构",
primaryKey: false,
field: "issuing_authority",
autoIncrement: false
},
dateOfIssuance: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "核发日期",
primaryKey: false,
field: "date_of_issuance",
autoIncrement: false
},
licenseCategory: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "证照类别",
primaryKey: false,
field: "license_category",
autoIncrement: false
},
licenseIssuanceType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "证照发放类型",
primaryKey: false,
field: "license_issuance_type",
autoIncrement: false
},
numberOfSharedVehicles: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "共有车辆数",
primaryKey: false,
field: "number_of_shared_vehicles",
autoIncrement: false
},
creationDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "创建日期",
primaryKey: false,
field: "creation_date",
autoIncrement: false
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "类型 出租车/危货",
primaryKey: false,
field: "type",
autoIncrement: false
}
}, {
tableName: "municipal_business",
comment: "",
indexes: []
});
dc.models.MunicipalBusiness = MunicipalBusiness;
return MunicipalBusiness;
};

385
api/app/lib/models/municipal_vehicle.js

@ -0,0 +1,385 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const MunicipalVehicle = sequelize.define("municipalVehicle", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "municipal_vehicle_id_uindex"
},
nameOfBusinessOwner: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "业户名称",
primaryKey: false,
field: "name_of_business_owner",
autoIncrement: false
},
productName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "品名",
primaryKey: false,
field: "product_name",
autoIncrement: false
},
vehicleRegistry: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车籍地",
primaryKey: false,
field: "vehicle_registry",
autoIncrement: false
},
licensePlateNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车牌号",
primaryKey: false,
field: "license_plate_number",
autoIncrement: false
},
fuelType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "燃料类型",
primaryKey: false,
field: "fuel_type",
autoIncrement: false
},
address: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "住址",
primaryKey: false,
field: "address",
autoIncrement: false
},
economicNature: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经济性质",
primaryKey: false,
field: "economic_nature",
autoIncrement: false
},
approvedPassengerCapacity: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "核定载客位数",
primaryKey: false,
field: "approved_passenger_capacity",
autoIncrement: false
},
approvedLoadMass: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "核定载质量",
primaryKey: false,
field: "approved_load_mass",
autoIncrement: false
},
numberOfVehicleAxles: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆车轴数",
primaryKey: false,
field: "number_of_vehicle_axles",
autoIncrement: false
},
vehicleBrand: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆厂牌",
primaryKey: false,
field: "vehicle_brand",
autoIncrement: false
},
natureOfBusiness: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营范围",
primaryKey: false,
field: "nature_of_business",
autoIncrement: false
},
vehicleOperationStatus: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆营运状态",
primaryKey: false,
field: "vehicle_operation_status",
autoIncrement: false
},
busTypeAndClass: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "客车类型与等级",
primaryKey: false,
field: "bus_type_and_class",
autoIncrement: false
},
annualReviewResults: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "年审结果",
primaryKey: false,
field: "annual_review_results",
autoIncrement: false
},
dateOfThisAnnualReview: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "本次年审日期",
primaryKey: false,
field: "date_of_this_annual_review",
autoIncrement: false
},
dateOfNextAnnualReview: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "下次年审日期",
primaryKey: false,
field: "date_of_next_annual_review",
autoIncrement: false
},
dateOfRegistration: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "注册登记日期",
primaryKey: false,
field: "date_of_registration",
autoIncrement: false
},
sourceOfTransportationCapacity: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "运力来源",
primaryKey: false,
field: "source_of_transportation_capacity",
autoIncrement: false
},
fromTheExpiryDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "有效期起",
primaryKey: false,
field: "from_the_expiry_date",
autoIncrement: false
},
expiryDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "有效期止",
primaryKey: false,
field: "expiry_date",
autoIncrement: false
},
engineDisplacement: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "发动机排量",
primaryKey: false,
field: "engine_displacement",
autoIncrement: false
},
engineNumber: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "发动机号",
primaryKey: false,
field: "engine_number",
autoIncrement: false
},
vehicleEnginePower: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆发动机功率",
primaryKey: false,
field: "vehicle_engine_power",
autoIncrement: false
},
businessLicenseNo: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "经营许可证号",
primaryKey: false,
field: "business_license_no",
autoIncrement: false
},
licensePlateColor: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车牌颜色",
primaryKey: false,
field: "license_plate_color",
autoIncrement: false
},
totalVehicleMass: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆总质量",
primaryKey: false,
field: "total_vehicle_mass",
autoIncrement: false
},
totalQuasiTractionMassOfVehicle: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆准牵引总质量",
primaryKey: false,
field: "total_quasi_traction_mass_of_vehicle",
autoIncrement: false
},
roadTransportCertificateNo: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "道路运输证号",
primaryKey: false,
field: "road_transport_certificate_no",
autoIncrement: false
},
vehicleHeight: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆车高",
primaryKey: false,
field: "vehicle_height",
autoIncrement: false
},
vehicleConductor: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆车长",
primaryKey: false,
field: "vehicle_conductor",
autoIncrement: false
},
vehicleWidth: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆车宽",
primaryKey: false,
field: "vehicle_width",
autoIncrement: false
},
vehicleType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆类型",
primaryKey: false,
field: "vehicle_type",
autoIncrement: false
},
vehicleTypeWithDrivingLicense: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "行驶证车辆类型",
primaryKey: false,
field: "vehicle_type_with_driving_license",
autoIncrement: false
},
vehicleWheelbase: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "车辆轴距",
primaryKey: false,
field: "vehicle_wheelbase",
autoIncrement: false
},
ratingDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "等级评定日期",
primaryKey: false,
field: "rating_date",
autoIncrement: false
},
technicalEvaluationGrade: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "技术评定等级",
primaryKey: false,
field: "technical_evaluation_grade",
autoIncrement: false
},
nextRatingDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "下次等级评定日期",
primaryKey: false,
field: "next_rating_date",
autoIncrement: false
},
creationDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "创建日期",
primaryKey: false,
field: "creation_date",
autoIncrement: false
},
type: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "类型 出租车/危货",
primaryKey: false,
field: "type",
autoIncrement: false
}
}, {
tableName: "municipal_vehicle",
comment: "",
indexes: []
});
dc.models.MunicipalVehicle = MunicipalVehicle;
return MunicipalVehicle;
};

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

@ -2,465 +2,465 @@
'use strict'; 'use strict';
module.exports = dc => { module.exports = dc => {
const DataTypes = dc.ORM; const DataTypes = dc.ORM;
const sequelize = dc.orm; const sequelize = dc.orm;
const Road = sequelize.define("road", { const Road = sequelize.define("road", {
id: { id: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: true, primaryKey: true,
field: "id", field: "id",
autoIncrement: true, autoIncrement: true,
unique: "road_id_uindex" unique: "road_id_uindex"
}, },
routeName: { routeName: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路线名称", comment: "路线名称",
primaryKey: false, primaryKey: false,
field: "route_name", field: "route_name",
autoIncrement: false autoIncrement: false
}, },
routeCode: { routeCode: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路线代码", comment: "路线代码",
primaryKey: false, primaryKey: false,
field: "route_code", field: "route_code",
autoIncrement: false autoIncrement: false
}, },
sectionNo: { sectionNo: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路段序号", comment: "路段序号",
primaryKey: false, primaryKey: false,
field: "section_no", field: "section_no",
autoIncrement: false autoIncrement: false
}, },
townshipCode: { townshipCode: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "乡镇编码", comment: "乡镇编码",
primaryKey: false, primaryKey: false,
field: "township_code", field: "township_code",
autoIncrement: false autoIncrement: false
}, },
startingPlaceName: { startingPlaceName: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "起点地名", comment: "起点地名",
primaryKey: false, primaryKey: false,
field: "starting_place_name", field: "starting_place_name",
autoIncrement: false autoIncrement: false
}, },
startStation: { startStation: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "起点桩号", comment: "起点桩号",
primaryKey: false, primaryKey: false,
field: "start_station", field: "start_station",
autoIncrement: false autoIncrement: false
}, },
categoryOfStartingPointAndDividingPoint: { categoryOfStartingPointAndDividingPoint: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "起点分界点类别", comment: "起点分界点类别",
primaryKey: false, primaryKey: false,
field: "category_of_starting_point_and_dividing_point", field: "category_of_starting_point_and_dividing_point",
autoIncrement: false autoIncrement: false
}, },
stopPlaceName: { stopPlaceName: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "止点地名", comment: "止点地名",
primaryKey: false, primaryKey: false,
field: "stop_place_name", field: "stop_place_name",
autoIncrement: false autoIncrement: false
}, },
categoryOfDeadCenterAndDividingPoint: { categoryOfDeadCenterAndDividingPoint: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "止点分界点类别", comment: "止点分界点类别",
primaryKey: false, primaryKey: false,
field: "category_of_dead_center_and_dividing_point", field: "category_of_dead_center_and_dividing_point",
autoIncrement: false autoIncrement: false
}, },
stopStation: { stopStation: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "止点桩号", comment: "止点桩号",
primaryKey: false, primaryKey: false,
field: "stop_station", field: "stop_station",
autoIncrement: false autoIncrement: false
}, },
sectionType: { sectionType: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路段类型", comment: "路段类型",
primaryKey: false, primaryKey: false,
field: "section_type", field: "section_type",
autoIncrement: false autoIncrement: false
}, },
natureOfRoadSection: { natureOfRoadSection: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路段性质", comment: "路段性质",
primaryKey: false, primaryKey: false,
field: "nature_of_road_section", field: "nature_of_road_section",
autoIncrement: false autoIncrement: false
}, },
completionTime: { completionTime: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "建成时间", comment: "建成时间",
primaryKey: false, primaryKey: false,
field: "completion_time", field: "completion_time",
autoIncrement: false autoIncrement: false
}, },
gbmAndCivilizedModelRoad: { gbmAndCivilizedModelRoad: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "GBM及文明样板路", comment: "GBM及文明样板路",
primaryKey: false, primaryKey: false,
field: "gbm_and_civilized_model_road", field: "gbm_and_civilized_model_road",
autoIncrement: false autoIncrement: false
}, },
landforms: { landforms: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "地貌", comment: "地貌",
primaryKey: false, primaryKey: false,
field: "landforms", field: "landforms",
autoIncrement: false autoIncrement: false
}, },
natureOfCharges: { natureOfCharges: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "收费性质", comment: "收费性质",
primaryKey: false, primaryKey: false,
field: "nature_of_charges", field: "nature_of_charges",
autoIncrement: false autoIncrement: false
}, },
numberOfCulverts: { numberOfCulverts: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "涵洞数量", comment: "涵洞数量",
primaryKey: false, primaryKey: false,
field: "number_of_culverts", field: "number_of_culverts",
autoIncrement: false autoIncrement: false
}, },
technicalLevel: { technicalLevel: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "技术等级", comment: "技术等级",
primaryKey: false, primaryKey: false,
field: "technical_level", field: "technical_level",
autoIncrement: false autoIncrement: false
}, },
pavementType: { pavementType: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路面类型", comment: "路面类型",
primaryKey: false, primaryKey: false,
field: "pavement_type", field: "pavement_type",
autoIncrement: false autoIncrement: false
}, },
pavementWidth: { pavementWidth: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路面宽度", comment: "路面宽度",
primaryKey: false, primaryKey: false,
field: "pavement_width", field: "pavement_width",
autoIncrement: false autoIncrement: false
}, },
subgradeWidth: { subgradeWidth: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路基宽度", comment: "路基宽度",
primaryKey: false, primaryKey: false,
field: "subgrade_width", field: "subgrade_width",
autoIncrement: false autoIncrement: false
}, },
laneCharacteristics: { laneCharacteristics: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "车道特征", comment: "车道特征",
primaryKey: false, primaryKey: false,
field: "lane_characteristics", field: "lane_characteristics",
autoIncrement: false autoIncrement: false
}, },
whetherItIsOpenToTrafficInSunnyOrRainyDays: { whetherItIsOpenToTrafficInSunnyOrRainyDays: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "是否晴雨通车", comment: "是否晴雨通车",
primaryKey: false, primaryKey: false,
field: "whether_it_is_open_to_traffic_in_sunny_or_rainy_days", field: "whether_it_is_open_to_traffic_in_sunny_or_rainy_days",
autoIncrement: false autoIncrement: false
}, },
designSpeedPerHour: { designSpeedPerHour: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "设计时速", comment: "设计时速",
primaryKey: false, primaryKey: false,
field: "design_speed_per_hour", field: "design_speed_per_hour",
autoIncrement: false autoIncrement: false
}, },
urbanManagementSectionOrNot: { urbanManagementSectionOrNot: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "是否城管路段", comment: "是否城管路段",
primaryKey: false, primaryKey: false,
field: "urban_management_section_or_not", field: "urban_management_section_or_not",
autoIncrement: false autoIncrement: false
}, },
managementAndMaintenanceUnit: { managementAndMaintenanceUnit: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "管养单位", comment: "管养单位",
primaryKey: false, primaryKey: false,
field: "management_and_maintenance_unit", field: "management_and_maintenance_unit",
autoIncrement: false autoIncrement: false
}, },
roadAdministrationUnit: { roadAdministrationUnit: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "路政管理单位", comment: "路政管理单位",
primaryKey: false, primaryKey: false,
field: "road_administration_unit", field: "road_administration_unit",
autoIncrement: false autoIncrement: false
}, },
alimentation: { alimentation: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "列养情况", comment: "列养情况",
primaryKey: false, primaryKey: false,
field: "alimentation", field: "alimentation",
autoIncrement: false autoIncrement: false
}, },
sourceOfListedMaintenanceFunds: { sourceOfListedMaintenanceFunds: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "列养资金来源", comment: "列养资金来源",
primaryKey: false, primaryKey: false,
field: "source_of_listed_maintenance_funds", field: "source_of_listed_maintenance_funds",
autoIncrement: false autoIncrement: false
}, },
curingTime: { curingTime: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "养护时间", comment: "养护时间",
primaryKey: false, primaryKey: false,
field: "curing_time_", field: "curing_time",
autoIncrement: false autoIncrement: false
}, },
greeningMileage: { greeningMileage: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "可绿化里程", comment: "可绿化里程",
primaryKey: false, primaryKey: false,
field: "greening_mileage", field: "greening_mileage",
autoIncrement: false autoIncrement: false
}, },
greeningMileaged: { greeningMileaged: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "已绿化里程", comment: "已绿化里程",
primaryKey: false, primaryKey: false,
field: "greening_mileaged", field: "greening_mileaged",
autoIncrement: false autoIncrement: false
}, },
typeOfRepeatedRoadSection: { typeOfRepeatedRoadSection: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "重复道路路段类型", comment: "重复道路路段类型",
primaryKey: false, primaryKey: false,
field: "type_of_repeated_road_section", field: "type_of_repeated_road_section",
autoIncrement: false autoIncrement: false
}, },
serialNumberOfRepeatedSection: { serialNumberOfRepeatedSection: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "重复路段序号", comment: "重复路段序号",
primaryKey: false, primaryKey: false,
field: "serial_number_of_repeated_section", field: "serial_number_of_repeated_section",
autoIncrement: false autoIncrement: false
}, },
repeatedSectionRouteCode: { repeatedSectionRouteCode: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "重复路段路线编码", comment: "重复路段路线编码",
primaryKey: false, primaryKey: false,
field: "repeated_section_route_code", field: "repeated_section_route_code",
autoIncrement: false autoIncrement: false
}, },
reportingUnit: { reportingUnit: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "填报单位", comment: "填报单位",
primaryKey: false, primaryKey: false,
field: "reporting_unit", field: "reporting_unit",
autoIncrement: false autoIncrement: false
}, },
reasonForChange: { reasonForChange: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "变更原因", comment: "变更原因",
primaryKey: false, primaryKey: false,
field: "reason_for_change", field: "reason_for_change",
autoIncrement: false autoIncrement: false
}, },
changeTime: { changeTime: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "变更时间", comment: "变更时间",
primaryKey: false, primaryKey: false,
field: "change_time", field: "change_time",
autoIncrement: false autoIncrement: false
}, },
whetherMaintenanceManagedHighway: { whetherMaintenanceManagedHighway: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "是否按干线公路管理接养", comment: "是否按干线公路管理接养",
primaryKey: false, primaryKey: false,
field: "whether_maintenance_managed_highway", field: "whether_maintenance_managed_highway",
autoIncrement: false autoIncrement: false
}, },
remarks: { remarks: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "备注", comment: "备注",
primaryKey: false, primaryKey: false,
field: "remarks", field: "remarks",
autoIncrement: false autoIncrement: false
}, },
routeCodeOfLastYear: { routeCodeOfLastYear: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "上年路线编码", comment: "上年路线编码",
primaryKey: false, primaryKey: false,
field: "route_code_of_last_year", field: "route_code_of_last_year",
autoIncrement: false autoIncrement: false
}, },
routeNameOfLastYear: { routeNameOfLastYear: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "上年路线名称", comment: "上年路线名称",
primaryKey: false, primaryKey: false,
field: "route_name_of_last_year", field: "route_name_of_last_year",
autoIncrement: false autoIncrement: false
}, },
startingStationOfLastYear: { startingStationOfLastYear: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "上年起点桩号", comment: "上年起点桩号",
primaryKey: false, primaryKey: false,
field: "starting_station_of_last_year", field: "starting_station_of_last_year",
autoIncrement: false autoIncrement: false
}, },
lastYearsEndingPointStakeNumber: { lastYearsEndingPointStakeNumber: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "上年止点桩号", comment: "上年止点桩号",
primaryKey: false, primaryKey: false,
field: "last_years_ending_point_stake_number", field: "last_years_ending_point_stake_number",
autoIncrement: false autoIncrement: false
}, },
graphicMileage: { graphicMileage: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "图形里程", comment: "图形里程",
primaryKey: false, primaryKey: false,
field: "graphic_mileage", field: "graphic_mileage",
autoIncrement: false autoIncrement: false
}, },
chainageMileage: { chainageMileage: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "桩号里程", comment: "桩号里程",
primaryKey: false, primaryKey: false,
field: "chainage_mileage", field: "chainage_mileage",
autoIncrement: false autoIncrement: false
}, },
districtcounty: { districtcounty: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "所在区县", comment: "所在区县",
primaryKey: false, primaryKey: false,
field: "districtcounty", field: "districtcounty",
autoIncrement: false autoIncrement: false
}, },
locationCity: { locationCity: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "所在地市", comment: "所在地市",
primaryKey: false, primaryKey: false,
field: "location_city", field: "location_city",
autoIncrement: false autoIncrement: false
}, },
level: { level: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "县 / 乡 / 村", comment: "县 / 乡 / 村",
primaryKey: false, primaryKey: false,
field: "level", field: "level",
autoIncrement: false autoIncrement: false
} }
}, { }, {
tableName: "road", tableName: "road",
comment: "", comment: "",
indexes: [] indexes: []
}); });
dc.models.Road = Road; dc.models.Road = Road;
return Road; return Road;
}; };

201
api/app/lib/models/user.js

@ -2,105 +2,104 @@
'use strict'; 'use strict';
module.exports = dc => { module.exports = dc => {
const DataTypes = dc.ORM; const DataTypes = dc.ORM;
const sequelize = dc.orm; const sequelize = dc.orm;
const User = sequelize.define("user", { const User = sequelize.define("user", {
id: { id: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false, allowNull: false,
defaultValue: "nextval(user_id_seq1::regclass)", defaultValue: null,
comment: null, comment: null,
primaryKey: true, primaryKey: true,
field: "id", field: "id",
autoIncrement: false, autoIncrement: true
unique: "user_id_uindex" },
}, name: {
name: { type: DataTypes.STRING,
type: DataTypes.STRING, allowNull: false,
allowNull: false, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "name",
field: "name", autoIncrement: false
autoIncrement: false },
}, username: {
username: { type: DataTypes.STRING,
type: DataTypes.STRING, allowNull: false,
allowNull: false, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "username",
field: "username", autoIncrement: false
autoIncrement: false },
}, password: {
password: { type: DataTypes.STRING,
type: DataTypes.STRING, allowNull: false,
allowNull: false, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "password",
field: "password", autoIncrement: false
autoIncrement: false },
}, departmentId: {
departmentId: { type: DataTypes.INTEGER,
type: DataTypes.INTEGER, allowNull: false,
allowNull: false, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "department_id",
field: "department_id", autoIncrement: false
autoIncrement: false },
}, delete: {
delete: { type: DataTypes.BOOLEAN,
type: DataTypes.BOOLEAN, allowNull: false,
allowNull: false, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "delete",
field: "delete", autoIncrement: false
autoIncrement: false },
}, remark: {
remark: { type: DataTypes.STRING,
type: DataTypes.STRING, allowNull: true,
allowNull: true, defaultValue: "th",
defaultValue: "th", comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "remark",
field: "remark", autoIncrement: false
autoIncrement: false },
}, phone: {
phone: { type: DataTypes.STRING,
type: DataTypes.STRING, allowNull: true,
allowNull: true, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "phone",
field: "phone", autoIncrement: false
autoIncrement: false },
}, email: {
email: { type: DataTypes.STRING,
type: DataTypes.STRING, allowNull: true,
allowNull: true, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "email",
field: "email", autoIncrement: false
autoIncrement: false },
}, enable: {
enable: { type: DataTypes.BOOLEAN,
type: DataTypes.BOOLEAN, allowNull: false,
allowNull: false, defaultValue: null,
defaultValue: null, comment: null,
comment: null, primaryKey: false,
primaryKey: false, field: "enable",
field: "enable", autoIncrement: false
autoIncrement: false }
} }, {
}, { tableName: "user",
tableName: "user", comment: "",
comment: "", indexes: []
indexes: [] });
}); dc.models.User = User;
dc.models.User = User; return User;
return User;
}; };

74
api/app/lib/models/user_token.js

@ -2,41 +2,41 @@
'use strict'; 'use strict';
module.exports = dc => { module.exports = dc => {
const DataTypes = dc.ORM; const DataTypes = dc.ORM;
const sequelize = dc.orm; const sequelize = dc.orm;
const UserToken = sequelize.define("userToken", { const UserToken = sequelize.define("userToken", {
token: { token: {
type: DataTypes.UUIDV4, type: DataTypes.UUIDV4,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: true, primaryKey: true,
field: "token", field: "token",
autoIncrement: false autoIncrement: false
}, },
userInfo: { userInfo: {
type: DataTypes.JSONB, type: DataTypes.JSONB,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: false, primaryKey: false,
field: "user_info", field: "user_info",
autoIncrement: false autoIncrement: false
}, },
expired: { expired: {
type: DataTypes.DATE, type: DataTypes.DATE,
allowNull: false, allowNull: false,
defaultValue: null, defaultValue: null,
comment: null, comment: null,
primaryKey: false, primaryKey: false,
field: "expired", field: "expired",
autoIncrement: false autoIncrement: false
} }
}, { }, {
tableName: "user_token", tableName: "user_token",
comment: "", comment: "",
indexes: [] indexes: []
}); });
dc.models.UserToken = UserToken; dc.models.UserToken = UserToken;
return UserToken; return UserToken;
}; };

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

@ -4,17 +4,49 @@ const vehicle = require('../../controllers/data/vehicle');
const road = require('../../controllers/data/road'); const road = require('../../controllers/data/road');
module.exports = function (app, router, opts) { module.exports = function (app, router, opts) {
// 路政 废弃 // 运政
//客运车
app.fs.api.logAttr['GET/vehicle'] = { content: '获取运政列表', visible: true }; app.fs.api.logAttr['GET/vehicle'] = { content: '获取运政列表', visible: true };
router.get('/vehicle', vehicle.get); router.get('/vehicle', vehicle.get);
app.fs.api.logAttr['put/vehicle'] = { content: '编辑运政数据', visible: true }; app.fs.api.logAttr['PUT/vehicle'] = { content: '编辑运政数据', visible: true };
router.put('/vehicle', vehicle.edit); router.put('/vehicle', vehicle.edit);
app.fs.api.logAttr['DEL/vehicle/:vehicleId'] = { content: '删除运政数据', visible: false }; app.fs.api.logAttr['DEL/vehicle/:vehicleId'] = { content: '删除运政数据', visible: false };
router.del('/vehicle/:vehicleId', vehicle.del); router.del('/vehicle/:vehicleId', vehicle.del);
// 路政 END 废弃
// 出租/危货
app.fs.api.logAttr['GET/vehicle/specific'] = { content: '获取具体车辆列表', visible: true };
router.get('/vehicle/specific', vehicle.specificGet);
app.fs.api.logAttr['PUT/vehicle/specific'] = { content: '编辑具体车辆数据', visible: true };
router.put('/vehicle/specific', vehicle.specificEdit);
app.fs.api.logAttr['DEL/vehicle/:vehicleId/specific'] = { content: '删除具体车辆数据', visible: false };
router.del('/vehicle/:vehicleId/specific', vehicle.specificDel);
// 业户
app.fs.api.logAttr['GET/vehicle/business'] = { content: '获取业户列表', visible: true };
router.get('/vehicle/business', vehicle.businessGet);
app.fs.api.logAttr['PUT/vehicle/business'] = { content: '编辑业户数据', visible: true };
router.put('/vehicle/business', vehicle.businessEdit);
app.fs.api.logAttr['DEL/vehicle/business/:businessId'] = { content: '删除业户数据', visible: false };
router.del('/vehicle/business/:businessId', vehicle.businessDel);
// 运政 END
// 道路
app.fs.api.logAttr['POST/road/import'] = { content: '导入道路数据', visible: true }; app.fs.api.logAttr['POST/road/import'] = { content: '导入道路数据', visible: true };
router.post('/road/import', road.importIn); router.post('/road/import', road.importIn);
app.fs.api.logAttr['GET/road'] = { content: '获取道路数据', visible: true };
router.post('/road', road.get);
app.fs.api.logAttr['put/road'] = { content: '编辑道路数据', visible: true };
router.put('/road', road.edit);
app.fs.api.logAttr['DEL/road/:roadId'] = { content: '删除道路数据', visible: false };
router.del('/road/:roadId', road.del);
// 道路 END
}; };

161
api/log/development.log

@ -6963,3 +6963,164 @@
2022-07-21 09:33:38.086 - error: path: /department/user/1, error: SequelizeValidationError: notNull Violation: user.username cannot be null 2022-07-21 09:33:38.086 - error: path: /department/user/1, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 09:38:23.005 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null 2022-07-21 09:38:23.005 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 09:42:39.489 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null 2022-07-21 09:42:39.489 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:30:39.603 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:45:18.138 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:48:14.279 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 10:52:47.289 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:53:25.619 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:53:40.754 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:56:08.957 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:58:29.076 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 10:58:54.246 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 11:01:05.360 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 11:02:24.229 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 11:04:01.630 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.username cannot be null
2022-07-21 11:13:51.309 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:18:05.058 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:30:43.744 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:32:23.466 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:33:10.143 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:35:26.249 - error: [FS-ERRHD]
{
message: 'Unexpected token d in JSON at position 7',
stack: 'SyntaxError: Unexpected token d in JSON at position 7\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n' +
' departmentId: 2\r\n' +
'email: "1146678272@qq.com"\r\n' +
'enable: true\r\n' +
'name: "csaea"\r\n' +
'password: "123456"\r\n' +
'phone: "13000000000"\r\n' +
'username: "csadasd"\r\n' +
'}'
}
2022-07-21 11:36:36.064 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:36:38.096 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:36:56.461 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:38:47.782 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:39:23.742 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:40:19.580 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:42:49.014 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:43:11.665 - error: path: /department/user, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(user_id_seq1::regclass)"
2022-07-21 11:46:44.138 - debug: [FS-LOGGER] Init.
2022-07-21 11:46:44.247 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-21 11:46:44.248 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-21 11:46:47.422 - error: path: /department/user, error: SequelizeValidationError: notNull Violation: user.id cannot be null
2022-07-21 11:47:23.048 - debug: [FS-LOGGER] Init.
2022-07-21 11:47:23.129 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-21 11:47:23.129 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-21 11:47:29.578 - error: path: /department/user, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"user_pk"
2022-07-21 14:18:54.469 - error: [FS-ERRHD]
{
message: 'Unexpected token } in JSON at position 49',
stack: 'SyntaxError: Unexpected token } in JSON at position 49\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n "name": "前总通便年例",\r\n "dependence": 74,\r\n}'
}
2022-07-21 14:19:10.523 - error: [FS-ERRHD]
{
message: 'Unexpected token } in JSON at position 49',
stack: 'SyntaxError: Unexpected token } in JSON at position 49\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n "name": "前总通便年例",\r\n "dependence": 44,\r\n}'
}
2022-07-21 14:20:37.023 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.delete cannot be null
2022-07-21 14:20:48.728 - error: [FS-ERRHD]
{
message: "Unexpected token ' in JSON at position 42",
stack: "SyntaxError: Unexpected token ' in JSON at position 42\n" +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: `{\r\n "name": "规治改比",\r\n "dependence": ''\r\n}`
}
2022-07-21 14:20:55.998 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.delete cannot be null
2022-07-21 14:22:14.826 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.delete cannot be null
2022-07-21 14:23:02.987 - error: [FS-ERRHD]
{
message: 'Unexpected token } in JSON at position 44',
stack: 'SyntaxError: Unexpected token } in JSON at position 44\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n "name": "级西育先到",\r\n "depId": "6",\r\n}'
}
2022-07-21 14:23:22.890 - error: [FS-ERRHD]
{
message: 'Unexpected token } in JSON at position 44',
stack: 'SyntaxError: Unexpected token } in JSON at position 44\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n "name": "级西育先到",\r\n "depId": "6",\r\n}'
}
2022-07-21 14:23:31.250 - error: [FS-ERRHD]
{
message: 'Unexpected token } in JSON at position 44',
stack: 'SyntaxError: Unexpected token } in JSON at position 44\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n "name": "级西育先到",\r\n "depId": "6",\r\n}'
}
2022-07-21 14:24:00.929 - error: [FS-ERRHD]
{
message: 'Unexpected token } in JSON at position 44',
stack: 'SyntaxError: Unexpected token } in JSON at position 44\n' +
' at JSON.parse (<anonymous>)\n' +
' at parse (c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:62:17)\n' +
' at c:\\_WorkCode\\四好公路\\api\\node_modules\\koa-bodyparser\\node_modules\\co-body\\lib\\json.js:45:22\n' +
' at processTicksAndRejections (internal/process/task_queues.js:97:5)',
status: 400,
body: '{\r\n "name": "级西育先到",\r\n "depId": "6",\r\n}'
}
2022-07-21 14:24:42.904 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.delete cannot be null
2022-07-21 14:24:59.513 - debug: [FS-LOGGER] Init.
2022-07-21 14:24:59.616 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-21 14:24:59.616 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-21 14:25:01.280 - error: path: /department, error: SequelizeDatabaseError: 无效的整数类型输入语法: "nextval(department_id_seq1::regclass)"
2022-07-21 14:25:25.893 - debug: [FS-LOGGER] Init.
2022-07-21 14:25:25.982 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-21 14:25:25.982 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-21 14:25:28.027 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.id cannot be null
2022-07-21 14:26:38.334 - debug: [FS-LOGGER] Init.
2022-07-21 14:26:38.428 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-21 14:26:38.429 - info: [FS-AUTH] Inject auth and api mv into router.
2022-07-21 14:26:42.518 - error: path: /department, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"department_id_uindex"
2022-07-21 14:26:49.435 - error: path: /department, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"department_id_uindex"
2022-07-21 14:26:52.505 - error: path: /department, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"department_id_uindex"
2022-07-21 14:27:03.896 - error: path: /department, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"department_id_uindex"
2022-07-21 14:27:04.759 - error: path: /department, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"department_id_uindex"
2022-07-21 14:27:05.547 - error: path: /department, error: SequelizeUniqueConstraintError: 重复键违反唯一约束"department_id_uindex"
2022-07-21 14:31:42.147 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.name cannot be null
2022-07-21 14:32:41.134 - error: path: /department, error: SequelizeValidationError: notNull Violation: department.name cannot be null
2022-07-21 14:40:51.989 - error: path: /department/undefined/user, error: SequelizeDatabaseError: 字段 "nan" 不存在
2022-07-21 14:59:09.215 - debug: [FS-LOGGER] Init.
2022-07-21 14:59:09.310 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-21 14:59:09.311 - info: [FS-AUTH] Inject auth and api mv into router.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/桥梁/桥第三方.xls

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/出租车/运输事业发展中心巡游出租车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌南化物流有限责任公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌宁昌物流运输有限公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌市万利特种气体有限公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/南昌江竹实业有限公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/江西昌海运输有限公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/江西省通越运输有限公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/业户/危货/江西雨辰环保科技有限公司危货业户信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/出租车/运输事业发展中心巡游出租车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌南化物流有限责任公司危货车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌宁昌物流运输有限公司危货车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌市万利特种气体有限公司危货车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/南昌江竹实业有限公司危货车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/江西昌海运输有限公司危货车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/江西省通越运输有限公司危货车辆信息表.xlsx

Binary file not shown.

BIN
scripts/0.0.1/data/工具脚本(无需执行)/data/运政/车辆/危货/江西雨辰环保科技有限公司危货车辆信息表.xlsx

Binary file not shown.

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

@ -57,57 +57,86 @@ try {
const fileList = [ const fileList = [
// { // {
// path: './data/道路/村道第三方.xls', // path: ['./data/道路/村道第三方.xls'],
// n: '道路', // n: '道路',
// tableName: 'road', // tableName: 'road',
// defaultKey: ['level'], // defaultKey: ['level'],
// defaultValue: ['村'], // defaultValue: ['村'],
// }, // },
// { // {
// path: './data/道路/县道第三方.xls', // path: ['./data/道路/县道第三方.xls'],
// n: '道路', // n: '道路',
// tableName: 'road', // tableName: 'road',
// defaultKey: ['level'], // defaultKey: ['level'],
// defaultValue: ['县'], // defaultValue: ['县'],
// }, // },
// { // {
// path: './data/道路/乡道第三方.xls', // path:[ './data/道路/乡道第三方.xls'],
// n: '道路', // n: '道路',
// tableName: 'road', // tableName: 'road',
// defaultKey: ['level'], // defaultKey: ['level'],
// defaultValue: ['乡'], // defaultValue: ['乡'],
// }, // },
// {
// path: (() => {
// let p = [];
// fs.readdirSync(path.join(__dirname, '/data/运政/车辆/出租车')).forEach((filename) => {
// p.push(`./data/运政/车辆/出租车/${filename}`)
// });
// return p;
// })(),
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['出租车'],
// },
// {
// path: (() => {
// let p = [];
// fs.readdirSync(path.join(__dirname, '/data/运政/车辆/危货')).forEach((filename) => {
// p.push(`./data/运政/车辆/危货/${filename}`)
// });
// return p;
// })(),
// n: '运政车辆',
// tableName: 'municipal_vehicle',
// defaultKey: ['type'],
// defaultValue: ['危货'],
// },
] ]
for (let f of fileList) { for (let f of fileList) {
console.log(`读取 ${f.path}`); console.log(f.path);
// 读取数据文件 // 读取数据文件
let workbook = XLSX.readFile(path.join(__dirname, f.path)) for (let p of f.path) {
let firstSheetName = workbook.SheetNames[0]; console.log(`读取 ${p}`);
let worksheet = workbook.Sheets[firstSheetName]; let workbook = XLSX.readFile(path.join(__dirname, p))
let res = XLSX.utils.sheet_to_json(worksheet); let firstSheetName = workbook.SheetNames[0];
const keyMap = require(`./${f.n}_数据库表对应.json`); let worksheet = workbook.Sheets[firstSheetName];
// console.log(keyMap); let res = XLSX.utils.sheet_to_json(worksheet);
for (let d of res) { const keyMap = require(`./${f.n}_数据库表对应.json`);
let insertStr = `INSERT INTO "${f.tableName}" (`; console.log(keyMap);
let insertKeys = (f.defaultKey || []).concat([]); for (let d of res) {
let insertValues = (f.defaultValue || []).concat([]); let insertStr = `INSERT INTO "${f.tableName}" (`;
for (let k in keyMap) { let insertKeys = (f.defaultKey || []).concat([]);
// 没做判重 let insertValues = (f.defaultValue || []).concat([]);
let v = d[k]; for (let k in keyMap) {
if (v) { // 没做判重
insertKeys.push(keyMap[k]); let v = d[k];
insertValues.push(v); if (v) {
insertKeys.push(keyMap[k]);
insertValues.push(v);
}
} }
insertStr += insertKeys.join(',') + ') VALUES (';
insertStr += insertKeys.map((k, i) => `$${i + 1}`).join(',') + ')';
// console.log(insertStr, insertValues);
// console.log(`插入 ${f.tableName}:${insertStr}`);
await client.query(insertStr, insertValues);
// break;
} }
insertStr += insertKeys.join(',') + ') VALUES (';
insertStr += insertKeys.map((k, i) => `$${i + 1}`).join(',') + ')';
// console.log(insertStr, insertValues);
console.log(`插入 ${f.tableName}${insertStr}`);
await client.query(insertStr, insertValues);
// break; // break;
} }
// break;
} }
// await client.query('ROLLBACK') // await client.query('ROLLBACK')

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

@ -56,11 +56,21 @@ try {
await client.query('BEGIN') await client.query('BEGIN')
const fileList = [ const fileList = [
{ // {
path: './data/道路/乡道第三方.xls', // path: './data/道路/乡道第三方.xls',
n: '道路', // n: '道路',
tableName: 'road' // tableName: 'road'
}, // },
// {
// path: './data/运政/车辆/危货/江西昌海运输有限公司危货车辆信息表.xlsx',
// n: '运政车辆',
// tableName: 'municipal_vehicle'
// },
// {
// path: './data/运政/业户/危货/江西昌海运输有限公司危货业户信息表.xlsx',
// n: '运政业户',
// tableName: 'municipal_business'
// }
] ]
for (let f of fileList) { for (let f of fileList) {
@ -74,6 +84,7 @@ try {
let dataEx = res[0]; let dataEx = res[0];
transResult = '' transResult = ''
sqlResult = '' sqlResult = ''
transResolveResult = ''
sql = ` sql = `
-- ${f.n} -- ${f.n}
create table if not exists "${f.tableName}" create table if not exists "${f.tableName}"
@ -102,14 +113,20 @@ try {
` `
sqlResult += `"${t}" : "${engT.trim().replace(/ /g, '_').replace(/( |^)[A-Z]/g, (L) => L.toLowerCase())}", \n sqlResult += `"${t}" : "${engT.trim().replace(/ /g, '_').replace(/( |^)[A-Z]/g, (L) => L.toLowerCase())}", \n
` `
transResolveResult += ` "${upperEngT
.replace(/_/g, '')
.replace(/( |^)[A-Z]/g, (L) => L.toLowerCase())
}":"${t}",\n
`
sql += ` sql += `
alter table ${f.tableName} add ${upperEngT} varchar(1024); alter table ${f.tableName} add ${upperEngT} varchar(1024);
comment on column ${f.tableName}.${upperEngT} is '${t}'; comment on column ${f.tableName}.${upperEngT} is '${t}';
` `
} }
// fs.writeFileSync(`${f.n}_字段对应.json`, `{${transResult}}`, 'utf-8'); fs.writeFileSync(`${f.n}_字段对应.json`, `{${transResult}}`, 'utf-8');
// fs.writeFileSync(`${f.n}_数据脚本对应.sql`, sql, 'utf-8'); fs.writeFileSync(`${f.n}_数据脚本对应.sql`, sql, 'utf-8');
fs.writeFileSync(`${f.n}_数据库表对应.json`, `{${sqlResult}}`, 'utf-8'); fs.writeFileSync(`${f.n}_数据库表对应.json`, `{${sqlResult}}`, 'utf-8');
fs.writeFileSync(`${f.n}_数据字段对应.json`, `{${transResolveResult}}`, 'utf-8');
} }
// await client.query('ROLLBACK') // await client.query('ROLLBACK')

30
scripts/0.0.1/data/工具脚本(无需执行)/运政业户_字段对应.json

@ -0,0 +1,30 @@
{
"业户名称": "nameOfBusinessOwner",
"品名": "productName",
"信用社会代码": "creditSocialCode",
"行政区划": "administrativeDivision",
"经济性质": "economicNature",
"地址": "address",
"联系电话": "contactNumber",
"电子邮箱": "email",
"法定代表人": "legalRepresentative",
"法人证件类型": "typeOfLegalPersonCertificate",
"运输性质": "natureOfTransportation",
"法人证件号码": "legalPersonCertificateNumber",
"法定代表人电话": "telephoneNumberOfLegalRepresentative",
"经营业户负责人姓名": "nameOfThePersonInChargeOfTheBusiness",
"经营业户负责人电话号码": "telephoneNumberOfThePersonInChargeOfTheBusiness",
"经办人": "handledBy",
"经办人电话": "phoneNumberOfHandler",
"经营范围": "natureOfBusiness",
"经营状态": "businessStatus",
"经营许可证号": "businessLicenseNo",
"有效期起": "fromTheExpiryDate",
"有效期止": "expiryDate",
"发证机构": "issuingAuthority",
"核发日期": "dateOfIssuance",
"证照类别": "licenseCategory",
"证照发放类型": "licenseIssuanceType",
"共有车辆数": "numberOfSharedVehicles",
"创建日期": "creationDate"
}

30
scripts/0.0.1/data/工具脚本(无需执行)/运政业户_数据字段对应.json

@ -0,0 +1,30 @@
{
"nameOfBusinessOwner": "业户名称",
"productName": "品名",
"creditSocialCode": "信用社会代码",
"administrativeDivision": "行政区划",
"economicNature": "经济性质",
"address": "地址",
"contactNumber": "联系电话",
"email": "电子邮箱",
"legalRepresentative": "法定代表人",
"typeOfLegalPersonCertificate": "法人证件类型",
"natureOfTransportation": "运输性质",
"legalPersonCertificateNumber": "法人证件号码",
"telephoneNumberOfLegalRepresentative": "法定代表人电话",
"nameOfThePersonInChargeOfTheBusiness": "经营业户负责人姓名",
"telephoneNumberOfThePersonInChargeOfTheBusiness": "经营业户负责人电话号码",
"handledBy": "经办人",
"phoneNumberOfHandler": "经办人电话",
"natureOfBusiness": "经营范围",
"businessStatus": "经营状态",
"businessLicenseNo": "经营许可证号",
"fromTheExpiryDate": "有效期起",
"expiryDate": "有效期止",
"issuingAuthority": "发证机构",
"dateOfIssuance": "核发日期",
"licenseCategory": "证照类别",
"licenseIssuanceType": "证照发放类型",
"numberOfSharedVehicles": "共有车辆数",
"creationDate": "创建日期"
}

30
scripts/0.0.1/data/工具脚本(无需执行)/运政业户_数据库表对应.json

@ -0,0 +1,30 @@
{
"业户名称": "name_of_business_owner",
"品名": "product_Name",
"信用社会代码": "credit_social_code",
"行政区划": "administrative_division",
"经济性质": "economic_nature",
"地址": "address",
"联系电话": "contact_number",
"电子邮箱": "email",
"法定代表人": "legal_representative",
"法人证件类型": "type_of_legal_person_certificate",
"运输性质": "nature_of_transportation",
"法人证件号码": "legal_person_certificate_number",
"法定代表人电话": "telephone_number_of_legal_representative",
"经营业户负责人姓名": "name_of_the_person_in_charge_of_the_business",
"经营业户负责人电话号码": "telephone_number_of_the_person_in_charge_of_the_business",
"经办人": "handled_by",
"经办人电话": "phone_number_of_handler",
"经营范围": "nature_of_Business",
"经营状态": "business_status",
"经营许可证号": "business_license_No",
"有效期起": "from_the_expiry_date",
"有效期止": "expiry_date",
"发证机构": "issuing_authority",
"核发日期": "date_of_issuance",
"证照类别": "license_category",
"证照发放类型": "license_issuance_type",
"共有车辆数": "number_of_shared_vehicles",
"创建日期": "creation_date"
}

34
scripts/0.0.1/data/工具脚本(无需执行)/运政业户_数据脚本对应.sql

@ -0,0 +1,34 @@
-- 运政业户
CREATE TABLE if not exists "municipal_business" ( id serial not null );
CREATE unique index if not exists municipal_business_id_uindex
ON municipal_business (id); alter TABLE municipal_business add constraint municipal_business_pk primary key (id); alter TABLE municipal_business add Name_Of_Business_Owner varchar(1024); comment
ON column municipal_business.Name_Of_Business_Owner is '业户名称'; alter TABLE municipal_business add Product_Name varchar(1024); comment
ON column municipal_business.Product_Name is '品名'; alter TABLE municipal_business add Credit_Social_Code varchar(1024); comment
ON column municipal_business.Credit_Social_Code is '信用社会代码'; alter TABLE municipal_business add Administrative_Division varchar(1024); comment
ON column municipal_business.Administrative_Division is '行政区划'; alter TABLE municipal_business add Economic_Nature varchar(1024); comment
ON column municipal_business.Economic_Nature is '经济性质'; alter TABLE municipal_business add Address varchar(1024); comment
ON column municipal_business.Address is '地址'; alter TABLE municipal_business add Contact_Number varchar(1024); comment
ON column municipal_business.Contact_Number is '联系电话'; alter TABLE municipal_business add Email varchar(1024); comment
ON column municipal_business.Email is '电子邮箱'; alter TABLE municipal_business add Legal_Representative varchar(1024); comment
ON column municipal_business.Legal_Representative is '法定代表人'; alter TABLE municipal_business add Type_Of_Legal_Person_Certificate varchar(1024); comment
ON column municipal_business.Type_Of_Legal_Person_Certificate is '法人证件类型'; alter TABLE municipal_business add Nature_Of_Transportation varchar(1024); comment
ON column municipal_business.Nature_Of_Transportation is '运输性质'; alter TABLE municipal_business add Legal_Person_Certificate_Number varchar(1024); comment
ON column municipal_business.Legal_Person_Certificate_Number is '法人证件号码'; alter TABLE municipal_business add Telephone_Number_Of_Legal_Representative varchar(1024); comment
ON column municipal_business.Telephone_Number_Of_Legal_Representative is '法定代表人电话'; alter TABLE municipal_business add Name_Of_The_Person_In_Charge_Of_The_Business varchar(1024); comment
ON column municipal_business.Name_Of_The_Person_In_Charge_Of_The_Business is '经营业户负责人姓名'; alter TABLE municipal_business add Telephone_Number_Of_The_Person_In_Charge_Of_The_Business varchar(1024); comment
ON column municipal_business.Telephone_Number_Of_The_Person_In_Charge_Of_The_Business is '经营业户负责人电话号码'; alter TABLE municipal_business add Handled_By varchar(1024); comment
ON column municipal_business.Handled_By is '经办人'; alter TABLE municipal_business add Phone_Number_Of_Handler varchar(1024); comment
ON column municipal_business.Phone_Number_Of_Handler is '经办人电话'; alter TABLE municipal_business add Nature_Of_Business varchar(1024); comment
ON column municipal_business.Nature_Of_Business is '经营范围'; alter TABLE municipal_business add Business_Status varchar(1024); comment
ON column municipal_business.Business_Status is '经营状态'; alter TABLE municipal_business add Business_License_No varchar(1024); comment
ON column municipal_business.Business_License_No is '经营许可证号'; alter TABLE municipal_business add From_The_Expiry_Date varchar(1024); comment
ON column municipal_business.From_The_Expiry_Date is '有效期起'; alter TABLE municipal_business add Expiry_Date varchar(1024); comment
ON column municipal_business.Expiry_Date is '有效期止'; alter TABLE municipal_business add Issuing_Authority varchar(1024); comment
ON column municipal_business.Issuing_Authority is '发证机构'; alter TABLE municipal_business add Date_Of_Issuance varchar(1024); comment
ON column municipal_business.Date_Of_Issuance is '核发日期'; alter TABLE municipal_business add License_Category varchar(1024); comment
ON column municipal_business.License_Category is '证照类别'; alter TABLE municipal_business add License_Issuance_Type varchar(1024); comment
ON column municipal_business.License_Issuance_Type is '证照发放类型'; alter TABLE municipal_business add Number_Of_Shared_Vehicles varchar(1024); comment
ON column municipal_business.Number_Of_Shared_Vehicles is '共有车辆数'; alter TABLE municipal_business add Creation_Date varchar(1024); comment
ON column municipal_business.Creation_Date is '创建日期';

41
scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_字段对应.json

@ -0,0 +1,41 @@
{
"业户名称": "nameOfBusinessOwner",
"品名": "productName",
"车籍地": "vehicleRegistry",
"车牌号": "licensePlateNumber",
"燃料类型": "fuelType",
"住址": "address",
"经济性质": "economicNature",
"核定载客位数": "approvedPassengerCapacity",
"核定载质量": "approvedLoadMass",
"车辆车轴数": "numberOfVehicleAxles",
"车辆厂牌": "vehicleBrand",
"经营范围": "natureOfBusiness",
"车辆营运状态": "vehicleOperationStatus",
"客车类型与等级": "busTypeAndClass",
"年审结果": "annualReviewResults",
"本次年审日期": "dateOfThisAnnualReview",
"下次年审日期": "dateOfNextAnnualReview",
"注册登记日期": "dateOfRegistration",
"运力来源": "sourceOfTransportationCapacity",
"有效期起": "fromTheExpiryDate",
"有效期止": "expiryDate",
"发动机排量": "engineDisplacement",
"发动机号": "engineNumber",
"车辆发动机功率": "vehicleEnginePower",
"经营许可证号": "businessLicenseNo",
"车牌颜色": "licensePlateColor",
"车辆总质量": "totalVehicleMass",
"车辆准牵引总质量": "totalQuasiTractionMassOfVehicle",
"道路运输证号": "roadTransportCertificateNo",
"车辆车高": "vehicleHeight",
"车辆车长": "vehicleConductor",
"车辆车宽": "vehicleWidth",
"车辆类型": "vehicleType",
"行驶证车辆类型": "vehicleTypeWithDrivingLicense",
"车辆轴距": "vehicleWheelbase",
"等级评定日期": "ratingDate",
"技术评定等级": "technicalEvaluationGrade",
"下次等级评定日期": "nextRatingDate",
"创建日期": "creationDate"
}

41
scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_数据字段对应.json

@ -0,0 +1,41 @@
{
"nameOfBusinessOwner": "业户名称",
"productName": "品名",
"vehicleRegistry": "车籍地",
"licensePlateNumber": "车牌号",
"fuelType": "燃料类型",
"address": "住址",
"economicNature": "经济性质",
"approvedPassengerCapacity": "核定载客位数",
"approvedLoadMass": "核定载质量",
"numberOfVehicleAxles": "车辆车轴数",
"vehicleBrand": "车辆厂牌",
"natureOfBusiness": "经营范围",
"vehicleOperationStatus": "车辆营运状态",
"busTypeAndClass": "客车类型与等级",
"annualReviewResults": "年审结果",
"dateOfThisAnnualReview": "本次年审日期",
"dateOfNextAnnualReview": "下次年审日期",
"dateOfRegistration": "注册登记日期",
"sourceOfTransportationCapacity": "运力来源",
"fromTheExpiryDate": "有效期起",
"expiryDate": "有效期止",
"engineDisplacement": "发动机排量",
"engineNumber": "发动机号",
"vehicleEnginePower": "车辆发动机功率",
"businessLicenseNo": "经营许可证号",
"licensePlateColor": "车牌颜色",
"totalVehicleMass": "车辆总质量",
"totalQuasiTractionMassOfVehicle": "车辆准牵引总质量",
"roadTransportCertificateNo": "道路运输证号",
"vehicleHeight": "车辆车高",
"vehicleConductor": "车辆车长",
"vehicleWidth": "车辆车宽",
"vehicleType": "车辆类型",
"vehicleTypeWithDrivingLicense": "行驶证车辆类型",
"vehicleWheelbase": "车辆轴距",
"ratingDate": "等级评定日期",
"technicalEvaluationGrade": "技术评定等级",
"nextRatingDate": "下次等级评定日期",
"creationDate": "创建日期"
}

41
scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_数据库表对应.json

@ -0,0 +1,41 @@
{
"业户名称": "name_of_business_owner",
"品名": "product_Name",
"车籍地": "vehicle_registry",
"车牌号": "license_plate_number",
"燃料类型": "fuel_type",
"住址": "address",
"经济性质": "economic_nature",
"核定载客位数": "approved_passenger_capacity",
"核定载质量": "approved_load_mass",
"车辆车轴数": "number_of_vehicle_axles",
"车辆厂牌": "vehicle_brand",
"经营范围": "nature_of_Business",
"车辆营运状态": "vehicle_operation_status",
"客车类型与等级": "bus_type_and_class",
"年审结果": "annual_review_results",
"本次年审日期": "date_of_this_annual_review",
"下次年审日期": "date_of_next_annual_review",
"注册登记日期": "date_of_registration",
"运力来源": "source_of_transportation_capacity",
"有效期起": "from_the_expiry_date",
"有效期止": "expiry_date",
"发动机排量": "engine_displacement",
"发动机号": "engine_number",
"车辆发动机功率": "vehicle_engine_power",
"经营许可证号": "business_license_No",
"车牌颜色": "license_plate_color",
"车辆总质量": "total_vehicle_mass",
"车辆准牵引总质量": "total_quasi_traction_mass_of_vehicle",
"道路运输证号": "road_Transport_Certificate_No",
"车辆车高": "vehicle_height",
"车辆车长": "vehicle_conductor",
"车辆车宽": "vehicle_width",
"车辆类型": "vehicle_type",
"行驶证车辆类型": "vehicle_type_with_driving_license",
"车辆轴距": "vehicle_wheelbase",
"等级评定日期": "rating_date",
"技术评定等级": "technical_evaluation_grade",
"下次等级评定日期": "next_rating_date",
"创建日期": "creation_date"
}

45
scripts/0.0.1/data/工具脚本(无需执行)/运政车辆_数据脚本对应.sql

@ -0,0 +1,45 @@
-- 运政车辆
CREATE TABLE if not exists "municipal_vehicle" ( id serial not null );
CREATE unique index if not exists municipal_vehicle_id_uindex
ON municipal_vehicle (id); alter TABLE municipal_vehicle add constraint municipal_vehicle_pk primary key (id); alter TABLE municipal_vehicle add Name_Of_Business_Owner varchar(1024); comment
ON column municipal_vehicle.Name_Of_Business_Owner is '业户名称'; alter TABLE municipal_vehicle add Product_Name varchar(1024); comment
ON column municipal_vehicle.Product_Name is '品名'; alter TABLE municipal_vehicle add Vehicle_Registry varchar(1024); comment
ON column municipal_vehicle.Vehicle_Registry is '车籍地'; alter TABLE municipal_vehicle add License_Plate_Number varchar(1024); comment
ON column municipal_vehicle.License_Plate_Number is '车牌号'; alter TABLE municipal_vehicle add Fuel_Type varchar(1024); comment
ON column municipal_vehicle.Fuel_Type is '燃料类型'; alter TABLE municipal_vehicle add Address varchar(1024); comment
ON column municipal_vehicle.Address is '住址'; alter TABLE municipal_vehicle add Economic_Nature varchar(1024); comment
ON column municipal_vehicle.Economic_Nature is '经济性质'; alter TABLE municipal_vehicle add Approved_Passenger_Capacity varchar(1024); comment
ON column municipal_vehicle.Approved_Passenger_Capacity is '核定载客位数'; alter TABLE municipal_vehicle add Approved_Load_Mass varchar(1024); comment
ON column municipal_vehicle.Approved_Load_Mass is '核定载质量'; alter TABLE municipal_vehicle add Number_Of_Vehicle_Axles varchar(1024); comment
ON column municipal_vehicle.Number_Of_Vehicle_Axles is '车辆车轴数'; alter TABLE municipal_vehicle add Vehicle_Brand varchar(1024); comment
ON column municipal_vehicle.Vehicle_Brand is '车辆厂牌'; alter TABLE municipal_vehicle add Nature_Of_Business varchar(1024); comment
ON column municipal_vehicle.Nature_Of_Business is '经营范围'; alter TABLE municipal_vehicle add Vehicle_Operation_Status varchar(1024); comment
ON column municipal_vehicle.Vehicle_Operation_Status is '车辆营运状态'; alter TABLE municipal_vehicle add Bus_Type_And_Class varchar(1024); comment
ON column municipal_vehicle.Bus_Type_And_Class is '客车类型与等级'; alter TABLE municipal_vehicle add Annual_Review_Results varchar(1024); comment
ON column municipal_vehicle.Annual_Review_Results is '年审结果'; alter TABLE municipal_vehicle add Date_Of_This_Annual_Review varchar(1024); comment
ON column municipal_vehicle.Date_Of_This_Annual_Review is '本次年审日期'; alter TABLE municipal_vehicle add Date_Of_Next_Annual_Review varchar(1024); comment
ON column municipal_vehicle.Date_Of_Next_Annual_Review is '下次年审日期'; alter TABLE municipal_vehicle add Date_Of_Registration varchar(1024); comment
ON column municipal_vehicle.Date_Of_Registration is '注册登记日期'; alter TABLE municipal_vehicle add Source_Of_Transportation_Capacity varchar(1024); comment
ON column municipal_vehicle.Source_Of_Transportation_Capacity is '运力来源'; alter TABLE municipal_vehicle add From_The_Expiry_Date varchar(1024); comment
ON column municipal_vehicle.From_The_Expiry_Date is '有效期起'; alter TABLE municipal_vehicle add Expiry_Date varchar(1024); comment
ON column municipal_vehicle.Expiry_Date is '有效期止'; alter TABLE municipal_vehicle add Engine_Displacement varchar(1024); comment
ON column municipal_vehicle.Engine_Displacement is '发动机排量'; alter TABLE municipal_vehicle add Engine_Number varchar(1024); comment
ON column municipal_vehicle.Engine_Number is '发动机号'; alter TABLE municipal_vehicle add Vehicle_Engine_Power varchar(1024); comment
ON column municipal_vehicle.Vehicle_Engine_Power is '车辆发动机功率'; alter TABLE municipal_vehicle add Business_License_No varchar(1024); comment
ON column municipal_vehicle.Business_License_No is '经营许可证号'; alter TABLE municipal_vehicle add License_Plate_Color varchar(1024); comment
ON column municipal_vehicle.License_Plate_Color is '车牌颜色'; alter TABLE municipal_vehicle add Total_Vehicle_Mass varchar(1024); comment
ON column municipal_vehicle.Total_Vehicle_Mass is '车辆总质量'; alter TABLE municipal_vehicle add Total_Quasi_Traction_Mass_Of_Vehicle varchar(1024); comment
ON column municipal_vehicle.Total_Quasi_Traction_Mass_Of_Vehicle is '车辆准牵引总质量'; alter TABLE municipal_vehicle add Road_Transport_Certificate_No varchar(1024); comment
ON column municipal_vehicle.Road_Transport_Certificate_No is '道路运输证号'; alter TABLE municipal_vehicle add Vehicle_Height varchar(1024); comment
ON column municipal_vehicle.Vehicle_Height is '车辆车高'; alter TABLE municipal_vehicle add Vehicle_Conductor varchar(1024); comment
ON column municipal_vehicle.Vehicle_Conductor is '车辆车长'; alter TABLE municipal_vehicle add Vehicle_Width varchar(1024); comment
ON column municipal_vehicle.Vehicle_Width is '车辆车宽'; alter TABLE municipal_vehicle add Vehicle_Type varchar(1024); comment
ON column municipal_vehicle.Vehicle_Type is '车辆类型'; alter TABLE municipal_vehicle add Vehicle_Type_With_Driving_License varchar(1024); comment
ON column municipal_vehicle.Vehicle_Type_With_Driving_License is '行驶证车辆类型'; alter TABLE municipal_vehicle add Vehicle_Wheelbase varchar(1024); comment
ON column municipal_vehicle.Vehicle_Wheelbase is '车辆轴距'; alter TABLE municipal_vehicle add Rating_Date varchar(1024); comment
ON column municipal_vehicle.Rating_Date is '等级评定日期'; alter TABLE municipal_vehicle add Technical_Evaluation_Grade varchar(1024); comment
ON column municipal_vehicle.Technical_Evaluation_Grade is '技术评定等级'; alter TABLE municipal_vehicle add Next_Rating_Date varchar(1024); comment
ON column municipal_vehicle.Next_Rating_Date is '下次等级评定日期'; alter TABLE municipal_vehicle add Creation_Date varchar(1024); comment
ON column municipal_vehicle.Creation_Date is '创建日期';

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

@ -0,0 +1,50 @@
{
"routeName": "路线名称",
"routeCode": "路线代码",
"sectionNo": "路段序号",
"townshipCode": "乡镇编码",
"startingPlaceName": "起点地名",
"startStation": "起点桩号",
"categoryOfStartingPointAndDividingPoint": "起点分界点类别",
"stopPlaceName": "止点地名",
"categoryOfDeadCenterAndDividingPoint": "止点分界点类别",
"stopStation": "止点桩号",
"sectionType": "路段类型",
"natureOfRoadSection": "路段性质",
"completionTime": "建成时间",
"gBMAndCivilizedModelRoad": "GBM及文明样板路",
"landforms": "地貌",
"natureOfCharges": "收费性质",
"numberOfCulverts": "涵洞数量",
"technicalLevel": "技术等级",
"pavementType": "路面类型",
"pavementWidth": "路面宽度",
"subgradeWidth": "路基宽度",
"laneCharacteristics": "车道特征",
"whetherItIsOpenToTrafficInSunnyOrRainyDays": "是否晴雨通车",
"designSpeedPerHour": "设计时速",
"urbanManagementSectionOrNot": "是否城管路段",
"managementAndMaintenanceUnit": "管养单位",
"roadAdministrationUnit": "路政管理单位",
"alimentation": "列养情况",
"sourceOfListedMaintenanceFunds": "列养资金来源",
"curingTime": "养护时间",
"greeningMileage": "可绿化里程",
"greeningMileaged": "已绿化里程",
"typeOfRepeatedRoadSection": "重复道路路段类型",
"serialNumberOfRepeatedSection": "重复路段序号",
"repeatedSectionRouteCode": "重复路段路线编码",
"reportingUnit": "填报单位",
"reasonForChange": "变更原因",
"changeTime": "变更时间",
"whetherMaintenanceManagedHighway": "是否按干线公路管理接养",
"remarks": "备注",
"routeCodeOfLastYear": "上年路线编码",
"routeNameOfLastYear": "上年路线名称",
"startingStationOfLastYear": "上年起点桩号",
"lastYearsEndingPointStakeNumber": "上年止点桩号",
"graphicMileage": "图形里程",
"chainageMileage": "桩号里程",
"districtcounty": "所在区县",
"locationCity": "所在地市"
}
Loading…
Cancel
Save