Browse Source

fix 巡检次数统计问题

master
liujiangyong 2 years ago
parent
commit
c1ced224d8
  1. 2
      api/app/lib/controllers/patrolManage/patrolRecord.js

2
api/app/lib/controllers/patrolManage/patrolRecord.js

@ -229,7 +229,7 @@ async function addPatrolRecord (ctx, next) {
where: { patrolPlanId: patrolPlanId } where: { patrolPlanId: patrolPlanId }
}); });
const patrolCount = curPlanRecord.count; const patrolCount = curPlanRecord.count + 1;
await models.PatrolPlan.update({ patrolCount }, { await models.PatrolPlan.update({ patrolCount }, {
where: { id: patrolPlanId }, where: { id: patrolPlanId },
transaction transaction

Loading…
Cancel
Save