|
|
@ -238,6 +238,31 @@ async function getPatrolRecordIssueHandle (ctx) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
async function getPatrolRecordIssueHandleById (ctx) { |
|
|
|
try { |
|
|
|
const { models } = ctx.fs.dc; |
|
|
|
const { id } = ctx.params |
|
|
|
|
|
|
|
const res = await models.PatrolRecordIssueHandle.findOne({ |
|
|
|
where: { |
|
|
|
|
|
|
|
}, |
|
|
|
include: [{ |
|
|
|
model: models.PatrolRecord |
|
|
|
}] |
|
|
|
}) |
|
|
|
|
|
|
|
ctx.status = 200; |
|
|
|
ctx.body = res |
|
|
|
} catch (error) { |
|
|
|
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|
|
|
ctx.status = 400; |
|
|
|
ctx.body = { |
|
|
|
message: typeof error == 'string' ? error : undefined |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 新建维修处理计划成功
|
|
|
|
function addPatrolRecordIssueHandle (opts) { |
|
|
|
return async function (ctx, next) { |
|
|
@ -284,6 +309,7 @@ module.exports = { |
|
|
|
findPatrolRecord, |
|
|
|
addPatrolRecord, |
|
|
|
getPatrolRecordIssueHandle, |
|
|
|
getPatrolRecordIssueHandleById, |
|
|
|
addPatrolRecordIssueHandle, |
|
|
|
editPatrolRecordIssueHandle |
|
|
|
|
|
|
|