diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index 1179e13..00a14ce 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -15,7 +15,7 @@ "args": [ "-p 4900", // 研发 - "-g postgres://FashionAdmin:123456@10.8.30.39:5432/ZhongDing", + "-g postgres://postgres:123456@10.8.30.166:5432/XunJian", // 测试 // "--apiEmisUrl http://10.8.30.161:1111", "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", diff --git a/api/app/lib/controllers/projectRegime/projectSituation.js b/api/app/lib/controllers/projectRegime/projectSituation.js index 177c908..375e404 100644 --- a/api/app/lib/controllers/projectRegime/projectSituation.js +++ b/api/app/lib/controllers/projectRegime/projectSituation.js @@ -1,47 +1,21 @@ 'use strict'; -async function getFirmList (ctx, next) { - try { - const models = ctx.fs.dc.models; - const { limit, page, siteId, siteNameKeyword, descKeyword } = ctx.query; - let userInfo = ctx.fs.api.userInfo; - - - let res = await models.Company.findAll({ - where: { - del: false, - }, - attributes: ['id', 'name'], - distinct: true, - - }); - ctx.status = 200; - ctx.body = res - } catch (error) { - ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); - ctx.status = 400; - ctx.body = { - "message": "获取公司列表失败" - } - } -} async function projectList (ctx, next) { try { const models = ctx.fs.dc.models; let userInfo = ctx.fs.api.userInfo; - const { limit, page, companyId, name, type, status } = ctx.query; + const { limit, page, name, justStructure } = ctx.query; let options = { - where: { - del: false, - }, - include: [{ - as: 'company', - model: models.Company, - attributes: ['id', 'name'], - },], - order: [['createTime', 'DESC']], + // where: { + + // }, + // include: [{ + // as: 'company', + // model: models.Company, + // attributes: ['id', 'name'], + // },], } if (limit) { options.limit = Number(limit) @@ -49,95 +23,62 @@ async function projectList (ctx, next) { if (page && limit) { options.offset = Number(page) * Number(limit) } - if (companyId) { - options.where.companyId = companyId - } - if (type) { - options.where.type = type - } if (name) { options.where.name = { $like: `%${name}%` } } - if (status) { - options.where.status = status - } - - let res = await models.Site.findAndCountAll(options) - ctx.status = 200; - ctx.body = res - } catch (error) { - ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); - ctx.status = 400; - ctx.body = { - "message": "获取工程交底列表失败" - } - } -} -async function getUserSiteList (ctx, next) { - try { - const models = ctx.fs.dc.models; - let userSites = ctx.fs.api.userInfo.relateSites;//用户关注工地 - let where = { del: false } - if (userSites && userSites.length) { - where.id = { $in: userSites } - } - let res = await models.Site.findAll({ - where: where, - attributes: ['id', 'name'], - include: { - model: models.Company, + let res = [] + if (justStructure) { + res = await models.Project.findAndCountAll({ attributes: ['id', 'name'], - }, - }); + }) + } else { + res = await models.Project.findAndCountAll(options) + } + ctx.status = 200; ctx.body = res } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; ctx.body = { - "message": "获取用户关注工地列表失败" + "message": "获取结构列表失败" } } } + async function postAddProject (ctx, next) { try { const models = ctx.fs.dc.models; let userInfo = ctx.fs.api.userInfo; const data = ctx.request.body; - const { companyId, address, amount, builder, contractor, createTime, designer, endTime, img, latitude, - longitude, name, peopleInCharge, scale, startTime, supervisor, tel, type, } = data + const { img, longitude, latitude, name, type, describe } = data let errMsg = data.id ? '工程编辑失败' : '工程新增失败' - let project = { - companyId, address, amount, builder, contractor, createTime, designer, endTime, img, latitude, - longitude, name, peopleInCharge, scale, startTime, supervisor, tel, type, del: false, userId: userInfo.id - } + let project = { img, longitude, latitude, name, type, describe, userId: userInfo.id } - const alikeProject = await models.Site.findOne({ + const alikeProject = await models.Project.findOne({ where: { name: name, - del: false, } }) if ((!data.id && alikeProject) || (alikeProject && alikeProject.id !== data.id)) { - errMsg = '已有相同项目名称' + errMsg = '已有相同结构物名称' throw errMsg } if (data && data.id) { - await models.Site.update(project, { + await models.Project.update(project, { where: { id: data.id } }) } else { - await models.Site.create(project) + await models.Project.create(project) } - ctx.status = 204; } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`) @@ -154,50 +95,128 @@ async function delProject (ctx, next) { let userInfo = ctx.fs.api.userInfo; const { id } = ctx.params - await models.Site.destroy({ + await models.Project.destroy({ where: { id, } }) + await models.Point.destroy({ + where: { + projectId: id + } + }) + ctx.status = 204; } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`) ctx.status = 400; ctx.body = { - "message": '删除工程概况失败' + "message": '删除结构物失败' } } } -async function putProjectStatus (ctx, next) { +async function addPosition (ctx, next) { try { const models = ctx.fs.dc.models; - const { id, status } = ctx.request.body; - if (!id || !status) { - errMsg = '必须传入id和status' - throw errMsg + let userInfo = ctx.fs.api.userInfo; + const data = ctx.request.body; + const { longitude, latitude, name, describe, qrCode, projectId, } = data + + let errMsg = data.id ? '点位编辑失败' : '点位新增失败' + let pointData = { longitude, latitude, name, describe, qrCode, projectId } + + const alikeProject = await models.Project.findOne({ + where: { + id: data.id, + } + }) + + if (data && data.id) { + await models.Point.update({ qrCode }, { + where: { + id: data.id, + } + }) + } else { + await models.Point.create(pointData) + } + + + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`) + ctx.status = 400; + ctx.body = { + "message": errMsg + } + } +} + +async function position (ctx, next) { + try { + const models = ctx.fs.dc.models; + let userInfo = ctx.fs.api.userInfo; + const { limit, page, projectId } = ctx.query; + + let options = { + where: { + id: projectId + }, + include: [{ + model: models.Point, + },], + } + if (limit) { + options.limit = Number(limit) + } + if (page && limit) { + options.offset = Number(page) * Number(limit) + } + + let res = await models.Project.findAndCountAll(options) + ctx.status = 200; + ctx.body = res + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + "message": "获取结构列表失败" } - await models.Site.update({ status }, { + } +} + +async function delPosition (ctx, next) { + try { + const models = ctx.fs.dc.models; + let userInfo = ctx.fs.api.userInfo; + const { id } = ctx.params + + + await models.Point.destroy({ where: { - id + id, } }) + ctx.status = 204; } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`) ctx.status = 400; ctx.body = { - "message": '修改项目状态失败' + "message": '删除点位失败' } } } + + module.exports = { - getFirmList, projectList, - getUserSiteList, postAddProject, delProject, - putProjectStatus + addPosition, + position, + delPosition, } \ No newline at end of file diff --git a/api/app/lib/index.js b/api/app/lib/index.js index b661b8a..2cc3d93 100644 --- a/api/app/lib/index.js +++ b/api/app/lib/index.js @@ -13,57 +13,60 @@ const schedule = require('./schedule') // const apiLog = require('./middlewares/api-log'); module.exports.entry = function (app, router, opts) { - app.fs.logger.log('info', '[FS-AUTH]', 'Inject auth and api mv into router.'); + app.fs.logger.log('info', '[FS-AUTH]', 'Inject auth and api mv into router.'); - app.fs.api = app.fs.api || {}; - app.fs.opts = opts || {}; - app.fs.utils = app.fs.utils || {}; - app.fs.api.authAttr = app.fs.api.authAttr || {}; - app.fs.api.logAttr = app.fs.api.logAttr || {}; + app.fs.api = app.fs.api || {}; + app.fs.opts = opts || {}; + app.fs.utils = app.fs.utils || {}; + app.fs.api.authAttr = app.fs.api.authAttr || {}; + app.fs.api.logAttr = app.fs.api.logAttr || {}; - // 顺序固定 ↓ - //redisConnect(app, opts) - socketConect(app, opts) + // 顺序固定 ↓ + //redisConnect(app, opts) + socketConect(app, opts) - // 实例其他平台请求方法 - //paasRequest(app, opts) + // 实例其他平台请求方法 + //paasRequest(app, opts) - // clickHouse 数据库 client - //clickHouseClient(app, opts) + // clickHouse 数据库 client + //clickHouseClient(app, opts) - // 工具类函数 - utils(app, opts) + // 工具类函数 + utils(app, opts) - // 定时任务 - schedule(app, opts) + // 定时任务 + schedule(app, opts) - //鉴权中间件 - router.use(authenticator(app, opts)); + //鉴权中间件 + router.use(authenticator(app, opts)); - // 日志记录 - // router.use(apiLog(app, opts)); + // 日志记录 + // router.use(apiLog(app, opts)); - router = routes(app, router, opts); + router = routes(app, router, opts); }; module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} } - // 模型关系摘出来 初始化之后再定义关系才行 - fs.readdirSync(path.join(__dirname, '/models')).forEach((filename) => { - require(`./models/${filename}`)(dc) - }); + // 模型关系摘出来 初始化之后再定义关系才行 + fs.readdirSync(path.join(__dirname, '/models')).forEach((filename) => { + require(`./models/${filename}`)(dc) + }); - const { Camera, Company, Department, Post, RoleGroup, Role, RoleResource, User, UserDepartment, UserPost, Site, ProjectDisclosure, ProjectDisclosureFiles, Coordinate, ProblemReport, ProblemReportFile, Worker, WorkerAttendance, - RiskReport, Metting, HideDangerRectify, HideDangerRectifySites, HideDangerDispose, UserResource, Resource - } = dc.models; + const { Camera, Company, Department, Post, RoleGroup, Role, RoleResource, User, UserDepartment, UserPost, Site, ProjectDisclosure, ProjectDisclosureFiles, Coordinate, ProblemReport, ProblemReportFile, Worker, WorkerAttendance, + RiskReport, Metting, HideDangerRectify, HideDangerRectifySites, HideDangerDispose, UserResource, Resource, Project, Point + } = dc.models; - UserResource.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' }); - User.hasMany(UserResource, { foreignKey: 'userId', sourceKey: 'id' }); + UserResource.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' }); + User.hasMany(UserResource, { foreignKey: 'userId', sourceKey: 'id' }); - UserResource.belongsTo(Resource, { foreignKey: 'resourceId', targetKey: 'code' }); - Resource.hasMany(UserResource, { foreignKey: 'resourceId', sourceKey: 'code' }); - Resource.hasMany(Resource, { foreignKey: 'parentResource', sourceKey: 'code' }); + UserResource.belongsTo(Resource, { foreignKey: 'resourceId', targetKey: 'code' }); + Resource.hasMany(UserResource, { foreignKey: 'resourceId', sourceKey: 'code' }); + Resource.hasMany(Resource, { foreignKey: 'parentResource', sourceKey: 'code' }); - User.belongsTo(Department, { foreignKey: 'departmentId', targetKey: 'id' }); - Department.hasMany(User, { foreignKey: 'departmentId', sourceKey: 'id' }); + User.belongsTo(Department, { foreignKey: 'departmentId', targetKey: 'id' }); + Department.hasMany(User, { foreignKey: 'departmentId', sourceKey: 'id' }); + + Point.belongsTo(Project, { foreignKey: 'projectId', targetKey: 'id' }); + Project.hasMany(Point, { foreignKey: 'projectId', sourceKey: 'id' }); }; diff --git a/api/app/lib/models/point.js b/api/app/lib/models/point.js new file mode 100644 index 0000000..40c6f9f --- /dev/null +++ b/api/app/lib/models/point.js @@ -0,0 +1,79 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Point = sequelize.define("point", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "point_id_uindex" + }, + projectId: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "project_id", + autoIncrement: false + }, + name: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "name", + autoIncrement: false + }, + longitude: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "longitude", + autoIncrement: false + }, + latitude: { + type: DataTypes.INTEGER, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "latitude", + autoIncrement: false + }, + describe: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "describe", + autoIncrement: false + }, + qrCode: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "qr_code", + autoIncrement: false + }, + }, { + tableName: "point", + comment: "", + indexes: [] + }); + dc.models.Point = Point; + return Point; +}; \ No newline at end of file diff --git a/api/app/lib/models/project.js b/api/app/lib/models/project.js new file mode 100644 index 0000000..347f817 --- /dev/null +++ b/api/app/lib/models/project.js @@ -0,0 +1,97 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Project = sequelize.define("project", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true, + unique: "project_id_uindex" + }, + img: { + type: DataTypes.ARRAY(DataTypes.STRING), + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "img", + autoIncrement: false + }, + userId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "user_id", + autoIncrement: false + }, + name: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: false, + field: "name", + autoIncrement: false + }, + type: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "type", + autoIncrement: false + }, + longitude: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "longitude", + autoIncrement: false + }, + latitude: { + type: DataTypes.DOUBLE, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "latitude", + autoIncrement: false + }, + describe: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "describe", + autoIncrement: false + }, + qrCode: { + type: DataTypes.STRING, + allowNull: true, + defaultValue: null, + comment: null, + primaryKey: false, + field: "qr_code", + autoIncrement: false + }, + }, { + tableName: "project", + comment: "", + indexes: [] + }); + dc.models.Project = Project; + return Project; +}; \ No newline at end of file diff --git a/api/app/lib/models/site.js b/api/app/lib/models/site.js deleted file mode 100644 index ae173c2..0000000 --- a/api/app/lib/models/site.js +++ /dev/null @@ -1,214 +0,0 @@ -/* eslint-disable*/ -'use strict'; - -module.exports = dc => { - const DataTypes = dc.ORM; - const sequelize = dc.orm; - const Site = sequelize.define("site", { - id: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: true, - field: "id", - autoIncrement: true, - unique: "site_id_uindex" - }, - img: { - type: DataTypes.ARRAY(DataTypes.STRING), - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "img", - autoIncrement: false - }, - companyId: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "company_id", - autoIncrement: false - }, - userId: { - type: DataTypes.INTEGER, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "user_id", - autoIncrement: false - }, - name: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "name", - autoIncrement: false - }, - type: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "type", - autoIncrement: false - }, - scale: { - type: DataTypes.JSONB, - allowNull: false, - defaultValue: null, - comment: "规模", - primaryKey: false, - field: "scale", - autoIncrement: false - }, - amount: { - type: DataTypes.JSONB, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "amount", - autoIncrement: false - }, - createTime: { - type: DataTypes.DATE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "create_time", - autoIncrement: false - }, - startTime: { - type: DataTypes.DATE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "start_time", - autoIncrement: false - }, - endTime: { - type: DataTypes.DATE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "end_time", - autoIncrement: false - }, - address: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "address", - autoIncrement: false - }, - longitude: { - type: DataTypes.DOUBLE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "longitude", - autoIncrement: false - }, - latitude: { - type: DataTypes.DOUBLE, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "latitude", - autoIncrement: false - }, - peopleInCharge: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "people_in_charge", - autoIncrement: false - }, - tel: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: null, - comment: null, - primaryKey: false, - field: "tel", - autoIncrement: false - }, - builder: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "建筑单位", - primaryKey: false, - field: "builder", - autoIncrement: false - }, - supervisor: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "监理单位", - primaryKey: false, - field: "supervisor", - autoIncrement: false - }, - contractor: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "施工单位", - primaryKey: false, - field: "contractor", - autoIncrement: false - }, - designer: { - type: DataTypes.STRING, - allowNull: true, - defaultValue: null, - comment: "设计单位", - primaryKey: false, - field: "designer", - autoIncrement: false - }, - del: { - type: DataTypes.BOOLEAN, - allowNull: true, - defaultValue: null, - comment: null, - primaryKey: false, - field: "del", - autoIncrement: false - }, - status: { - type: DataTypes.STRING, - allowNull: false, - defaultValue: "在建", - comment: "项目状态", - primaryKey: false, - field: "status", - autoIncrement: false - } - }, { - tableName: "site", - comment: "", - indexes: [] - }); - dc.models.Site = Site; - return Site; -}; \ No newline at end of file diff --git a/api/app/lib/routes/projectRegime/index.js b/api/app/lib/routes/projectRegime/index.js index 61b3000..e551acb 100644 --- a/api/app/lib/routes/projectRegime/index.js +++ b/api/app/lib/routes/projectRegime/index.js @@ -1,23 +1,25 @@ 'use strict'; const projectSituation = require('../../controllers/projectRegime/projectSituation'); -module.exports = function (app, router, opts) { - app.fs.api.logAttr['GET/firmList'] = { content: '获取公司列表', visible: false }; - router.get('/firmList', projectSituation.getFirmList); +module.exports = function (app, router, opts) { - app.fs.api.logAttr['GET/projectList'] = { content: '获取工程概况列表', visible: false }; + app.fs.api.logAttr['GET/projectList'] = { content: '获取结构物列表', visible: false }; router.get('/projectList', projectSituation.projectList); - app.fs.api.logAttr['GET/user/site/list'] = { content: '获取用户关注工地列表', visible: false }; - router.get('/user/site/list', projectSituation.getUserSiteList); - - app.fs.api.logAttr['POST/addProject'] = { content: '新增修改工程概况', visible: false }; + app.fs.api.logAttr['POST/addProject'] = { content: '新增修改结构物', visible: false }; router.post('/addProject', projectSituation.postAddProject); - app.fs.api.logAttr['DEL/delProject/:id'] = { content: '删除工程概况', visible: false }; + app.fs.api.logAttr['DEL/delProject/:id'] = { content: '删除结构物', visible: false }; router.del('/delProject/:id', projectSituation.delProject); - app.fs.api.logAttr['put/project/status'] = { content: '修改项目状态', visible: false }; - router.put('/project/status', projectSituation.putProjectStatus); + app.fs.api.logAttr['POST/position'] = { content: '新增修改点位', visible: false }; + router.post('/position', projectSituation.addPosition); + + app.fs.api.logAttr['GET/position'] = { content: '获取点位列表', visible: false }; + router.get('/position', projectSituation.position); + + app.fs.api.logAttr['DEL/delPosition/:id'] = { content: '删除点位', visible: false }; + router.del('/delPosition/:id', projectSituation.delPosition); + } \ No newline at end of file diff --git a/api/log/development.log b/api/log/development.log index ddea99a..981072f 100644 --- a/api/log/development.log +++ b/api/log/development.log @@ -3335,3 +3335,517 @@ notNull Violation: camera.online cannot be null 2023-01-13 10:13:19.424 - info: [FS-ATTACHMENT] Inject attachment mw into router. 2023-01-13 10:13:19.424 - info: [FS-AUTH] Inject auth and api mv into router. 2023-01-13 10:16:27.655 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 10:52:23.711 - debug: [FS-LOGGER] Init. +2023-01-13 10:52:24.201 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 10:52:24.202 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 10:53:35.834 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 10:55:05.816 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 10:56:12.629 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:04:45.538 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:04:46.686 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:04:47.804 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:04:55.246 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:05:07.559 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:06:28.447 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:06:45.479 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:06:51.388 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 11:06:58.425 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 13:54:53.951 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 13:55:24.824 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 13:57:28.114 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 13:58:13.714 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:08:05.011 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:09:54.771 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:10:13.681 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:10:40.048 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:27:43.045 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:29:23.830 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:31:22.706 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:31:32.538 - error: path: /projectList, error: SequelizeDatabaseError: 字段 site.status 不存在 +2023-01-13 14:46:46.062 - debug: [FS-LOGGER] Init. +2023-01-13 14:46:47.206 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 14:46:47.207 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 14:46:54.590 - error: path: /logout, error: SequelizeDatabaseError: permission denied for table user_token +2023-01-13 14:47:01.883 - error: [FS-ERRHD] +{ + message: 'transaction is not defined', + stack: 'ReferenceError: transaction is not defined\n' + + ' at login (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:77:9)' +} +2023-01-13 14:48:09.017 - error: [FS-ERRHD] +{ + message: 'transaction is not defined', + stack: 'ReferenceError: transaction is not defined\n' + + ' at login (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:77:9)' +} +2023-01-13 14:48:41.055 - error: [FS-ERRHD] +{ + message: 'transaction is not defined', + stack: 'ReferenceError: transaction is not defined\n' + + ' at login (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\auth\\index.js:77:9)' +} +2023-01-13 14:50:16.536 - debug: [FS-LOGGER] Init. +2023-01-13 14:50:16.800 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 14:50:16.800 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 14:50:27.575 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 14:50:27.581 - error: path: /user/site/list, error: SequelizeEagerLoadingError: company is not associated to site! +2023-01-13 15:06:05.692 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:06:06.887 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:09:43.120 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:09:50.583 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:09:54.170 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:18:49.627 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:50:32.988 - error: path: /firmList, error: SequelizeDatabaseError: relation "company" does not exist +2023-01-13 15:51:42.966 - error: path: /projectList, error: SequelizeEagerLoadingError: company is not associated to site! +2023-01-13 15:57:59.422 - debug: [FS-LOGGER] Init. +2023-01-13 15:57:59.658 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 15:57:59.658 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 16:22:31.025 - debug: [FS-LOGGER] Init. +2023-01-13 16:22:31.283 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 16:22:31.283 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 16:22:32.271 - error: [app] +{ + message: 'getFirmList is not defined', + stack: 'ReferenceError: getFirmList is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:132:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:14)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-13 16:42:22.935 - debug: [FS-LOGGER] Init. +2023-01-13 16:42:23.221 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 16:42:23.222 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 16:42:24.005 - error: [app] +{ + message: 'getFirmList is not defined', + stack: 'ReferenceError: getFirmList is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:132:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:14)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-13 16:53:16.524 - debug: [FS-LOGGER] Init. +2023-01-13 16:53:16.772 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 16:53:16.772 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 16:55:33.750 - error: path: /addProject, error: SequelizeDatabaseError: relation "project" does not exist +2023-01-13 16:55:33.752 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at postAddProject (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:80:21)' +} +2023-01-13 16:55:43.115 - debug: [FS-LOGGER] Init. +2023-01-13 16:55:43.402 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 16:55:43.402 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 16:56:10.793 - error: path: /addProject, error: SequelizeDatabaseError: column project.del does not exist +2023-01-13 16:56:10.796 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at postAddProject (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:80:21)' +} +2023-01-13 16:56:15.288 - debug: [FS-LOGGER] Init. +2023-01-13 16:56:15.581 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 16:56:15.581 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 16:57:53.689 - debug: [FS-LOGGER] Init. +2023-01-13 16:57:54.000 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 16:57:54.000 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-13 17:04:52.478 - debug: [FS-LOGGER] Init. +2023-01-13 17:04:52.834 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-13 17:04:52.834 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 08:41:38.387 - error: path: /addProject, error: SequelizeValidationError: notNull Violation: project.describe cannot be null +2023-01-16 08:41:38.391 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at postAddProject (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:79:21)' +} +2023-01-16 08:42:52.496 - error: path: /addProject, error: SequelizeValidationError: notNull Violation: project.describe cannot be null +2023-01-16 08:42:52.498 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at postAddProject (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:79:21)' +} +2023-01-16 08:47:16.320 - error: path: /addProject, error: SequelizeValidationError: notNull Violation: project.longitude cannot be null, +notNull Violation: project.latitude cannot be null, +notNull Violation: project.describe cannot be null +2023-01-16 08:47:16.322 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at postAddProject (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:79:21)' +} +2023-01-16 08:51:12.059 - error: path: /addProject, error: SequelizeValidationError: notNull Violation: project.longitude cannot be null, +notNull Violation: project.latitude cannot be null, +notNull Violation: project.describe cannot be null +2023-01-16 08:51:12.060 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at postAddProject (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:79:21)' +} +2023-01-16 08:51:36.570 - debug: [FS-LOGGER] Init. +2023-01-16 08:51:39.040 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 08:51:39.052 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 16:09:41.411 - debug: [FS-LOGGER] Init. +2023-01-16 16:09:42.168 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 16:09:42.168 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 18:48:36.959 - debug: [FS-LOGGER] Init. +2023-01-16 18:48:37.331 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 18:48:37.332 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 18:49:50.991 - debug: [FS-LOGGER] Init. +2023-01-16 18:49:51.245 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 18:49:51.246 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 18:50:45.888 - error: path: /delProject/2, error: TypeError: Cannot read property 'destroy' of undefined +2023-01-16 19:01:08.178 - error: path: /delProject/2, error: TypeError: Cannot read property 'destroy' of undefined +2023-01-16 19:03:13.227 - debug: [FS-LOGGER] Init. +2023-01-16 19:03:13.473 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:03:13.473 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:03:14.192 - error: [app] +{ + message: 'middleware must be a function', + stack: 'TypeError: middleware must be a function\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:269:23\n' + + ' at Array.forEach ()\n' + + ' at Koa66.register (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:262:21)\n' + + ' at Koa66. [as put] (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:327:30)\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:17:12)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:44\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:14)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()\n' + + ' at scaffold (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\server.js:12:18)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' + + ' at internal/main/run_main_module.js:17:47' +} +2023-01-16 19:13:17.924 - debug: [FS-LOGGER] Init. +2023-01-16 19:13:18.156 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:13:18.156 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:13:18.866 - error: [app] +{ + message: 'middleware must be a function', + stack: 'TypeError: middleware must be a function\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:269:23\n' + + ' at Array.forEach ()\n' + + ' at Koa66.register (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:262:21)\n' + + ' at Koa66. [as put] (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:327:30)\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:17:12)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:44\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()\n' + + ' at scaffold (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\server.js:12:18)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' + + ' at internal/main/run_main_module.js:17:47' +} +2023-01-16 19:16:25.425 - debug: [FS-LOGGER] Init. +2023-01-16 19:16:25.645 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:16:25.645 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:16:26.316 - error: [app] +{ + message: 'middleware must be a function', + stack: 'TypeError: middleware must be a function\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:269:23\n' + + ' at Array.forEach ()\n' + + ' at Koa66.register (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:262:21)\n' + + ' at Koa66. [as put] (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\koa-66\\index.js:327:30)\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:17:12)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:44\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()\n' + + ' at scaffold (C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:71:16)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\server.js:12:18)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)\n' + + ' at internal/main/run_main_module.js:17:47' +} +2023-01-16 19:32:53.177 - debug: [FS-LOGGER] Init. +2023-01-16 19:32:53.437 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:32:53.437 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:33:58.127 - error: path: /position, error: SequelizeValidationError: notNull Violation: point.qrCode cannot be null +2023-01-16 19:33:58.130 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at addPosition (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:139:21)' +} +2023-01-16 19:34:03.163 - debug: [FS-LOGGER] Init. +2023-01-16 19:34:03.418 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:34:03.419 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:35:09.763 - debug: [FS-LOGGER] Init. +2023-01-16 19:35:10.054 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:35:10.054 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:37:52.954 - debug: [FS-LOGGER] Init. +2023-01-16 19:37:53.197 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:37:53.198 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:50:59.590 - debug: [FS-LOGGER] Init. +2023-01-16 19:50:59.928 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:50:59.929 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 19:51:12.438 - error: path: /delPosition/:id, error: SequelizeDatabaseError: invalid input syntax for type integer: ":id" +2023-01-16 19:52:06.223 - error: path: /delPosition/:id, error: SequelizeDatabaseError: invalid input syntax for type integer: ":id" +2023-01-16 19:59:40.770 - debug: [FS-LOGGER] Init. +2023-01-16 19:59:40.995 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 19:59:40.996 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:02:14.921 - error: path: /position, error: SequelizeDatabaseError: value too long for type character varying(255) +2023-01-16 20:02:14.923 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at addPosition (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:139:21)' +} +2023-01-16 20:02:47.536 - error: path: /position, error: SequelizeDatabaseError: value too long for type character varying(255) +2023-01-16 20:02:47.538 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at addPosition (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:139:21)' +} +2023-01-16 20:03:32.361 - error: path: /position, error: SequelizeDatabaseError: value too long for type character varying(255) +2023-01-16 20:03:32.362 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at addPosition (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:139:21)' +} +2023-01-16 20:04:12.971 - debug: [FS-LOGGER] Init. +2023-01-16 20:04:13.228 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:04:13.228 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:08:50.993 - debug: [FS-LOGGER] Init. +2023-01-16 20:08:51.211 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:08:51.211 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:09:04.532 - error: path: /position, error: Error: Invalid value { id: 1 } +2023-01-16 20:09:04.534 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at addPosition (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:144:21)' +} +2023-01-16 20:10:40.595 - error: path: /position, error: Error: Invalid value { id: 1 } +2023-01-16 20:10:40.597 - error: [FS-ERRHD] +{ + message: 'errMsg is not defined', + stack: 'ReferenceError: errMsg is not defined\n' + + ' at addPosition (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:144:21)' +} +2023-01-16 20:10:44.871 - debug: [FS-LOGGER] Init. +2023-01-16 20:10:45.117 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:10:45.118 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:22:59.211 - debug: [FS-LOGGER] Init. +2023-01-16 20:22:59.471 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:22:59.472 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:40:45.060 - debug: [FS-LOGGER] Init. +2023-01-16 20:40:45.303 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:40:45.304 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:40:46.015 - error: [app] +{ + message: 'structure is not defined', + stack: 'ReferenceError: structure is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:222:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-16 20:42:54.205 - debug: [FS-LOGGER] Init. +2023-01-16 20:42:54.456 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:42:54.456 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:42:55.311 - error: [app] +{ + message: 'structure is not defined', + stack: 'ReferenceError: structure is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:222:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-16 20:43:03.908 - debug: [FS-LOGGER] Init. +2023-01-16 20:43:04.191 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:43:04.191 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:43:05.048 - error: [app] +{ + message: 'structure is not defined', + stack: 'ReferenceError: structure is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:222:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-16 20:43:26.424 - debug: [FS-LOGGER] Init. +2023-01-16 20:43:26.690 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:43:26.690 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:43:27.546 - error: [app] +{ + message: 'structure is not defined', + stack: 'ReferenceError: structure is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:222:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-16 20:44:04.976 - debug: [FS-LOGGER] Init. +2023-01-16 20:44:05.224 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:44:05.224 - info: [FS-AUTH] Inject auth and api mv into router. +2023-01-16 20:44:06.085 - error: [app] +{ + message: 'structure is not defined', + stack: 'ReferenceError: structure is not defined\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\controllers\\projectRegime\\projectSituation.js:222:4)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at Object. (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\projectRegime\\index.js:3:26)\n' + + ' at Module._compile (internal/modules/cjs/loader.js:999:30)\n' + + ' at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)\n' + + ' at Module.load (internal/modules/cjs/loader.js:863:32)\n' + + ' at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n' + + ' at Module.require (internal/modules/cjs/loader.js:887:19)\n' + + ' at require (internal/modules/cjs/helpers.js:74:18)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:11:13\n' + + ' at Array.forEach ()\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:9:57\n' + + ' at Array.forEach ()\n' + + ' at module.exports (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\routes\\index.js:7:30)\n' + + ' at Object.module.exports.entry (C:\\Users\\方式、\\Desktop\\Inspection\\api\\app\\lib\\index.js:46:13)\n' + + ' at C:\\Users\\方式、\\Desktop\\Inspection\\api\\node_modules\\fs-web-server-scaffold\\index.js:74:20\n' + + ' at Array.forEach ()' +} +2023-01-16 20:45:57.174 - debug: [FS-LOGGER] Init. +2023-01-16 20:45:57.417 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2023-01-16 20:45:57.418 - info: [FS-AUTH] Inject auth and api mv into router. diff --git a/api/package-lock.json b/api/package-lock.json index 63a0db5..d2de4d4 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -1106,8 +1106,7 @@ "decamelize": { "version": "1.2.0", "resolved": "http://10.8.30.22:7000/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decompress-response": { "version": "3.3.0", @@ -1225,6 +1224,11 @@ } } }, + "dijkstrajs": { + "version": "1.0.2", + "resolved": "http://10.8.30.22:7000/dijkstrajs/-/dijkstrajs-1.0.2.tgz", + "integrity": "sha1-LkjA07glRir+datK1egpyOzjYlc=" + }, "dottie": { "version": "2.0.2", "resolved": "http://10.8.30.22:7000/dottie/-/dottie-2.0.2.tgz", @@ -1261,6 +1265,11 @@ "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", "dev": true }, + "encode-utf8": { + "version": "1.0.3", + "resolved": "http://10.8.30.22:7000/encode-utf8/-/encode-utf8-1.0.3.tgz", + "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" + }, "encodeurl": { "version": "1.0.2", "resolved": "http://10.8.30.22:7000/encodeurl/-/encodeurl-1.0.2.tgz", @@ -1758,8 +1767,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "http://10.8.30.22:7000/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", - "dev": true + "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=" }, "get-intrinsic": { "version": "1.1.3", @@ -3254,6 +3262,11 @@ "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", "optional": true }, + "nanoid": { + "version": "2.1.11", + "resolved": "http://10.8.30.22:7000/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha1-7CS4p1jVkVYVMbQXagHjq08PAoA=" + }, "napi-build-utils": { "version": "1.0.2", "resolved": "http://10.8.30.22:7000/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -3497,7 +3510,6 @@ "version": "2.3.0", "resolved": "http://10.8.30.22:7000/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=", - "dev": true, "requires": { "p-try": "^2.0.0" } @@ -3514,8 +3526,7 @@ "p-try": { "version": "2.2.0", "resolved": "http://10.8.30.22:7000/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", - "dev": true + "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=" }, "pac-proxy-agent": { "version": "5.0.0", @@ -3720,6 +3731,11 @@ "resolved": "http://10.8.30.22:7000/platform/-/platform-1.3.6.tgz", "integrity": "sha1-SLTOmDFksgnC1FoQetsx9HOm56c=" }, + "pngjs": { + "version": "5.0.0", + "resolved": "http://10.8.30.22:7000/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha1-553SshV2f9nARWHAEjbflgvOf7s=" + }, "postgres-array": { "version": "2.0.0", "resolved": "http://10.8.30.22:7000/postgres-array/-/postgres-array-2.0.0.tgz", @@ -3866,6 +3882,155 @@ "urllib": "^2.34.1" } }, + "qrcode": { + "version": "1.5.1", + "resolved": "http://10.8.30.22:7000/qrcode/-/qrcode-1.5.1.tgz", + "integrity": "sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==", + "requires": { + "dijkstrajs": "^1.0.1", + "encode-utf8": "^1.0.3", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "http://10.8.30.22:7000/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "http://10.8.30.22:7000/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "requires": { + "color-convert": "^2.0.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "http://10.8.30.22:7000/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "cliui": { + "version": "6.0.0", + "resolved": "http://10.8.30.22:7000/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha1-UR1wLAxOQcoVbX0OlgIfI+EyJbE=", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "http://10.8.30.22:7000/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "http://10.8.30.22:7000/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "http://10.8.30.22:7000/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=" + }, + "find-up": { + "version": "4.1.0", + "resolved": "http://10.8.30.22:7000/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha1-l6/n1s3AvFkoWEt8jXsW6KmqXRk=", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "http://10.8.30.22:7000/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "locate-path": { + "version": "5.0.0", + "resolved": "http://10.8.30.22:7000/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha1-Gvujlq/WdqbUJQTQpno6frn2KqA=", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "http://10.8.30.22:7000/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha1-o0KLtwiLOmApL2aRkni3wpetTwc=", + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "http://10.8.30.22:7000/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=" + }, + "string-width": { + "version": "4.2.3", + "resolved": "http://10.8.30.22:7000/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "http://10.8.30.22:7000/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "http://10.8.30.22:7000/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha1-6Tk7oHEC5skaOyIUePAlfNKFblM=", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "http://10.8.30.22:7000/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "http://10.8.30.22:7000/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha1-vmjEl1xrKr9GkjawyHA2L6sJp7A=", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "qs": { "version": "6.11.0", "resolved": "http://10.8.30.22:7000/qs/-/qs-6.11.0.tgz", @@ -4030,14 +4195,12 @@ "require-directory": { "version": "2.1.1", "resolved": "http://10.8.30.22:7000/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", "resolved": "http://10.8.30.22:7000/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", - "dev": true + "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=" }, "resolve-path": { "version": "1.4.0", @@ -4208,6 +4371,14 @@ "resolved": "http://10.8.30.22:7000/shimmer/-/shimmer-1.2.1.tgz", "integrity": "sha1-YQhZ994ye1h+/r9QH7QxF/mv8zc=" }, + "shortid": { + "version": "2.2.16", + "resolved": "http://10.8.30.22:7000/shortid/-/shortid-2.2.16.tgz", + "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", + "requires": { + "nanoid": "^2.1.0" + } + }, "side-channel": { "version": "1.0.4", "resolved": "http://10.8.30.22:7000/side-channel/-/side-channel-1.0.4.tgz", @@ -5087,8 +5258,7 @@ "which-module": { "version": "2.0.0", "resolved": "http://10.8.30.22:7000/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "which-pm-runs": { "version": "1.1.0", @@ -5235,8 +5405,7 @@ "y18n": { "version": "4.0.3", "resolved": "http://10.8.30.22:7000/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha1-tfJZyCzW4zaSHv17/Yv1YN6e7t8=", - "dev": true + "integrity": "sha1-tfJZyCzW4zaSHv17/Yv1YN6e7t8=" }, "yallist": { "version": "3.1.1", diff --git a/api/package.json b/api/package.json index 75708ca..d36da4d 100644 --- a/api/package.json +++ b/api/package.json @@ -33,9 +33,12 @@ "path": "^0.12.7", "path-to-regexp": "^3.0.0", "pg": "^7.9.0", + "qrcode": "^1.5.1", + "qs": "^6.11.0", "redis": "^3.1.2", "request": "^2.88.2", "rimraf": "^2.6.3", + "shortid": "^2.2.16", "superagent": "^3.5.2", "uuid": "^3.3.2" }, diff --git a/script/1.0.0/schema/2.create.project.sql b/script/1.0.0/schema/2.create.project.sql new file mode 100644 index 0000000..fcc2f66 --- /dev/null +++ b/script/1.0.0/schema/2.create.project.sql @@ -0,0 +1,27 @@ +create table project +( + id serial not null + constraint peoject_pk + primary key, + name varchar(255), + type varchar(255), + longitude integer, + latitude integer, + describe varchar(255), + user_id integer, + img character varying[], + qr_code varchar(255) +); + +create table point +( + id serial not null + constraint point_pk + primary key, + name varchar(255), + longitude integer, + latitude integer, + describe varchar(255), + qr_code varchar(255), + project_id integer +); \ No newline at end of file diff --git a/web/client/src/app.js b/web/client/src/app.js index b1073a0..98d351d 100644 --- a/web/client/src/app.js +++ b/web/client/src/app.js @@ -6,6 +6,7 @@ import Auth from './sections/auth'; import Safetymanage from './sections/safetymanage'; import ProjectRegime from './sections/projectRegime'; import Organization from './sections/organization'; +import PatrolManage from './sections/patrolManage'; const App = props => { const { projectName } = props @@ -17,7 +18,7 @@ const App = props => { return ( ) diff --git a/web/client/src/sections/patrolManage/actions/index.js b/web/client/src/sections/patrolManage/actions/index.js new file mode 100644 index 0000000..aaaafe9 --- /dev/null +++ b/web/client/src/sections/patrolManage/actions/index.js @@ -0,0 +1,7 @@ +'use strict'; + +import * as plan from './plan' + +export default { + ...plan, +} \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/actions/plan.js b/web/client/src/sections/patrolManage/actions/plan.js new file mode 100644 index 0000000..cf3d5f8 --- /dev/null +++ b/web/client/src/sections/patrolManage/actions/plan.js @@ -0,0 +1,46 @@ +'use strict'; + +import { basicAction } from '@peace/utils' +import { ApiTable } from '$utils' + +export function getPatrolPlan() { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'GET_PATROL_PLAN', + url: ApiTable.patrolPlan, + msg: { error: '获取巡检计划失败' }, + }); +} + +export function createPatrolPlan(data) { + return dispatch => basicAction({ + type: 'post', + data, + dispatch: dispatch, + actionType: 'CREATE_PATROL_PLAN', + url: ApiTable.patrolPlan, + msg: { error: '新增巡检计划失败' }, + }); +} + +export function delPatrolPlan(id) { + return dispatch => basicAction({ + type: 'del', + dispatch: dispatch, + actionType: 'DEL_PATROL_PLAN', + url: ApiTable.delPatrolPlan.replace('{id}', id), + msg: { error: '删除巡检计划失败' }, + }); +} + +export function updatePatrolPlan(data) { + return dispatch => basicAction({ + type: 'put', + data, + dispatch: dispatch, + actionType: 'UPDATE_PATROL_PLAN', + url: ApiTable.patrolPlan, + msg: { error: '修改巡检计划失败' }, + }); +} \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/components/userModal.js b/web/client/src/sections/patrolManage/components/userModal.js new file mode 100644 index 0000000..f527e73 --- /dev/null +++ b/web/client/src/sections/patrolManage/components/userModal.js @@ -0,0 +1,72 @@ +import { Button, Form, Input, Modal } from 'antd'; +import React, { useState } from 'react'; + +const UserModal = ({ visible, onCreate, onCancel }) => { + const [form] = Form.useForm(); + const reg_tel = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/; + return ( + { + form.resetFields(); + onCancel(); + }} + onOk={() => { + form + .validateFields() + .then((values) => { + form.resetFields(); + onCreate(values); + }) + .catch((info) => { + console.log('Validate Failed:', info); + }); + }} + > +
+ + + + + + + + + +
+
+ ); +}; + +export default UserModal; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/index.js b/web/client/src/sections/patrolManage/containers/index.js new file mode 100644 index 0000000..4121322 --- /dev/null +++ b/web/client/src/sections/patrolManage/containers/index.js @@ -0,0 +1,5 @@ +'use strict'; + +import PatrolPlan from './patrolPlan'; + +export { PatrolPlan }; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/patrolPlan.js b/web/client/src/sections/patrolManage/containers/patrolPlan.js new file mode 100644 index 0000000..2c20320 --- /dev/null +++ b/web/client/src/sections/patrolManage/containers/patrolPlan.js @@ -0,0 +1,131 @@ +import React, { useState, useRef } from 'react'; +import { connect } from 'react-redux'; +import { Button, Popconfirm } from 'antd'; +import ProTable from '@ant-design/pro-table'; +import UserModal from '../components/userModal'; +import { createPatrolPlan, delPatrolPlan, updatePatrolPlan, getPatrolPlan } from '../actions/plan'; + +function PatrolPlan(props) { + const { dispatch, user } = props; + const tableRef = useRef(); + const [dataSource, setDataSource] = useState([{}]); + const [visible, setVisible] = useState(false); + + const onCreate = (values) => { + console.log(values, 'values') + // dispatch(createEarthquakeUser(values)).then(res => { + // if (res.success) { + // tableRef.current.reload(); + // } + // }) + // setVisible(false); + }; + + const columns = [{ + title: '结构物名称', + dataIndex: 'struName', + key: 'struName', + ellipsis: true + }, { + title: '巡检任务名称', + dataIndex: 'name', + key: 'name', + ellipsis: true + }, { + title: '开始时间', + dataIndex: 'startTime', + key: 'startTime', + ellipsis: true, + }, { + title: '结束时间', + dataIndex: 'endTime', + key: 'endTime', + ellipsis: true, + }, { + title: '巡检频次', + dataIndex: 'frequency', + key: 'frequency', + ellipsis: true, + }, { + title: '巡检点位', + dataIndex: 'patrolPoints', + key: 'patrolPoints', + ellipsis: true, + }, { + title: '巡检人', + dataIndex: 'patrolPerson', + key: 'patrolPerson', + ellipsis: true, + render: (_, record) =>
+ }, { + title: '巡检次数统计', + dataIndex: 'patrolCount', + key: 'patrolCount', + ellipsis: true, + }, { + title: '操作', + dataIndex: 'action', + key: 'action', + search: false, + render: (_, record) => { + return <> + + + { + dispatch(delPatrolPlan(record.id)).then(res => { + if (res.success) { + tableRef.current.reload(); + } + }) + }}> + + + + }, + }]; + + return ( + <> + { + const res = await dispatch(getPatrolPlan(params)); + console.log(res, 'res') + setDataSource(res?.payload.data?.rows); + return { ...res }; + }} + onReset={() => { }} + toolBarRender={() => [ + + ]} + /> + { + setVisible(false); + }} + /> + + ) +} + +function mapStateToProps(state) { + const { auth } = state + return { + user: auth.user + } +} +export default connect(mapStateToProps)(PatrolPlan); diff --git a/web/client/src/sections/patrolManage/index.js b/web/client/src/sections/patrolManage/index.js new file mode 100644 index 0000000..fe6ee58 --- /dev/null +++ b/web/client/src/sections/patrolManage/index.js @@ -0,0 +1,15 @@ +'use strict'; + +import reducers from './reducers'; +import routes from './routes'; +import actions from './actions'; +import { getNavItem } from './nav-item'; + +export default { + key: 'patrolManage', + name: '', + reducers: reducers, + routes: routes, + actions: actions, + getNavItem: getNavItem +}; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/nav-item.js b/web/client/src/sections/patrolManage/nav-item.js new file mode 100644 index 0000000..51174e4 --- /dev/null +++ b/web/client/src/sections/patrolManage/nav-item.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Menu } from 'antd'; +import { SettingOutlined } from '@ant-design/icons'; + +const SubMenu = Menu.SubMenu; + +export function getNavItem(user, dispatch) { + // if (!Func.isAuthorized("ORG_MANAGE")) { + // return null + // } + return ( + } title={'巡检管理'}> + + 巡检计划制定 + + + ); +} \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/reducers/index.js b/web/client/src/sections/patrolManage/reducers/index.js new file mode 100644 index 0000000..0203d01 --- /dev/null +++ b/web/client/src/sections/patrolManage/reducers/index.js @@ -0,0 +1,5 @@ +'use strict'; + +export default { + +}; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/routes.js b/web/client/src/sections/patrolManage/routes.js new file mode 100644 index 0000000..e8e874c --- /dev/null +++ b/web/client/src/sections/patrolManage/routes.js @@ -0,0 +1,17 @@ +'use strict'; +import { PatrolPlan } from './containers'; + +export default [{ + type: 'inner', + route: { + path: '/patrolManage', + key: 'patrolManage', + breadcrumb: '巡检管理', + childRoutes: [{ + path: '/patrolPlan', + key: 'patrolPlan', + component: PatrolPlan, + breadcrumb: '巡检计划制定', + }] + } +}]; \ No newline at end of file diff --git a/web/client/src/sections/projectRegime/actions/projectSituation.js b/web/client/src/sections/projectRegime/actions/projectSituation.js index 410bf7e..cf5b3be 100644 --- a/web/client/src/sections/projectRegime/actions/projectSituation.js +++ b/web/client/src/sections/projectRegime/actions/projectSituation.js @@ -3,16 +3,6 @@ import { basicAction } from '@peace/utils' import { ApiTable } from '$utils' -export function getFirmList () { - return dispatch => basicAction({ - type: 'get', - dispatch: dispatch, - actionType: 'GET_FIRM_LIST', - url: `${ApiTable.getFirmList}`, - msg: { error: '获取公司列表失败' }, - reducer: { name: '' } - }); -} export function getProjectList (query) { return (dispatch) => basicAction({ @@ -21,45 +11,68 @@ export function getProjectList (query) { dispatch, actionType: 'GET_PROJEECT_LIST', url: ApiTable.getProjectList, - msg: { error: '获取工程列表失败', }, + msg: { error: '获取结构物列表失败', }, }); } -export function postAddProject (data, decide) { +export function postAddProject (data) { return (dispatch) => basicAction({ type: 'post', data, dispatch, actionType: 'POST_ADD_PROJECT', url: ApiTable.postAddProject, - msg: { option: decide ? '编辑工程' : '新增工程', }, + msg: { option: data?.id ? '编辑结构物' : '新增结构物', }, }); } -export function deleteCoordinate (id) { + + +export function delProject (id) { return (dispatch) => basicAction({ type: 'del', dispatch, - actionType: 'DELETE_COORDINATE_REPORT', - url: ApiTable.delCoordinate.replace('{id}', id), + actionType: 'DEL_PROJECT', + url: ApiTable.delProject.replace('{id}', id), msg: { - option: '删除协调申请', + option: '删除结构物', }, }); } -export function delProject (id) { +export function addPosition (data, point) { + return (dispatch) => basicAction({ + type: 'post', + data, + dispatch, + actionType: 'ADD_POSITION', + url: ApiTable.position, + msg: { option: point ? '二维码生成' : data?.id ? '编辑点位' : '新增点位', }, + }); +} + +export function positionList (query) { + return (dispatch) => basicAction({ + type: 'get', + query, + dispatch, + actionType: 'POSITION_LIST', + url: ApiTable.position, + msg: { error: '获取点位列表失败', }, + }); +} + + +export function delPosition (id) { return (dispatch) => basicAction({ type: 'del', dispatch, - actionType: 'DEL_PROJECT', - url: ApiTable.delProject.replace('{id}', id), + actionType: 'DEL_POSITION', + url: ApiTable.delPosition.replace('{id}', id), msg: { - option: '删除工程概况', + option: '删除点位', }, }); } - - diff --git a/web/client/src/sections/projectRegime/components/projectAddModel.js b/web/client/src/sections/projectRegime/components/projectAddModel.js index 5f5dcd6..1ea607d 100644 --- a/web/client/src/sections/projectRegime/components/projectAddModel.js +++ b/web/client/src/sections/projectRegime/components/projectAddModel.js @@ -26,17 +26,11 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f form.validateFields().then(v => { dispatch(projectRegime.postAddProject({ ...v, - id: modelData?.id, - scale: { scale: v.scale, scaleSuffix: v.scaleSuffix }, - amount: { amount: v.amount, amountSuffix: v.amountSuffix }, img: v.img ? v.img.map(u => u.storageUrl) : [], - createTime: moment().format("YYYY-MM-DD HH:mm:ss"), - startTime: moment(v.time[0]).format("YYYY-MM-DD HH:mm:ss"), - endTime: moment(v.time[1]).format("YYYY-MM-DD HH:mm:ss"), - }, modelData?.id)).then(res => { + id: modelData?.id + })).then(res => { if (res.success) { success() - dispatch(getUserSiteList());//获取工地列表 } }) }) @@ -55,40 +49,48 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f return { storageUrl: s } - }) + }), + describe: modelData?.describe, }} > + rules={[{ required: true, message: '请输入结构物名称' },]} + > + // rules={[{ required: true, message: '请选择结构物类型' },]} + > ~ - + - +