wenhongquan 3 年之前
父节点
当前提交
14ca1c5098

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TableDetection.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.List;
+
 /**
  * 检测计划对象 table_detection
  * 
@@ -62,6 +64,16 @@ public class TableDetection extends BaseEntity
     @Excel(name = "扩展字段2")
     private String ext2;
 
+    public List<TblDetectionLog> getDetectionLogs() {
+        return detectionLogs;
+    }
+
+    public void setDetectionLogs(List<TblDetectionLog> detectionLogs) {
+        this.detectionLogs = detectionLogs;
+    }
+
+    private List<TblDetectionLog> detectionLogs;
+
     public void setId(Long id) 
     {
         this.id = id;

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TblFacilities.java

@@ -54,6 +54,27 @@ public class TblFacilities extends BaseEntity
     @Excel(name = "扩展编号1")
     private String exId1;
 
+
+    public String getfLength() {
+        return fLength;
+    }
+
+    public void setfLength(String fLength) {
+        this.fLength = fLength;
+    }
+
+    public String getExt1() {
+        return ext1;
+    }
+
+    public void setExt1(String ext1) {
+        this.ext1 = ext1;
+    }
+
+    private String fLength;
+
+    private String ext1;
+
     public void setId(Long id) 
     {
         this.id = id;

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TblMaintain.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.List;
+
 /**
  * 养护计划对象 tbl_maintain
  * 
@@ -66,6 +68,17 @@ public class TblMaintain extends BaseEntity
     @Excel(name = "关联设施编号")
     private Long facilitiesId;
 
+
+    public List<TblMaintainLog> getMaintainLogs() {
+        return maintainLogs;
+    }
+
+    public void setMaintainLogs(List<TblMaintainLog> maintainLogs) {
+        this.maintainLogs = maintainLogs;
+    }
+
+    private List<TblMaintainLog> maintainLogs;
+
     public void setId(Long id) 
     {
         this.id = id;

+ 14 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TableDetectionServiceImpl.java

@@ -1,6 +1,11 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.system.domain.TblDetectionLog;
+import com.ruoyi.system.domain.TblMaintain;
+import com.ruoyi.system.domain.TblMaintainLog;
+import com.ruoyi.system.service.ITblDetectionLogService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TableDetectionMapper;
@@ -19,6 +24,10 @@ public class TableDetectionServiceImpl implements ITableDetectionService
     @Autowired
     private TableDetectionMapper tableDetectionMapper;
 
+
+    @Autowired
+    private ITblDetectionLogService detectionLogService;
+
     /**
      * 查询检测计划
      * 
@@ -28,7 +37,11 @@ public class TableDetectionServiceImpl implements ITableDetectionService
     @Override
     public TableDetection selectTableDetectionById(Long id)
     {
-        return tableDetectionMapper.selectTableDetectionById(id);
+        TableDetection detection = tableDetectionMapper.selectTableDetectionById(id);
+        TblDetectionLog detectionLog = new TblDetectionLog();
+        detectionLog.setDetectionId(id);
+        detection.setDetectionLogs( detectionLogService.selectTblDetectionLogList(detectionLog));
+        return detection;
     }
 
     /**

+ 13 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TblMaintainServiceImpl.java

@@ -1,6 +1,11 @@
 package com.ruoyi.system.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.system.domain.TblMaintainLog;
+import com.ruoyi.system.domain.TblTask;
+import com.ruoyi.system.domain.TblTaskLog;
+import com.ruoyi.system.service.ITblMaintainLogService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.TblMaintainMapper;
@@ -19,6 +24,9 @@ public class TblMaintainServiceImpl implements ITblMaintainService
     @Autowired
     private TblMaintainMapper tblMaintainMapper;
 
+    @Autowired
+    private ITblMaintainLogService tblMaintainLogService;
+
     /**
      * 查询养护计划
      * 
@@ -28,7 +36,11 @@ public class TblMaintainServiceImpl implements ITblMaintainService
     @Override
     public TblMaintain selectTblMaintainById(Long id)
     {
-        return tblMaintainMapper.selectTblMaintainById(id);
+        TblMaintain maintain = tblMaintainMapper.selectTblMaintainById(id);
+        TblMaintainLog maintainLog = new TblMaintainLog();
+        maintainLog.setMaintainId(id);
+        maintain.setMaintainLogs( tblMaintainLogService.selectTblMaintainLogList(maintainLog));
+        return maintain;
     }
 
     /**

+ 12 - 1
ruoyi-system/src/main/resources/mapper/system/TblFacilitiesMapper.xml

@@ -15,10 +15,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="addrFrom"    column="addr_from"    />
         <result property="addrEnd"    column="addr_end"    />
         <result property="exId1"    column="ex_id_1"    />
+
+        <result property="fLength"    column="f_length"    />
+        <result property="ext1"    column="ext1"    />
     </resultMap>
 
     <sql id="selectTblFacilitiesVo">
-        select id, area_des, area_ad_des, ex_id, name, road_name, nature, addr_from, addr_end, ex_id_1 from tbl_facilities
+        select id, area_des, area_ad_des, ex_id, name, road_name, nature, addr_from, addr_end, ex_id_1,ext1,f_length from tbl_facilities
     </sql>
 
     <select id="selectTblFacilitiesList" parameterType="TblFacilities" resultMap="TblFacilitiesResult">
@@ -33,6 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="addrFrom != null  and addrFrom != ''"> and addr_from = #{addrFrom}</if>
             <if test="addrEnd != null  and addrEnd != ''"> and addr_end = #{addrEnd}</if>
             <if test="exId1 != null  and exId1 != ''"> and ex_id_1 = #{exId1}</if>
+            <if test="fLength != null  and fLength != ''"> and fLength = #{f_length}</if>
+            <if test="ext1 != null  and ext1 != ''"> and ext1 = #{ext1}</if>
         </where>
     </select>
     
@@ -53,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="addrFrom != null">addr_from,</if>
             <if test="addrEnd != null">addr_end,</if>
             <if test="exId1 != null">ex_id_1,</if>
+            <if test="fLength != null">f_length,</if>
+            <if test="ext1 != null">ext1,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="areaDes != null">#{areaDes},</if>
@@ -64,6 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="addrFrom != null">#{addrFrom},</if>
             <if test="addrEnd != null">#{addrEnd},</if>
             <if test="exId1 != null">#{exId1},</if>
+            <if test="fLength != null">#{fLength},</if>
+            <if test="ext1 != null">#{ext1},</if>
          </trim>
     </insert>
 
@@ -79,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="addrFrom != null">addr_from = #{addrFrom},</if>
             <if test="addrEnd != null">addr_end = #{addrEnd},</if>
             <if test="exId1 != null">ex_id_1 = #{exId1},</if>
+            <if test="fLength != null">f_length = #{fLength},</if>
+            <if test="ext1 != null">ext1 = #{ext1},</if>
         </trim>
         where id = #{id}
     </update>