qiangxuan vor 1 Monat
Ursprung
Commit
f58431f917

+ 231 - 0
logs/error-log.html

@@ -1404,3 +1404,234 @@ TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
 <td class="LineOfCaller">LineOfCaller</td>
 </tr>
 
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 13:34:47 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 13:35:16 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 13:43:34 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 13:43:55 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 16:02:20 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 16:29:14 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <title>Logback Log Messages</title>
+<style  type="text/css">
+table { margin-left: 2em; margin-right: 2em; border-left: 2px solid #AAA; }
+TR.even { background: #FFFFFF; }
+TR.odd { background: #EAEAEA; }
+TR.warn TD.Level, TR.error TD.Level, TR.fatal TD.Level {font-weight: bold; color: #FF4040 }
+TD { padding-right: 1ex; padding-left: 1ex; border-right: 2px solid #AAA; }
+TD.Time, TD.Date { text-align: right; font-family: courier, monospace; font-size: smaller; }
+TD.Thread { text-align: left; }
+TD.Level { text-align: right; }
+TD.Logger { text-align: left; }
+TR.header { background: #596ED5; color: #FFF; font-weight: bold; font-size: larger; }
+TD.Exception { background: #A2AEE8; font-family: courier, monospace;}
+</style>
+
+  </head>
+<body>
+<hr/>
+<p>Log session start time Mon Apr 14 16:32:27 CST 2025</p><p></p>
+
+<table cellspacing="0">
+<tr class="header">
+<td class="Level">Level</td>
+<td class="Date">Date</td>
+<td class="Message">Message</td>
+<td class="MethodOfCaller">MethodOfCaller</td>
+<td class="FileOfCaller">FileOfCaller</td>
+<td class="LineOfCaller">LineOfCaller</td>
+</tr>
+

Datei-Diff unterdrückt, da er zu groß ist
+ 49 - 0
logs/jeecg-gateway-2025-04-14.0.log


Datei-Diff unterdrückt, da er zu groß ist
+ 890 - 0
logs/jeecg-lesm-2025-04-14.0.html


Datei-Diff unterdrückt, da er zu groß ist
+ 101 - 0
logs/jeecg-lesm-2025-04-14.0.log


Datei-Diff unterdrückt, da er zu groß ist
+ 881 - 0
logs/jeecg-system-2025-04-14.0.html


Datei-Diff unterdrückt, da er zu groß ist
+ 100 - 0
logs/jeecg-system-2025-04-14.0.log


+ 119 - 57
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/deviceManage/controller/DeviceBaseInfoController.java

@@ -3,10 +3,13 @@ package org.jeecg.modules.deviceManage.controller;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 
@@ -24,6 +27,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.modules.deviceManage.service.IDeviceSparePartsService;
 import org.jeecg.modules.deviceManage.vo.DeviceSparePartsParam;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 import io.swagger.annotations.Api;
@@ -67,7 +71,7 @@ public class DeviceBaseInfoController extends JeecgController<DeviceBaseInfo, ID
 		IPage<DeviceBaseInfo> pageList = deviceBaseInfoService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}
-	
+
 	/**
 	 *   添加
 	 *
@@ -104,15 +108,41 @@ public class DeviceBaseInfoController extends JeecgController<DeviceBaseInfo, ID
 	 * @param id
 	 * @return
 	 */
-	@AutoLog(value = "设备基本信息-通过id删除")
-	@ApiOperation(value="设备基本信息-通过id删除", notes="设备基本信息-通过id删除")
+	@AutoLog(value = "设备台账基本信息-通过id删除")
+	@ApiOperation(value="设备台账基本信息-通过id删除", notes="设备基本信息-通过id删除")
 	@RequiresPermissions("deviceInfo:device_base_info:delete")
 	@DeleteMapping(value = "/delete")
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-		deviceBaseInfoService.removeById(id);
-		return Result.OK("删除成功!");
+	@Transactional(rollbackFor = Exception.class)
+	public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+		try {
+			// 根据设备的主键ID查询设备基础信息
+			DeviceBaseInfo device = deviceBaseInfoService.getById(id);
+			if (device == null) {
+				return Result.error("设备基础信息不存在,删除设备失败!");
+			}
+
+			// 处理父设备
+			LambdaUpdateWrapper<DeviceBaseInfo> updateExistingWrapper = new LambdaUpdateWrapper<>();
+			updateExistingWrapper.set(DeviceBaseInfo::getSubDeviceIds, null)
+					.eq(DeviceBaseInfo::getSubDeviceIds, device.getId());
+			deviceBaseInfoService.update(null, updateExistingWrapper);
+
+			// 处理子设备
+			LambdaUpdateWrapper<DeviceBaseInfo> updateExistingWrapper1 = new LambdaUpdateWrapper<>();
+			updateExistingWrapper1.set(DeviceBaseInfo::getParentDeviceIds, null)
+					.eq(DeviceBaseInfo::getParentDeviceIds, device.getId());
+			deviceBaseInfoService.update(null, updateExistingWrapper1);
+
+			// 物理删除该设备信息
+			deviceBaseInfoService.removeById(id);
+
+			return Result.OK("设备台账删除成功!");
+		} catch (Exception e) {
+			// 出现异常,事务会回滚
+			return Result.error("删除设备台账时出现异常: " + e.getMessage());
+		}
 	}
-	
+
 	/**
 	 *  批量删除
 	 *
@@ -198,16 +228,38 @@ public class DeviceBaseInfoController extends JeecgController<DeviceBaseInfo, ID
 	 @ApiOperation(value="子设备基本信息-添加", notes="子设备基本信息-添加")
 	 @RequiresPermissions("deviceInfo:sub_device_info:add")
 	 @PostMapping(value = "/subAdd")
+	 @Transactional(rollbackFor = Exception.class)
 	 public Result<String> subAdd(@RequestParam(name="id", required=true) String id,
 								  @RequestParam(name="subDeviceIds", required=true) String subDeviceIds) {
-		 // 通过设备编号查询设备基础信息是否存在
-		 DeviceBaseInfo deviceBaseInfo = deviceBaseInfoService.getById(id);
-		 if (deviceBaseInfo == null) {
-			 return Result.error("设备基础信息不存在,添加子设备失败!");
+		 try {
+			 // 根据设备A的主键ID查询设备基础信息
+			 DeviceBaseInfo deviceA = deviceBaseInfoService.getById(id);
+			 if (deviceA == null) {
+				 return Result.error("设备基础信息不存在,添加子设备失败!");
+			 }
+			 // 批量更新 sub_device_ids 等于设备A的ID的设备的 sub_device_ids 为 null
+			 LambdaUpdateWrapper<DeviceBaseInfo> updateExistingWrapper = new LambdaUpdateWrapper<>();
+			 updateExistingWrapper.set(DeviceBaseInfo::getParentDeviceIds, null)
+					 .eq(DeviceBaseInfo::getParentDeviceIds, deviceA.getId());
+			 deviceBaseInfoService.update(null, updateExistingWrapper);
+
+			 if (subDeviceIds.contains(",")) {
+				 List<String> subDeviceIdList = Arrays.asList(subDeviceIds.split(","));
+				 LambdaUpdateWrapper<DeviceBaseInfo> updateWrapper = new LambdaUpdateWrapper<>();
+				 updateWrapper.set(DeviceBaseInfo::getParentDeviceIds, deviceA.getId())
+						 .in(DeviceBaseInfo::getId, subDeviceIdList);
+				 deviceBaseInfoService.update(updateWrapper);
+			 } else {
+				 LambdaUpdateWrapper<DeviceBaseInfo> updateWrapper = new LambdaUpdateWrapper<>();
+				 updateWrapper.set(DeviceBaseInfo::getParentDeviceIds, deviceA.getId())
+						 .eq(DeviceBaseInfo::getId, subDeviceIds);
+				 deviceBaseInfoService.update(updateWrapper);
+			 }
+			 return Result.OK("子设备添加成功!");
+		 } catch (Exception e) {
+			 // 出现异常,事务会回滚
+			 return Result.error("添加子设备时出现异常: " + e.getMessage());
 		 }
-		 deviceBaseInfo.setSubDeviceIds(subDeviceIds);
-		 deviceBaseInfoService.save(deviceBaseInfo);
-		 return Result.OK("子设备添加成功!");
 	 }
 
 	 /**
@@ -220,16 +272,39 @@ public class DeviceBaseInfoController extends JeecgController<DeviceBaseInfo, ID
 	 @ApiOperation(value="父设备基本信息-添加", notes="父设备基本信息-添加")
 	 @RequiresPermissions("deviceInfo:parent_device_info:add")
 	 @PostMapping(value = "/parentAdd")
+	 @Transactional(rollbackFor = Exception.class)
 	 public Result<String> parentAdd(@RequestParam(name="id", required=true) String id,
 									 @RequestParam(name="parentDeviceIds", required=true) String parentDeviceIds) {
-		 // 通过设备编号查询设备基础信息是否存在
-		 DeviceBaseInfo deviceBaseInfo = deviceBaseInfoService.getById(id);
-		 if (deviceBaseInfo == null) {
-			 return Result.error("设备基础信息不存在,添加父设备失败!");
+		 try {
+			 // 根据设备A的主键ID查询设备基础信息
+			 DeviceBaseInfo deviceA = deviceBaseInfoService.getById(id);
+			 if (deviceA == null) {
+				 return Result.error("设备基础信息不存在,添加父设备失败!");
+			 }
+			 // 批量更新 sub_device_ids 等于设备A的ID的设备的 sub_device_ids 为 null
+			 LambdaUpdateWrapper<DeviceBaseInfo> updateExistingWrapper = new LambdaUpdateWrapper<>();
+			 updateExistingWrapper.set(DeviceBaseInfo::getSubDeviceIds, null)
+					              .eq(DeviceBaseInfo::getSubDeviceIds, deviceA.getId());
+			 deviceBaseInfoService.update(null, updateExistingWrapper);
+
+			 // 解析父设备的主键ID集合
+			 if (parentDeviceIds.contains(",")) {
+				 List<String> parentDeviceIdList = Arrays.asList(parentDeviceIds.split(","));
+				 LambdaUpdateWrapper<DeviceBaseInfo> updateWrapper = new LambdaUpdateWrapper<>();
+				 updateWrapper.set(DeviceBaseInfo::getSubDeviceIds, deviceA.getId())
+						 .in(DeviceBaseInfo::getId, parentDeviceIdList);
+				 deviceBaseInfoService.update(updateWrapper);
+			 } else {
+				 LambdaUpdateWrapper<DeviceBaseInfo> updateWrapper = new LambdaUpdateWrapper<>();
+				 updateWrapper.set(DeviceBaseInfo::getSubDeviceIds, deviceA.getId())
+						 .eq(DeviceBaseInfo::getId, parentDeviceIds);
+				 deviceBaseInfoService.update(updateWrapper);
+			 }
+			 return Result.OK("父设备添加成功!");
+		 } catch (Exception e) {
+			 // 出现异常,事务会回滚
+			 return Result.error("添加父设备时出现异常: " + e.getMessage());
 		 }
-		 deviceBaseInfo.setParentDeviceIds(parentDeviceIds);
-		 deviceBaseInfoService.save(deviceBaseInfo);
-		 return Result.OK("父设备添加成功!");
 	 }
 
 	 /**
@@ -270,43 +345,30 @@ public class DeviceBaseInfoController extends JeecgController<DeviceBaseInfo, ID
 		 return Result.OK("设备备件添加成功!");
 	 }
 
-	 @ApiOperation(value="子设备基本信息-分页列表查询", notes="子设备基本信息-分页列表查询")
-	 @GetMapping(value = "/subList")
-	 public Result<IPage<DeviceBaseInfo>> queryPageSubList(DeviceBaseInfo deviceBaseInfo,
-														@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-														@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-														HttpServletRequest req) {
-		 //通过设备中的subDeviceIds,分页查询设备信息
-		 String subDeviceIds = deviceBaseInfo.getSubDeviceIds();
-		 if (oConvertUtils.isEmpty(subDeviceIds)){
-			 return Result.OK(null);
-		 }
-		 QueryWrapper<DeviceBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(deviceBaseInfo, req.getParameterMap());
-		 String[] deviceIdArray = subDeviceIds.split(",");
-		 // 使用in方法进行筛选
-		 queryWrapper.in("id", Arrays.asList(deviceIdArray));
-		 Page<DeviceBaseInfo> page = new Page<DeviceBaseInfo>(pageNo, pageSize);
-		 IPage<DeviceBaseInfo> pageList = deviceBaseInfoService.page(page, queryWrapper);
-		 return Result.OK(pageList);
-	 }
-
-	 @ApiOperation(value="父设备基本信息-分页列表查询", notes="父设备基本信息-分页列表查询")
-	 @GetMapping(value = "/parentList")
-	 public Result<IPage<DeviceBaseInfo>> queryPageParentList(DeviceBaseInfo deviceBaseInfo,
-														   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-														   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-														   HttpServletRequest req) {
-		 String parentDeviceIds = deviceBaseInfo.getParentDeviceIds();
-		 if (oConvertUtils.isEmpty(parentDeviceIds)){
-			 return Result.OK(null);
+	 /**
+	  * 已绑定的父、子设备信息
+	  * @param queryType
+	  * @param deviceId
+	  * @return
+	  */
+	 @ApiOperation(value="已绑定的父、子设备信息-列表查询", notes="已绑定的父、子设备信息-列表查询")
+	 @GetMapping(value = "/parentOrSubDeviceList")
+	 public Result<List<DeviceBaseInfo>> queryPageParentList(@RequestParam(name="queryType", required = true) String queryType,
+														   @RequestParam(name="deviceId", required = true) String deviceId) {
+		 List<DeviceBaseInfo> pageList = new ArrayList<>();
+		 if ("1".equals(queryType)){
+			 // 查询父设备信息
+			 LambdaQueryWrapper<DeviceBaseInfo> queryWrapper = new LambdaQueryWrapper<>();
+			 queryWrapper.eq(DeviceBaseInfo::getSubDeviceIds, deviceId)
+					     .orderByDesc(DeviceBaseInfo::getCreateTime);
+			 pageList = deviceBaseInfoService.list(queryWrapper);
+		 }else if ("2".equals(queryType)){
+			 // 查询子设备信息
+			 LambdaQueryWrapper<DeviceBaseInfo> queryWrapper = new LambdaQueryWrapper<>();
+			 queryWrapper.eq(DeviceBaseInfo::getParentDeviceIds, deviceId)
+					 .orderByDesc(DeviceBaseInfo::getCreateTime);
+			 pageList = deviceBaseInfoService.list(queryWrapper);
 		 }
-		 QueryWrapper<DeviceBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(deviceBaseInfo, req.getParameterMap());
-		 // 将parentDeviceIds字符串拆分成数组
-		 String[] deviceIdArray = parentDeviceIds.split(",");
-		 // 使用in方法进行筛选
-		 queryWrapper.in("id", Arrays.asList(deviceIdArray));
-		 Page<DeviceBaseInfo> page = new Page<DeviceBaseInfo>(pageNo, pageSize);
-		 IPage<DeviceBaseInfo> pageList = deviceBaseInfoService.page(page, queryWrapper);
 		 return Result.OK(pageList);
 	 }
 }

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.