diff --git a/api/app/lib/controllers/organization/user.js b/api/app/lib/controllers/organization/user.js index 798c8a7d..4b7ecb70 100644 --- a/api/app/lib/controllers/organization/user.js +++ b/api/app/lib/controllers/organization/user.js @@ -26,6 +26,28 @@ async function getUser (ctx, next) { } } +async function getUserAll (ctx, next) { + try { + const models = ctx.fs.dc.models; + const userRes = await models.User.findAll({ + where: { + delete: false + }, + attributes: { exclude: ['password', 'delete'] }, + order: [['id', 'asc']], + }) + + ctx.status = 200; + ctx.body = userRes + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + "message": "获取所有用户信息失败" + } + } +} + async function creatUser (ctx, next) { try { const models = ctx.fs.dc.models; @@ -190,6 +212,7 @@ async function setPassword (ctx, next) { module.exports = { getUser, + getUserAll, creatUser, updateUser, deleteUser, diff --git a/api/app/lib/routes/organization/index.js b/api/app/lib/routes/organization/index.js index bdef0265..57cc9ee3 100644 --- a/api/app/lib/routes/organization/index.js +++ b/api/app/lib/routes/organization/index.js @@ -13,6 +13,8 @@ module.exports = function (app, router, opts) { app.fs.api.logAttr['DEL/department/:depId'] = { content: '删除部门信息', visible: false }; router.del('/department/:depId', Department.delDep); + app.fs.api.logAttr['GET/user'] = { content: '获取所有用户信息', visible: false }; + router.get('/user', user.getUserAll); app.fs.api.logAttr['GET/department/:depId/user'] = { content: '获取部门下用户信息', visible: false }; router.get('/department/:depId/user', user.getUser); diff --git a/scripts/0.0.1/data/工具脚本(无需执行)/桥梁_数据字段对应.json b/scripts/0.0.1/data/工具脚本(无需执行)/桥梁_数据字段对应.json index 61edbd6e..71b74a36 100644 --- a/scripts/0.0.1/data/工具脚本(无需执行)/桥梁_数据字段对应.json +++ b/scripts/0.0.1/data/工具脚本(无需执行)/桥梁_数据字段对应.json @@ -1,390 +1,99 @@ { - "bridgeCode": { - "type": "string", - "description": "桥梁代码" - }, - "bridgeName": { - "type": "string", - "description": "桥梁名称" - }, - "centralStation": { - "type": "string", - "description": "中心桩号" - }, - "crossingFigureType": { - "type": "string", - "description": "跨越地物类型" - }, - "crossingFigureName": { - "type": "string", - "description": "跨越地物名称" - }, - "natureOfCharges": { - "type": "string", - "description": "收费性质" - }, - "rampCode": { - "type": "string", - "description": "匝道编码" - }, - "sectionType": { - "type": "string", - "description": "路段类型" - }, - "crossingFigureType1": { - "type": "string", - "description": "跨越地物类型1" - }, - "crossingFigureName1": { - "type": "string", - "description": "跨越地物名称1" - }, - "originalBridgeCode": { - "type": "string", - "description": "原桥梁代码" - }, - "whetherWideRoadAndNarrowBridge": { - "type": "string", - "description": "是否宽路窄桥" - }, - "isItInTheDirectoryOfLongAndLongBridges": { - "type": "string", - "description": "是否在长大桥梁目录中" - }, - "whetherItIsACrossProvincialBridge": { - "type": "string", - "description": "是否跨省桥梁" - }, - "interworkingType": { - "type": "string", - "description": "互通类型" - }, - "interworkingForm": { - "type": "string", - "description": "互通形式" - }, - "interworkingAndCrossoverMode": { - "type": "string", - "description": "互通交叉方式" - }, - "bridgeClassification": { - "type": "string", - "description": "桥梁分类" - }, - "totalLengthOfBridge": { - "type": "string", - "description": "桥梁全长" - }, - "totalSpanLength": { - "type": "string", - "description": "跨径总长" - }, - "mainSpanOfMainBridge": { - "type": "string", - "description": "主桥主跨" - }, - "numberOfMainBridgeHoles": { - "type": "string", - "description": "主桥孔数" - }, - "spanCombination": { - "type": "string", - "description": "跨径组合" - }, - "bridgeProperties": { - "type": "string", - "description": "桥梁性质" - }, - "designLoadClass": { - "type": "string", - "description": "设计荷载等级" - }, - "superstructure": { - "type": "string", - "description": "上部结构" - }, - "superstructureMaterials": { - "type": "string", - "description": "上部结构材料" - }, - "bridgeDeckPavementType": { - "type": "string", - "description": "桥面铺装类型" - }, - "bridgeDeckWidth": { - "type": "string", - "description": "桥面宽" - }, - "clearWidthOfBridgeDeck": { - "type": "string", - "description": "桥面净宽" - }, - "clearanceUnderBridge": { - "type": "string", - "description": "桥下净空" - }, - "seismicGrade": { - "type": "string", - "description": "抗震等级" - }, - "navigationClass": { - "type": "string", - "description": "通航等级" - }, - "abutmentType": { - "type": "string", - "description": "桥台类型" - }, - "pierType": { - "type": "string", - "description": "桥墩类型" - }, - "typesOfPierAndAbutmentAntiCollisionFacilities": { - "type": "string", - "description": "墩台防撞设施类型" - }, - "expansionJointType": { - "type": "string", - "description": "伸缩缝类型" - }, - "supportType": { - "type": "string", - "description": "支座类型" - }, - "characteristicsOfCurvedSlope": { - "type": "string", - "description": "弯坡斜特征" - }, - "bridgeHeight": { - "type": "string", - "description": "桥梁高度" - }, - "sidewalkWidth": { - "type": "string", - "description": "人行道宽度" - }, - "constructionUnit": { - "type": "string", - "description": "建设单位" - }, - "completionTime": { - "type": "string", - "description": "建成时间" - }, - "openingDate": { - "type": "string", - "description": "通车日期" - }, - "reconstructionTime": { - "type": "string", - "description": "改建时间" - }, - "totalCost": { - "type": "string", - "description": "总造价" - }, - "nameOfDesignUnit": { - "type": "string", - "description": "设计单位名称" - }, - "nameOfConstructionUnit": { - "type": "string", - "description": "施工单位名称" - }, - "nameOfSupervisionUnit": { - "type": "string", - "description": "监理单位名称" - }, - "natureOfConstruction": { - "type": "string", - "description": "建设性质" - }, - "evaluationDate": { - "type": "string", - "description": "评定日期" - }, - "technicalConditionEvaluation": { - "type": "string", - "description": "技术状况评定" - }, - "assessmentUnit": { - "type": "string", - "description": "评定单位" - }, - "locationOfMajorDiseases": { - "type": "string", - "description": "主要病害位置" - }, - "diseaseDescription": { - "type": "string", - "description": "病害描述" - }, - "takeControlMeasures": { - "type": "string", - "description": "采取管制措施" - }, - "dateOfLastPeriodicInspection": { - "type": "string", - "description": "最近定期检查日期" - }, - "natureOfManagementAndMaintenanceUnit": { - "type": "string", - "description": "管养单位性质" - }, - "managementAndMaintenanceUnit": { - "type": "string", - "description": "管养单位" - }, - "supervisionUnit": { - "type": "string", - "description": "监管单位" - }, - "reconstructionConstructionUnit": { - "type": "string", - "description": "改造施工单位" - }, - "whetherItIsASubsidyProjectOfTheMinistry": { - "type": "string", - "description": "是否部补助项目" - }, - "engineeringProperties": { - "type": "string", - "description": "工程性质" - }, - "reconstructionPart": { - "type": "string", - "description": "改造部位" - }, - "modificationCompletionDate": { - "type": "string", - "description": "改造完工日期" - }, - "year1": { - "type": "string", - "description": "年份1" - }, - "spanCombination1": { - "type": "string", - "description": "跨径组合1" - }, - "investment1": { - "type": "string", - "description": "投资1" - }, - "year2": { - "type": "string", - "description": "年份2" - }, - "spanCombination2": { - "type": "string", - "description": "跨径组合2" - }, - "investment2": { - "type": "string", - "description": "投资2" - }, - "year3": { - "type": "string", - "description": "年份3" - }, - "spanCombination3": { - "type": "string", - "description": "跨径组合3" - }, - "investment3": { - "type": "string", - "description": "投资3" - }, - "year4": { - "type": "string", - "description": "年份4" - }, - "spanCombination4": { - "type": "string", - "description": "跨径组合4" - }, - "investment4": { - "type": "string", - "description": "投资4" - }, - "year5": { - "type": "string", - "description": "年份5" - }, - "spanCombination5": { - "type": "string", - "description": "跨径组合5" - }, - "investment5": { - "type": "string", - "description": "投资5" - }, - "plannedFundCategory": { - "type": "string", - "description": "计划资金类别" - }, - "plannedYear": { - "type": "string", - "description": "计划年度" - }, - "planDocumentNo": { - "type": "string", - "description": "计划文号" - }, - "planItemUniqueCode": { - "type": "string", - "description": "计划项目唯一编码" - }, - "plannedProjectType": { - "type": "string", - "description": "计划项目类型" - }, - "planProjectName": { - "type": "string", - "description": "计划项目名称" - }, - "completionStatus": { - "type": "string", - "description": "完工情况" - }, - "yearOfCompletion": { - "type": "string", - "description": "完工年度" - }, - "reasonForChange": { - "type": "string", - "description": "变更原因" - }, - "changeTime": { - "type": "string", - "description": "变更时间" - }, - "reportingUnit": { - "type": "string", - "description": "填报单位" - }, - "remarks": { - "type": "string", - "description": "备注" - }, - "whetherOverpassBridge": { - "type": "string", - "description": "是否跨线桥" - }, - "offLineBridgeOrNot": { - "type": "string", - "description": "是否线外桥" - }, - "whetherDangerousBridgeReconstruction": { - "type": "string", - "description": "是否危桥改造" - }, - "districtcounty": { - "type": "string", - "description": "所在区县" - }, - "locationCity": { - "type": "string", - "description": "所在地市" - } + "bridgeCode": "桥梁代码", + "bridgeName": "桥梁名称", + "centralStation": "中心桩号", + "crossingFigureType": "跨越地物类型", + "crossingFigureName": "跨越地物名称", + "natureOfCharges": "收费性质", + "rampCode": "匝道编码", + "sectionType": "路段类型", + "crossingFigureType1": "跨越地物类型1", + "crossingFigureName1": "跨越地物名称1", + "originalBridgeCode": "原桥梁代码", + "whetherWideRoadAndNarrowBridge": "是否宽路窄桥", + "isItInTheDirectoryOfLongAndLongBridges": "是否在长大桥梁目录中", + "whetherItIsACrossProvincialBridge": "是否跨省桥梁", + "interworkingType": "互通类型", + "interworkingForm": "互通形式", + "interworkingAndCrossoverMode": "互通交叉方式", + "bridgeClassification": "桥梁分类", + "totalLengthOfBridge": "桥梁全长", + "totalSpanLength": "跨径总长", + "mainSpanOfMainBridge": "主桥主跨", + "numberOfMainBridgeHoles": "主桥孔数", + "spanCombination": "跨径组合", + "bridgeProperties": "桥梁性质", + "designLoadClass": "设计荷载等级", + "superstructure": "上部结构", + "superstructureMaterials": "上部结构材料", + "bridgeDeckPavementType": "桥面铺装类型", + "bridgeDeckWidth": "桥面宽", + "clearWidthOfBridgeDeck": "桥面净宽", + "clearanceUnderBridge": "桥下净空", + "seismicGrade": "抗震等级", + "navigationClass": "通航等级", + "abutmentType": "桥台类型", + "pierType": "桥墩类型", + "typesOfPierAndAbutmentAntiCollisionFacilities": "墩台防撞设施类型", + "expansionJointType": "伸缩缝类型", + "supportType": "支座类型", + "characteristicsOfCurvedSlope": "弯坡斜特征", + "bridgeHeight": "桥梁高度", + "sidewalkWidth": "人行道宽度", + "constructionUnit": "建设单位", + "completionTime": "建成时间", + "openingDate": "通车日期", + "reconstructionTime": "改建时间", + "totalCost": "总造价", + "nameOfDesignUnit": "设计单位名称", + "nameOfConstructionUnit": "施工单位名称", + "nameOfSupervisionUnit": "监理单位名称", + "natureOfConstruction": "建设性质", + "evaluationDate": "评定日期", + "technicalConditionEvaluation": "技术状况评定", + "assessmentUnit": "评定单位", + "locationOfMajorDiseases": "主要病害位置", + "diseaseDescription": "病害描述", + "takeControlMeasures": "采取管制措施", + "dateOfLastPeriodicInspection": "最近定期检查日期", + "natureOfManagementAndMaintenanceUnit": "管养单位性质", + "managementAndMaintenanceUnit": "管养单位", + "supervisionUnit": "监管单位", + "reconstructionConstructionUnit": "改造施工单位", + "whetherItIsASubsidyProjectOfTheMinistry": "是否部补助项目", + "engineeringProperties": "工程性质", + "reconstructionPart": "改造部位", + "modificationCompletionDate": "改造完工日期", + "year1": "年份1", + "spanCombination1": "跨径组合1", + "investment1": "投资1", + "year2": "年份2", + "spanCombination2": "跨径组合2", + "investment2": "投资2", + "year3": "年份3", + "spanCombination3": "跨径组合3", + "investment3": "投资3", + "year4": "年份4", + "spanCombination4": "跨径组合4", + "investment4": "投资4", + "year5": "年份5", + "spanCombination5": "跨径组合5", + "investment5": "投资5", + "plannedFundCategory": "计划资金类别", + "plannedYear": "计划年度", + "planDocumentNo": "计划文号", + "planItemUniqueCode": "计划项目唯一编码", + "plannedProjectType": "计划项目类型", + "planProjectName": "计划项目名称", + "completionStatus": "完工情况", + "yearOfCompletion": "完工年度", + "reasonForChange": "变更原因", + "changeTime": "变更时间", + "reportingUnit": "填报单位", + "remarks": "备注", + "whetherOverpassBridge": "是否跨线桥", + "offLineBridgeOrNot": "是否线外桥", + "whetherDangerousBridgeReconstruction": "是否危桥改造", + "districtcounty": "所在区县", + "locationCity": "所在地市" } \ No newline at end of file