From b9f8999d477f90fb8b0dd509e8252c0704b1f8b2 Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期五, 18 八月 2023 15:41:21 +0800
Subject: [PATCH] 巡检单人详情
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolpointRecord.java | 3 +++
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java | 12 ++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolpointRecord.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolpointRecord.java
index e56d65d..6b99113 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolpointRecord.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolpointRecord.java
@@ -58,6 +58,9 @@
private Integer pointsNum;
@TableField(exist = false)
+ private String planUserName;
+
+ @TableField(exist = false)
private List<String> img;
@Override
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 c777b05..ffbe056 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
@@ -299,10 +299,20 @@
String userId = recordSoloParam.getUserId();
String planName = recordSoloParam.getPlanName();
String userName = recordSoloParam.getUserName();
+ //鏍规嵁璁″垝ID鑾峰彇鍒跺畾浜篒D
+ ArdAppPatrolplan ardAppPatrolplan = patrolplanMapper.selectById(planId);
+ //鏍规嵁濮撳悕ID鏌ヨ璁″垝鍒跺畾浜虹殑濮撳悕
+ String planUserId = ardAppPatrolplan.getUserId();
+ SysUser sysUser = sysUserMapper.selectById(planUserId);
+ String nikeName = sysUser.getNickName();
QueryWrapper<ArdAppPatrolpointRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("plan_id", planId).eq("user_id",userId).like("record_time", toDay);
//褰撳墠璁″垝閫変腑鏃堕棿閲屾鐢ㄦ埛鐨勬墦鍗¤褰�
List<ArdAppPatrolpointRecord> list = ardAppPatrolpointRecordMapper.selectList(queryWrapper);
+ for (int i = 0; i < list.size(); i++) {
+ ArdAppPatrolpointRecord ardAppPatrolpointRecord = list.get(i);
+ ardAppPatrolpointRecord.setPlanUserName(nikeName);
+ }
//鏌ヨ璇ヨ鍒掔殑鎵�鏈夊叴瓒g偣
List<ArdAlarmpointsWell> wellList = wellMapper.wellByPlanId(planId);
if(list.size()==0){
@@ -316,6 +326,7 @@
ardAppPatrolpointRecord.setUserName(userName);
ardAppPatrolpointRecord.setLatitude(String.valueOf(ardAlarmpointsWell.getLatitude()));
ardAppPatrolpointRecord.setLongitude(String.valueOf(ardAlarmpointsWell.getLongitude().toString()));
+ ardAppPatrolpointRecord.setPlanUserName(nikeName);
list.add(ardAppPatrolpointRecord);
}
return Results.succeed(list);
@@ -349,6 +360,7 @@
ardAppPatrolpointRecord.setUserName(userName);
ardAppPatrolpointRecord.setLatitude(String.valueOf(ardAlarmpointsWell.getLatitude()));
ardAppPatrolpointRecord.setLongitude(String.valueOf(ardAlarmpointsWell.getLongitude().toString()));
+ ardAppPatrolpointRecord.setPlanUserName(nikeName);
list.add(ardAppPatrolpointRecord);
}
}
--
Gitblit v1.9.3