From 269ed22bc4dc1ed182a9aaf04d717176881f040d Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期一, 07 八月 2023 14:07:36 +0800
Subject: [PATCH] 获取单个计划
---
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java | 4 +++-
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java | 19 +++++++++++++++++--
ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolplan.java | 22 ++++++++++++++++++++--
ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java | 4 +++-
4 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolplan.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolplan.java
index 8f88fa5..a1598f1 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolplan.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/domain/ArdAppPatrolplan.java
@@ -2,11 +2,15 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
+import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
+import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.List;
/**
* app宸℃璁″垝瀵硅薄 ard_app_patrolplan
@@ -47,17 +51,31 @@
private String patroEndTime;
/**
- * 宸℃鐐�
+ * 宸℃鐐规煡璇㈡潯浠�
*/
@TableField(exist = false,select = false)
+// @JsonInclude(JsonInclude.Include.NON_DEFAULT )
private String wellId;
/**
- * 宸℃浜哄憳
+ * 宸℃浜哄憳鏌ヨ鏉′欢
*/
@TableField(exist = false,select = false)
+// @JsonInclude(JsonInclude.Include.NON_DEFAULT )
private String pUser;
+ /**
+ * 宸℃鐐归泦鍚�
+ */
+ @TableField(exist = false)
+ private List<ArdAlarmpointsWell> wellList;
+
+ /**
+ * 宸℃浜洪泦鍚�
+ */
+ @TableField(exist = false)
+ private List<SysUser> userList;
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java
index 14cf74b..034721b 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatrolplanMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.app.patrolplan.mapper;
import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolplan;
/**
@@ -9,7 +11,7 @@
* @author ard
* @date 2023-08-02
*/
-public interface ArdAppPatrolplanMapper
+public interface ArdAppPatrolplanMapper extends BaseMapper<ArdAppPatrolplan>
{
/**
* 鏌ヨapp宸℃璁″垝
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java
index 43a3980..f9ce7f2 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/mapper/ArdAppPatroluserMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.app.patrolplan.mapper;
import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import org.apache.ibatis.annotations.Param;
@@ -10,7 +12,7 @@
* @author ard
* @date 2023-08-04
*/
-public interface ArdAppPatroluserMapper
+public interface ArdAppPatroluserMapper extends BaseMapper<ArdAppPatroluser>
{
/**
* 鏌ヨapp宸℃璁″垝浜哄憳
diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
index cb661e5..f32ca60 100644
--- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
@@ -6,6 +6,10 @@
import java.util.List;
import java.util.Map;
+import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
+import com.ruoyi.alarmpoints.well.mapper.ArdAlarmpointsWellMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolpoint;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import com.ruoyi.app.patrolplan.mapper.ArdAppPatrolpointMapper;
@@ -15,6 +19,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.utils.result.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -41,6 +46,12 @@
@Resource
private ArdAppPatroluserMapper ardAppPatroluserMapper;
+
+ @Resource
+ private ArdAlarmpointsWellMapper ardAlarmpointsWellMapper;
+
+ @Resource
+ private SysUserMapper sysUserMapper;
/**
* 鏌ヨapp宸℃璁″垝
@@ -156,8 +167,12 @@
@Override
public Results oneById(String id) {
-
- return null;
+ ArdAppPatrolplan ardAppPatrolplan = ardAppPatrolplanMapper.selectById(id);
+ List<ArdAlarmpointsWell> ardAlarmpointsWellList = ardAlarmpointsWellMapper.wellByPlanId(id);
+ List<SysUser> sysUserList = sysUserMapper.userByPlanId(id);
+ ardAppPatrolplan.setUserList(sysUserList);
+ ardAppPatrolplan.setWellList(ardAlarmpointsWellList);
+ return Results.succeed(ardAppPatrolplan);
}
@Override
--
Gitblit v1.9.3