Kaynağa Gözat

联锁基础一二级树状结构;联锁总表分页查询;

LLL 9 ay önce
ebeveyn
işleme
97504fcc18
15 değiştirilmiş dosya ile 310 ekleme ve 22 silme
  1. 27 0
      jeecg-module-interlock/pom.xml
  2. 41 5
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/controller/InterlockBaseController.java
  3. 41 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/convert/InterlockBaseConvert.java
  4. 3 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/mapper/InterlockBaseMapper.java
  5. 8 1
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/mapper/xml/InterlockBaseMapper.xml
  6. 7 4
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/service/IInterlockBaseService.java
  7. 14 4
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/service/impl/InterlockBaseServiceImpl.java
  8. 46 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/base/vo/InterlockBaseTreeVO.java
  9. 20 7
      jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/controller/InterlockDetailController.java
  10. 4 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/entity/InterlockDetail.java
  11. 7 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/InterlockDetailMapper.java
  12. 16 1
      jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/xml/InterlockDetailMapper.xml
  13. 7 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/service/IInterlockDetailService.java
  14. 14 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/service/impl/InterlockDetailServiceImpl.java
  15. 55 0
      jeecg-module-interlock/src/main/java/org/jeecg/modules/summary/vo/InterlockSummaryVO.java

+ 27 - 0
jeecg-module-interlock/pom.xml

@@ -14,13 +14,40 @@
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
         <maven.compiler.target>8</maven.compiler.target>
+
+        <!-- mapstruct版本依赖 -->
+        <mapstruct.version>1.4.2.Final</mapstruct.version>
     </properties>
 
     <dependencies>
+
         <dependency>
             <groupId>org.jeecgframework.boot</groupId>
             <artifactId>jeecg-boot-base-core</artifactId>
         </dependency>
+
+        <!--  mapstruct      -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok-mapstruct-binding</artifactId>
+            <version>0.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct</artifactId>
+            <version>${mapstruct.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct-processor</artifactId>
+            <version>${mapstruct.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>jeecg-system-biz</artifactId>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 41 - 5
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/controller/InterlockBaseController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.base.controller;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -13,6 +14,7 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.common.system.vo.SelectTreeModel;
+import org.jeecg.modules.base.convert.InterlockBaseConvert;
 import org.jeecg.modules.base.entity.InterlockBase;
 import org.jeecg.modules.base.service.IInterlockBaseService;
 
@@ -21,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
+import org.jeecg.modules.base.vo.InterlockBaseTreeVO;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -51,6 +54,39 @@ public class InterlockBaseController extends JeecgController<InterlockBase, IInt
 	@Autowired
 	private IInterlockBaseService interlockBaseService;
 
+	/**查一二级树形结构*/
+	@ApiOperation("一二级树形结构")
+	@GetMapping(value = "/lever12")
+	public List<InterlockBaseTreeVO> getTree12(){
+		InterlockBase interlockBase = new InterlockBase();
+		interlockBase.setInterlockType("0");//0装置1系统2联锁
+		QueryWrapper<InterlockBase> zzqueryWrapper = new QueryWrapper<>(interlockBase);
+		List<InterlockBase> zzlist = interlockBaseService.list(zzqueryWrapper);
+
+		interlockBase.setInterlockType("1");//0装置1系统2联锁
+		QueryWrapper<InterlockBase> xtqueryWrapper = new QueryWrapper<>(interlockBase);
+		List<InterlockBase> xtlist = interlockBaseService.list(xtqueryWrapper);
+
+		List<InterlockBaseTreeVO> list = new ArrayList<>();
+
+		for (InterlockBase interlockBase1 : zzlist){
+			//1是0否
+			List<InterlockBaseTreeVO> children = new ArrayList<>();
+			if(interlockBase1.getHasChild()!=null && interlockBase1.getHasChild().equals("1")){
+				for (InterlockBase interlockBase2 : xtlist){
+					if(interlockBase2.getPid().equals(interlockBase1.getId())){
+						InterlockBaseTreeVO vo = InterlockBaseConvert.INSTANCE.convertToInterlockBaseTreeVO2(interlockBase2,null);
+						children.add(vo);
+					}
+				}
+			}
+			InterlockBaseTreeVO vo = InterlockBaseConvert.INSTANCE.convertToInterlockBaseTreeVO2(interlockBase1,children);
+			list.add(vo);
+		}
+		return list;
+	}
+
+
 	/**
 	 * 分页列表查询
 	 *
@@ -191,7 +227,7 @@ public class InterlockBaseController extends JeecgController<InterlockBase, IInt
             return Result.error("批量查询子节点失败:" + e.getMessage());
         }
     }
-	
+
 	/**
 	 *   添加
 	 *
@@ -206,7 +242,7 @@ public class InterlockBaseController extends JeecgController<InterlockBase, IInt
 		interlockBaseService.addInterlockBase(interlockBase);
 		return Result.OK("添加成功!");
 	}
-	
+
 	/**
 	 *  编辑
 	 *
@@ -221,7 +257,7 @@ public class InterlockBaseController extends JeecgController<InterlockBase, IInt
 		interlockBaseService.updateInterlockBase(interlockBase);
 		return Result.OK("编辑成功!");
 	}
-	
+
 	/**
 	 *   通过id删除
 	 *
@@ -236,7 +272,7 @@ public class InterlockBaseController extends JeecgController<InterlockBase, IInt
 		interlockBaseService.deleteInterlockBase(id);
 		return Result.OK("删除成功!");
 	}
-	
+
 	/**
 	 *  批量删除
 	 *
@@ -251,7 +287,7 @@ public class InterlockBaseController extends JeecgController<InterlockBase, IInt
 		this.interlockBaseService.removeByIds(Arrays.asList(ids.split(",")));
 		return Result.OK("批量删除成功!");
 	}
-	
+
 	/**
 	 * 通过id查询
 	 *

+ 41 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/convert/InterlockBaseConvert.java

@@ -0,0 +1,41 @@
+package org.jeecg.modules.base.convert;
+
+import org.jeecg.modules.base.entity.InterlockBase;
+import org.jeecg.modules.base.vo.InterlockBaseTreeVO;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 功能描述
+ *
+ * @author: nn
+ * @date: 2024年05月24日 10:40
+ */
+
+@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE,imports ={ CollectionUtils.class, Collectors.class})
+public interface InterlockBaseConvert {
+
+    InterlockBaseConvert INSTANCE = Mappers.getMapper(InterlockBaseConvert.class);
+
+    @Mapping(target ="id",source ="interlockBase.id")
+    @Mapping(target ="interlockType",source ="interlockBase.interlockType")
+    @Mapping(target ="interlockName",source ="interlockBase.interlockName")
+    @Mapping(target ="pid",source ="interlockBase.pid")
+    @Mapping(target ="hasChild",source ="interlockBase.hasChild")
+    InterlockBaseTreeVO convertToInterlockBaseTreeVO1(InterlockBase interlockBase);
+
+    @Mapping(target ="id",source ="interlockBase.id")
+    @Mapping(target ="interlockType",source ="interlockBase.interlockType")
+    @Mapping(target ="interlockName",source ="interlockBase.interlockName")
+    @Mapping(target ="pid",source ="interlockBase.pid")
+    @Mapping(target ="hasChild",source ="interlockBase.hasChild")
+    @Mapping(target ="children",source ="children")
+    InterlockBaseTreeVO convertToInterlockBaseTreeVO2(InterlockBase interlockBase, List<InterlockBaseTreeVO> children);
+
+}

+ 3 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/mapper/InterlockBaseMapper.java

@@ -16,6 +16,9 @@ import java.util.Map;
  */
 public interface InterlockBaseMapper extends BaseMapper<InterlockBase> {
 
+	/**查一二级树形结构*/
+	public List<InterlockBase> getLevel(InterlockBase interlockBase);
+
 	/**
 	 * 编辑节点状态
 	 * @param id

+ 8 - 1
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/mapper/xml/InterlockBaseMapper.xml

@@ -2,6 +2,13 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.base.mapper.InterlockBaseMapper">
 
+	<!-- 查一二级树形结构 -->
+	<select id="getLevel" parameterType="org.jeecg.modules.base.entity.InterlockBase" resultType="org.jeecg.modules.base.entity.InterlockBase">
+		select id, interlock_type, interlock_name, pid, has_child
+		from interlock_base
+		where interlock_type = #{interlockType}
+	</select>
+
 	<update id="updateTreeNodeStatus" parameterType="java.lang.String">
 		update interlock_base set has_child = #{status} where id = #{id}
 	</update>
@@ -22,4 +29,4 @@
 		</if>
 	</select>
 
-</mapper>
+</mapper>

+ 7 - 4
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/service/IInterlockBaseService.java

@@ -15,12 +15,15 @@ import java.util.List;
  */
 public interface IInterlockBaseService extends IService<InterlockBase> {
 
+	/**查一二级树形结构*/
+	public List<InterlockBase> getLevel(InterlockBase interlockBase);
+
 	/**根节点父ID的值*/
 	public static final String ROOT_PID_VALUE = "0";
-	
+
 	/**树节点有子节点状态值*/
 	public static final String HASCHILD = "1";
-	
+
 	/**树节点无子节点状态值*/
 	public static final String NOCHILD = "0";
 
@@ -30,7 +33,7 @@ public interface IInterlockBaseService extends IService<InterlockBase> {
 	 * @param interlockBase
 	 */
 	void addInterlockBase(InterlockBase interlockBase);
-	
+
 	/**
    * 修改节点
    *
@@ -38,7 +41,7 @@ public interface IInterlockBaseService extends IService<InterlockBase> {
    * @throws JeecgBootException
    */
 	void updateInterlockBase(InterlockBase interlockBase) throws JeecgBootException;
-	
+
 	/**
 	 * 删除节点
 	 *

+ 14 - 4
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/service/impl/InterlockBaseServiceImpl.java

@@ -7,6 +7,7 @@ import org.jeecg.common.system.vo.SelectTreeModel;
 import org.jeecg.modules.base.entity.InterlockBase;
 import org.jeecg.modules.base.mapper.InterlockBaseMapper;
 import org.jeecg.modules.base.service.IInterlockBaseService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.springframework.transaction.annotation.Transactional;
@@ -25,7 +26,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class InterlockBaseServiceImpl extends ServiceImpl<InterlockBaseMapper, InterlockBase> implements IInterlockBaseService {
 
-	@Override
+    @Autowired
+    @SuppressWarnings("all")
+    private InterlockBaseMapper interlockBaseMapper;
+
+    /**查一二级树形结构*/
+    public List<InterlockBase> getLevel(InterlockBase interlockBase){
+        return interlockBaseMapper.getLevel(interlockBase);
+    }
+
+    @Override
 	public void addInterlockBase(InterlockBase interlockBase) {
 	   //新增时设置hasChild为0
 	    interlockBase.setHasChild(IInterlockBaseService.NOCHILD);
@@ -41,7 +51,7 @@ public class InterlockBaseServiceImpl extends ServiceImpl<InterlockBaseMapper, I
 		}
 		baseMapper.insert(interlockBase);
 	}
-	
+
 	@Override
 	public void updateInterlockBase(InterlockBase interlockBase) {
 		InterlockBase entity = this.getById(interlockBase.getId());
@@ -61,7 +71,7 @@ public class InterlockBaseServiceImpl extends ServiceImpl<InterlockBaseMapper, I
 		}
 		baseMapper.updateById(interlockBase);
 	}
-	
+
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public void deleteInterlockBase(String id) throws JeecgBootException {
@@ -99,7 +109,7 @@ public class InterlockBaseServiceImpl extends ServiceImpl<InterlockBaseMapper, I
             baseMapper.deleteById(id);
         }
 	}
-	
+
 	@Override
     public List<InterlockBase> queryTreeListNoPage(QueryWrapper<InterlockBase> queryWrapper) {
         List<InterlockBase> dataList = baseMapper.selectList(queryWrapper);

+ 46 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/base/vo/InterlockBaseTreeVO.java

@@ -0,0 +1,46 @@
+package org.jeecg.modules.base.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.util.List;
+
+/**
+ * 功能描述
+ *
+ * @author: nn
+ * @date: 2024年05月24日 9:38
+ */
+@Data
+public class InterlockBaseTreeVO {
+
+    /**主键*/
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private java.lang.String id;
+    /**类型*/
+    @Excel(name = "类型", width = 15, dicCode = "interlock_type")
+    @Dict(dicCode = "interlock_type")
+    @ApiModelProperty(value = "类型")
+    private java.lang.String interlockType;
+    /**名称*/
+    @Excel(name = "名称", width = 15)
+    @ApiModelProperty(value = "名称")
+    private java.lang.String interlockName;
+    /**父级节点*/
+    @Excel(name = "父级节点", width = 15)
+    @ApiModelProperty(value = "父级节点")
+    private java.lang.String pid;
+    /**是否有子节点*/
+    @Excel(name = "是否有子节点", width = 15, dicCode = "yn")
+    @Dict(dicCode = "yn")
+    @ApiModelProperty(value = "是否有子节点")
+    private java.lang.String hasChild;
+
+    List<InterlockBaseTreeVO> children;
+
+}

+ 20 - 7
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/controller/InterlockDetailController.java

@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 
+import org.jeecg.modules.summary.vo.InterlockSummaryVO;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -42,14 +43,26 @@ import org.jeecg.common.aspect.annotation.AutoLog;
  * @Date:   2024-05-23
  * @Version: V1.0
  */
-@Api(tags="联锁详细信息表")
+@Api(tags=".联锁详细信息表")
 @RestController
 @RequestMapping("/detail/interlockDetail")
 @Slf4j
 public class InterlockDetailController extends JeecgController<InterlockDetail, IInterlockDetailService> {
 	@Autowired
 	private IInterlockDetailService interlockDetailService;
-	
+
+	/**联锁总表-分页列表查询(各种逻辑状态)*/
+	 @ApiOperation(value="联锁总表-分页列表查询(各种逻辑状态)", notes="联锁总表-分页列表查询(各种逻辑状态)")
+	 @GetMapping(value = "/list1")
+	 public Result<IPage<InterlockSummaryVO>> queryPageList(InterlockSummaryVO vo,
+															@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+															@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+															HttpServletRequest req) {
+		 Page<InterlockSummaryVO> page = new Page<InterlockSummaryVO>(pageNo, pageSize);
+		 IPage<InterlockSummaryVO> pageList = interlockDetailService.getPage(page, vo);
+		 return Result.OK(pageList);
+	 }
+
 	/**
 	 * 分页列表查询
 	 *
@@ -71,7 +84,7 @@ public class InterlockDetailController extends JeecgController<InterlockDetail,
 		IPage<InterlockDetail> pageList = interlockDetailService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}
-	
+
 	/**
 	 *   添加
 	 *
@@ -86,7 +99,7 @@ public class InterlockDetailController extends JeecgController<InterlockDetail,
 		interlockDetailService.save(interlockDetail);
 		return Result.OK("添加成功!");
 	}
-	
+
 	/**
 	 *  编辑
 	 *
@@ -101,7 +114,7 @@ public class InterlockDetailController extends JeecgController<InterlockDetail,
 		interlockDetailService.updateById(interlockDetail);
 		return Result.OK("编辑成功!");
 	}
-	
+
 	/**
 	 *   通过id删除
 	 *
@@ -116,7 +129,7 @@ public class InterlockDetailController extends JeecgController<InterlockDetail,
 		interlockDetailService.removeById(id);
 		return Result.OK("删除成功!");
 	}
-	
+
 	/**
 	 *  批量删除
 	 *
@@ -131,7 +144,7 @@ public class InterlockDetailController extends JeecgController<InterlockDetail,
 		this.interlockDetailService.removeByIds(Arrays.asList(ids.split(",")));
 		return Result.OK("批量删除成功!");
 	}
-	
+
 	/**
 	 * 通过id查询
 	 *

+ 4 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/entity/InterlockDetail.java

@@ -109,6 +109,10 @@ public class InterlockDetail implements Serializable {
 	@Excel(name = "时间单位", width = 15)
     @ApiModelProperty(value = "时间单位")
     private java.lang.String thresholdTimeUnit;
+    /**控制系统状态*/
+    @Excel(name = "控制系统状态", width = 15)
+    @ApiModelProperty(value = "控制系统状态")
+    private java.lang.String controlSystemStatus;
 	/**联锁设定值*/
 	@Excel(name = "联锁设定值", width = 15)
     @ApiModelProperty(value = "联锁设定值")

+ 7 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/InterlockDetailMapper.java

@@ -2,9 +2,13 @@ package org.jeecg.modules.detail.mapper;
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.detail.entity.InterlockDetail;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.summary.vo.InterlockSummaryVO;
 
 /**
  * @Description: 联锁详细信息表
@@ -14,4 +18,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface InterlockDetailMapper extends BaseMapper<InterlockDetail> {
 
+    /**联锁总表-分页列表查询(各种逻辑状态)*/
+    IPage<InterlockSummaryVO> getPage(Page<InterlockSummaryVO> page, @Param("interlockSummaryVO") InterlockSummaryVO interlockSummaryVO);
+
 }

+ 16 - 1
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/xml/InterlockDetailMapper.xml

@@ -2,4 +2,19 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.detail.mapper.InterlockDetailMapper">
 
-</mapper>
+    <!-- 联锁总表-分页列表查询(各种逻辑状态)-->
+    <select id="getPage" parameterType="org.jeecg.modules.summary.vo.InterlockSummaryVO" resultType="org.jeecg.modules.summary.vo.InterlockSummaryVO">
+        select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.instrument_status, d.control_system_status,
+               s.interlock_status, s.loop_health_level
+        from interlock_detail d left join interlock_summary s on d.summaryid = s.id
+        <where>
+            <if test="interlockSummaryVO.interlockname != null and interlockSummaryVO.interlockname != ''"> and d.interlockname = #{interlockSummaryVO.interlockname}</if>
+            <if test="interlockSummaryVO.interlockCondition != null and interlockSummaryVO.interlockCondition != ''"> and d.interlock_condition = #{interlockSummaryVO.interlockCondition}</if>
+            <if test="interlockSummaryVO.instrumentStatus != null and interlockSummaryVO.instrumentStatus != ''"> and d.instrument_status = #{interlockSummaryVO.instrumentStatus}</if>
+            <if test="interlockSummaryVO.controlSystemStatus != null and interlockSummaryVO.controlSystemStatus != ''"> and d.control_system_status = #{interlockSummaryVO.controlSystemStatus}</if>
+            <if test="interlockSummaryVO.interlockStatus != null and interlockSummaryVO.interlockStatus != ''"> and d.interlock_status = #{interlockSummaryVO.interlockStatus}</if>
+            <if test="interlockSummaryVO.loopHealthLevel != null and interlockSummaryVO.loopHealthLevel != ''"> and d.loop_health_level = #{interlockSummaryVO.loopHealthLevel}</if>
+        </where>
+    </select>
+
+</mapper>

+ 7 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/service/IInterlockDetailService.java

@@ -1,7 +1,10 @@
 package org.jeecg.modules.detail.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.modules.detail.entity.InterlockDetail;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.summary.vo.InterlockSummaryVO;
 
 /**
  * @Description: 联锁详细信息表
@@ -11,4 +14,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IInterlockDetailService extends IService<InterlockDetail> {
 
+
+    /**联锁总表-分页列表查询(各种逻辑状态)*/
+    public IPage<InterlockSummaryVO> getPage(Page<InterlockSummaryVO> page, InterlockSummaryVO empInfo);
+
 }

+ 14 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/service/impl/InterlockDetailServiceImpl.java

@@ -1,8 +1,12 @@
 package org.jeecg.modules.detail.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.modules.detail.entity.InterlockDetail;
 import org.jeecg.modules.detail.mapper.InterlockDetailMapper;
 import org.jeecg.modules.detail.service.IInterlockDetailService;
+import org.jeecg.modules.summary.vo.InterlockSummaryVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,4 +20,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class InterlockDetailServiceImpl extends ServiceImpl<InterlockDetailMapper, InterlockDetail> implements IInterlockDetailService {
 
+    @Autowired
+    @SuppressWarnings("all")
+    private InterlockDetailMapper interlockDetailMapper;
+
+
+    /**联锁总表-分页列表查询(各种逻辑状态)*/
+    public IPage<InterlockSummaryVO> getPage(Page<InterlockSummaryVO> page, InterlockSummaryVO interlockSummaryVO) {
+        return interlockDetailMapper.getPage(page, interlockSummaryVO);
+    }
+
 }

+ 55 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/summary/vo/InterlockSummaryVO.java

@@ -0,0 +1,55 @@
+package org.jeecg.modules.summary.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 功能描述
+ *
+ * @author: nn
+ * @date: 2024年05月23日 15:02
+ */
+@Data
+public class InterlockSummaryVO {
+
+    /**id*/
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+    private java.lang.String id;
+    /**联锁总表id*/
+    @Excel(name = "联锁总表id", width = 15)
+    @ApiModelProperty(value = "联锁总表id")
+    private java.lang.String summaryid;
+    /**联锁名称*/
+    @Excel(name = "联锁名称", width = 15)
+    @ApiModelProperty(value = "联锁名称")
+    private java.lang.String interlockname;
+    /**联锁条件值*/
+    @Excel(name = "联锁条件值", width = 15)
+    @ApiModelProperty(value = "联锁条件值")
+    private java.lang.String interlockCondition;
+    /**仪表状态*/
+    @Excel(name = "仪表状态", width = 15)
+    @ApiModelProperty(value = "仪表状态")
+    private java.lang.String instrumentStatus;
+    /**控制系统状态*/
+    @Excel(name = "控制系统状态", width = 15)
+    @ApiModelProperty(value = "控制系统状态")
+    private java.lang.String controlSystemStatus;
+
+    /**联锁状态*/
+    @Excel(name = "联锁状态", width = 15)
+    @ApiModelProperty(value = "联锁状态")
+    private java.lang.String interlockStatus;
+    /**回路健康级别*/
+    @Excel(name = "回路健康级别", width = 15)
+    @ApiModelProperty(value = "回路健康级别")
+    private java.lang.String loopHealthLevel;
+
+}