From ac2ab42d45dd7fba0fcc3506c40cea34039f6e9a Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期五, 18 八月 2023 16:20:24 +0800
Subject: [PATCH] 巡检计划打卡前
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/RecordBeforeParam.java | 10 ++++++++++
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolpointRecordService.java | 2 ++
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java | 20 ++++++++++++++++++++
ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java | 10 ++++++++++
4 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java
index 6003c31..018a03b 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java
@@ -306,4 +306,14 @@
return recordService.executeSolo(recordSoloExParam);
}
+ /**
+ * 鍗曞叺绔�--鎵撳崱鍓�
+ */
+ @PreAuthorize("@ss.hasPermi('app:appPatrolplan:recordBefore')")
+ @ApiOperation("鍗曞叺绔�--鎵撳崱鍓�")
+ @PostMapping("recordBefore")
+ public Results recordBefore(@RequestBody RecordBeforeParam recordBeforeParam) throws ParseException {
+ return recordService.recordBefore(recordBeforeParam);
+ }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/RecordBeforeParam.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/RecordBeforeParam.java
new file mode 100644
index 0000000..fa34895
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/RecordBeforeParam.java
@@ -0,0 +1,10 @@
+package com.ruoyi.app.patrolplan.domain.param;
+
+import lombok.Data;
+
+@Data
+public class RecordBeforeParam {
+
+ private String planId;
+ private String wellId;
+}
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolpointRecordService.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolpointRecordService.java
index 5d81105..e75f274 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolpointRecordService.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/IArdAppPatrolpointRecordService.java
@@ -32,4 +32,6 @@
Results executeDetails(RecordDetailsExParam recordDetailsExParam) throws ParseException;
Results executeSolo(RecordSoloExParam recordSoloExParam);
+
+ Results recordBefore(RecordBeforeParam recordBeforeParam);
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
index ffbe056..1cd2ed5 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java
@@ -729,4 +729,24 @@
}
return Results.succeed(jsonArray);
}
+
+ @Override
+ public Results recordBefore(RecordBeforeParam recordBeforeParam) {
+ String planId = recordBeforeParam.getPlanId();
+ String wellId = recordBeforeParam.getWellId();
+ String userId = SecurityUtils.getUserId();
+ JSONArray jsonArray = new JSONArray();
+ ArdAppPatrolplan plan = patrolplanMapper.selectById(planId);
+ jsonArray.add(plan);
+ QueryWrapper<ArdAppPatrolpointRecord> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("plan_id",planId).eq("app_patrolpoints_id",wellId).eq("user_id",userId);
+ ArdAppPatrolpointRecord record = ardAppPatrolpointRecordMapper.selectOne(queryWrapper);
+ //鏍规嵁濮撳悕ID鏌ヨ璁″垝鍒跺畾浜虹殑濮撳悕
+ String planUserId = plan.getUserId();
+ SysUser sysUser = sysUserMapper.selectById(planUserId);
+ String nikeName = sysUser.getNickName();
+ record.setPlanUserName(nikeName);
+ jsonArray.add(record);
+ return Results.succeed(jsonArray);
+ }
}
--
Gitblit v1.9.3