'use strict'; const patrolRecord = require('../../controllers/patrolManage/patrolRecord'); module.exports = function (app, router, opts) { app.fs.api.logAttr['GET/patrolRecord/:patrolPlanId/:startTime/:endTime/:alarm/:pointId'] = { content: '获取巡检记录', visible: true }; // web端、小程序端查数据:patrolPlanId为all,不需要传pointId // 小程序端查点位最新一条数据:startTime、endTime、alarm不传 router.get('/patrolRecord/:patrolPlanId/:startTime/:endTime/:alarm/:pointId', patrolRecord.findPatrolRecord); app.fs.api.logAttr['GET/patrolRecord/unlicensed'] = { content: '获取巡检记录', visible: true }; // 获取巡检记录,免token,用与生成巡检报告 router.get('/patrolRecord/unlicensed', patrolRecord.findPatrolRecordUnlicensed); app.fs.api.logAttr['GET/patrolRecord/:pointId/cur'] = { content: '获取点位最近巡检记录', visible: true }; router.get('/patrolRecord/:pointId/cur', patrolRecord.findPointCurPatrolRecord); app.fs.api.logAttr['POST/patrolRecord/add'] = { content: '新增巡检记录', visible: true } router.post('/patrolRecord/add', patrolRecord.addPatrolRecord); app.fs.api.logAttr['GET/patrolRecord/issue/handle'] = { content: '获取维修处理计划', visible: true }; router.get('/patrolRecord/issue/handle', patrolRecord.getPatrolRecordIssueHandle) app.fs.api.logAttr['GET/patrolRecord/issue/handle/:id'] = { content: '以id获取维修处理信息', visible: true }; router.get('/patrolRecord/issue/handle/:id', patrolRecord.getPatrolRecordIssueHandleById) app.fs.api.logAttr['POST/patrolRecord/issue/handle'] = { content: '增加维修处理计划', visible: true }; router.post('/patrolRecord/issue/handle', patrolRecord.addPatrolRecordIssueHandle(opts)) // 修改维修处理计划 app.fs.api.logAttr['PUT/patrolRecord/issue/handle/:id'] = { content: '修改维修处理计划', visible: true }; router.put('/patrolRecord/issue/handle/:id', patrolRecord.editPatrolRecordIssueHandle(opts)) //子系统巡检记录 app.fs.api.logAttr['GET/patrolRecord/subSystemPatrolAbout'] = { content: '子系统查询巡检记录', visible: true }; router.get('/patrolRecord/subSystemPatrolAbout', patrolRecord.getSubSystemPatrolAbout(opts)) //故障风险管理-统计接口 app.fs.api.logAttr['GET/patrolRecord/statistic'] = { content: '故障风险统计', visible: true }; router.get('/patrolRecord/statistic', patrolRecord.getPatrolRecordStatistic(opts)) //点位信息 app.fs.api.logAttr['GET/patrolRecord/pointInfo'] = { content: '点位信息', visible: true }; router.get('/patrolRecord/pointInfo', patrolRecord.getPointInfo(opts)) //查询模板 app.fs.api.logAttr['GET/patrolRecord/getTemplate'] = { content: '查询模板', visible: true }; router.get('/patrolRecord/getTemplate', patrolRecord.getTemplate(opts)) //查询模板 app.fs.api.logAttr['POST/patrolRecord/reportQuest'] = { content: '上报问题', visible: true }; router.post('/patrolRecord/reportQuest', patrolRecord.reportQuest(opts)) // 查询子系统每日巡检 app.fs.api.logAttr['GET/subSystemPatrol/day'] = { content: '查询子系统每日巡检', visible: true }; router.get('/subSystemPatrol/day', patrolRecord.getSubSystemPatrol(opts)) // 查询所有的巡检记录 app.fs.api.logAttr['GET/allPatrol'] = { content: '查询所有的巡检记录', visible: true }; router.get('/allPatrol', patrolRecord.getAllPatrol(opts)) };