From 06d492adf5a5e2ddd816041226068cb78fcd3640 Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期一, 14 八月 2023 11:24:54 +0800
Subject: [PATCH] 巡检单人详情改动
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/ArdAppPatrolpointRecordParam.java | 2 ++
ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 4 ++--
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolpointRecordServiceImpl.java | 13 +++++++++----
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/ArdAppPatrolpointRecordParam.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/ArdAppPatrolpointRecordParam.java
index f616f4f..c776aad 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/ArdAppPatrolpointRecordParam.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/param/ArdAppPatrolpointRecordParam.java
@@ -8,7 +8,9 @@
private String begin;
private String end;
private String planId;
+ private String planName;
private String cycle;
private String toDay;
private String userId;
+ private String userName;
}
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 b9ff8f1..ecd6d16 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
@@ -364,10 +364,15 @@
String toDay = ardAppPatrolpointRecordParam.getToDay();
String planId = ardAppPatrolpointRecordParam.getPlanId();
String userId = ardAppPatrolpointRecordParam.getUserId();
+ String planName = ardAppPatrolpointRecordParam.getPlanName();
+ String userName = ardAppPatrolpointRecordParam.getUserName();
QueryWrapper<ArdAppPatrolpointRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("plan_id", planId).eq("user_id",userId).like("record_time", toDay);
//褰撳墠璁″垝閫変腑鏃堕棿閲屾鐢ㄦ埛鐨勬墦鍗¤褰�
List<ArdAppPatrolpointRecord> list = ardAppPatrolpointRecordMapper.selectList(queryWrapper);
+ if(list.size()==0){
+
+ }
for (ArdAppPatrolpointRecord appPatrolpointRecord : list) {
QueryWrapper<ArdAppPatrolpointRecordImg> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("app_patrolponit_record_id", appPatrolpointRecord.getId());
@@ -394,11 +399,11 @@
ardAppPatrolpointRecord.setAppPatrolpointsId(well);
ardAppPatrolpointRecord.setAppPatrolpointsName(ardAlarmpointsWell.getWellId());
ardAppPatrolpointRecord.setPlanId(planId);
- ardAppPatrolpointRecord.setPlanName(list.get(0).getPlanName());
+ ardAppPatrolpointRecord.setPlanName(planName);
ardAppPatrolpointRecord.setUserId(userId);
- ardAppPatrolpointRecord.setUserName(list.get(0).getUserName());
- ardAppPatrolpointRecord.setLatitude(ardAlarmpointsWell.getLatitude().toString());
- ardAppPatrolpointRecord.setLongitude(ardAlarmpointsWell.getLongitude().toString());
+ ardAppPatrolpointRecord.setUserName(userName);
+ ardAppPatrolpointRecord.setLatitude(String.valueOf(ardAlarmpointsWell.getLatitude()));
+ ardAppPatrolpointRecord.setLongitude(String.valueOf(ardAlarmpointsWell.getLongitude().toString()));
list.add(ardAppPatrolpointRecord);
}
}
diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
index 5f3d1ed..8d14d35 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
@@ -205,7 +205,7 @@
</select>
<select id="wellByPlanId" parameterType="String" resultMap="wellResult">
- select ard_app_patrolpoint.alarmpoints_id as id,ard_alarmpoints_well.well_id, ard_app_patrolpoint."type" from ard_alarmpoints_well LEFT JOIN ard_app_patrolpoint on ard_app_patrolpoint.alarmpoints_id = ard_alarmpoints_well.id where ard_alarmpoints_well.id in (select alarmpoints_id from ard_app_patrolpoint where patrolplan_id = #{id})
- GROUP BY ard_app_patrolpoint.alarmpoints_id,ard_alarmpoints_well.well_id,ard_app_patrolpoint."type"
+ select ard_app_patrolpoint.alarmpoints_id as id,ard_alarmpoints_well.well_id, ard_app_patrolpoint."type",ard_alarmpoints_well.longitude,ard_alarmpoints_well.latitude from ard_alarmpoints_well LEFT JOIN ard_app_patrolpoint on ard_app_patrolpoint.alarmpoints_id = ard_alarmpoints_well.id where ard_alarmpoints_well.id in (select alarmpoints_id from ard_app_patrolpoint where patrolplan_id = #{id})
+ GROUP BY ard_app_patrolpoint.alarmpoints_id,ard_alarmpoints_well.well_id,ard_app_patrolpoint."type",ard_alarmpoints_well.longitude,ard_alarmpoints_well.latitude
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3