Browse Source

新增设备归还模块以及组装特种设备类别树

lingpeng.li 2 months ago
parent
commit
eeda47fbf6
41 changed files with 1825 additions and 671 deletions
  1. 67 48
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/attachments/entity/Attachments.java
  2. 7 20
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/controller/DeviceDisposalController.java
  3. 0 81
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/entity/DisposalAttachments.java
  4. 0 31
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/mapper/DisposalAttachmentsMapper.java
  5. 0 16
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/mapper/xml/DisposalAttachmentsMapper.xml
  6. 2 5
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/IDeviceDisposalService.java
  7. 0 23
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/IDisposalAttachmentsService.java
  8. 2 23
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/impl/DeviceDisposalServiceImpl.java
  9. 0 27
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/impl/DisposalAttachmentsServiceImpl.java
  10. 109 73
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/vo/DeviceDisposalPage.java
  11. 302 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/controller/DeviceReturnController.java
  12. 121 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/entity/DeviceReturn.java
  13. 122 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/entity/ReturnDevice.java
  14. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/DeviceReturnMapper.java
  15. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/ReturnDeviceMapper.java
  16. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/xml/DeviceReturnMapper.xml
  17. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/xml/ReturnDeviceMapper.xml
  18. 48 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/IDeviceReturnService.java
  19. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/IReturnDeviceService.java
  20. 77 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/impl/DeviceReturnServiceImpl.java
  21. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/impl/ReturnDeviceServiceImpl.java
  22. 122 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/vo/DeviceReturnPage.java
  23. 10 23
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/controller/DeviceTransferController.java
  24. 0 80
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/entity/TransferAttachments.java
  25. 0 31
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/mapper/TransferAttachmentsMapper.java
  26. 0 16
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/mapper/xml/TransferAttachmentsMapper.xml
  27. 37 40
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/IDeviceTransferService.java
  28. 0 22
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/ITransferAttachmentsService.java
  29. 61 81
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/impl/DeviceTransferServiceImpl.java
  30. 0 27
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/impl/TransferAttachmentsServiceImpl.java
  31. 2 2
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/vo/DeviceTransferPage.java
  32. 178 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/controller/SpecialDeviceCategoryController.java
  33. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/dto/CategoryQueryDTO.java
  34. 115 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/entity/SpecialDeviceCategory.java
  35. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/mapper/SpecialDeviceCategoryMapper.java
  36. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/mapper/xml/SpecialDeviceCategoryMapper.xml
  37. 32 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/service/ISpecialDeviceCategoryService.java
  38. 61 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/service/impl/SpecialDeviceCategoryServiceImpl.java
  39. 88 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/vo/SpecialDeviceCategoryVO.java
  40. 113 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/utils/TreeUtils.java
  41. 2 2
      zgzt-sbsmzq/jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml

+ 67 - 48
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/attachments/entity/Attachments.java

@@ -1,84 +1,103 @@
 package org.jeecg.modules.attachments.entity;
 
-import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
-import java.util.Date;
-import java.math.BigDecimal;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import org.jeecg.common.constant.ProvinceCityArea;
-import org.jeecg.common.util.SpringContextUtils;
-import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
-import org.jeecgframework.poi.excel.annotation.Excel;
-import org.jeecg.common.aspect.annotation.Dict;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
 
 /**
  * @Description: 相关附件
  * @Author: jeecg-boot
- * @Date:   2025-04-23
+ * @Date: 2025-04-23
  * @Version: V1.0
  */
 @Data
 @TableName("sbsmzq_attachments")
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = false)
-@ApiModel(value="sbsmzq_attachments对象", description="相关附件")
+@ApiModel(value = "sbsmzq_attachments对象", description = "相关附件")
 public class Attachments implements Serializable {
     private static final long serialVersionUID = 1L;
 
-	/**主键*/
-	@TableId(type = IdType.ASSIGN_ID)
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
     @ApiModelProperty(value = "主键")
-    private java.lang.String id;
-	/**创建人*/
+    private String id;
+    /**
+     * 创建人
+     */
     @ApiModelProperty(value = "创建人")
-    private java.lang.String createBy;
-	/**创建日期*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "创建日期")
-    private java.util.Date createTime;
-	/**更新人*/
+    private Date createTime;
+    /**
+     * 更新人
+     */
     @ApiModelProperty(value = "更新人")
-    private java.lang.String updateBy;
-	/**更新日期*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "更新日期")
-    private java.util.Date updateTime;
-	/**所属部门*/
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
     @ApiModelProperty(value = "所属部门")
-    private java.lang.String sysOrgCode;
-	/**文件名称*/
-	@Excel(name = "文件名称", width = 15)
+    private String sysOrgCode;
+    /**
+     * 文件名称
+     */
+    @Excel(name = "文件名称", width = 15)
     @ApiModelProperty(value = "文件名称")
-    private java.lang.String fileName;
-	/**文件地址*/
-	@Excel(name = "文件地址", width = 15)
+    private String fileName;
+    /**
+     * 文件地址
+     */
+    @Excel(name = "文件地址", width = 15)
     @ApiModelProperty(value = "文件地址")
-    private java.lang.String fileAddress;
-	/**附件关联表的id*/
-	@Excel(name = "附件关联表的id", width = 15)
+    private String fileAddress;
+    /**
+     * 附件关联表的id
+     */
+    @Excel(name = "附件关联表的id", width = 15)
     @ApiModelProperty(value = "附件关联表的id")
-    private java.lang.String extId;
-	/**附件关联表的名称*/
-	@Excel(name = "附件关联表的名称", width = 15)
+    private String extId;
+    /**
+     * 附件关联表的名称
+     */
+    @Excel(name = "附件关联表的名称", width = 15)
     @ApiModelProperty(value = "附件关联表的名称")
-    private java.lang.String extTable;
-	/**文件类型*/
-	@Excel(name = "文件类型", width = 15)
+    private String extTable;
+    /**
+     * 文件类型
+     */
+    @Excel(name = "文件类型", width = 15)
     @ApiModelProperty(value = "文件类型")
-    private java.lang.String type;
-	/**文件大小*/
-	@Excel(name = "文件大小", width = 15)
+    private String type;
+    /**
+     * 文件大小
+     */
+    @Excel(name = "文件大小", width = 15)
     @ApiModelProperty(value = "文件大小")
-    private java.lang.Integer size;
+    private Integer size;
 }

+ 7 - 20
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/controller/DeviceDisposalController.java

@@ -17,12 +17,12 @@ import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.attachments.entity.Attachments;
+import org.jeecg.modules.attachments.service.IAttachmentsService;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.dto.DeviceDisposalQueryDTO;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DeviceDisposal;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalDevice;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.service.IDeviceDisposalService;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.service.IDisposalAttachmentsService;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.service.IDisposalDeviceService;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.vo.DeviceDisposalPage;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.vo.DeviceDisposalVO;
@@ -72,7 +72,7 @@ public class DeviceDisposalController {
     @Autowired
     private IDeviceDisposalService deviceDisposalService;
     @Autowired
-    private IDisposalAttachmentsService disposalAttachmentsService;
+    private IAttachmentsService attachmentsService;
     @Autowired
     private IDisposalDeviceService disposalDeviceService;
 
@@ -111,7 +111,7 @@ public class DeviceDisposalController {
     public Result<String> add(@RequestBody DeviceDisposalPage deviceDisposalPage) {
         DeviceDisposal deviceDisposal = new DeviceDisposal();
         BeanUtils.copyProperties(deviceDisposalPage, deviceDisposal);
-        deviceDisposalService.saveMain(deviceDisposal, deviceDisposalPage.getDisposalAttachmentsList(), deviceDisposalPage.getDisposalDeviceList());
+        deviceDisposalService.saveMain(deviceDisposal, deviceDisposalPage.getDisposalDeviceList());
         return Result.OK("添加成功!");
     }
 
@@ -132,7 +132,7 @@ public class DeviceDisposalController {
         if (deviceDisposalEntity == null) {
             return Result.error("未找到对应数据");
         }
-        deviceDisposalService.updateMain(deviceDisposal, deviceDisposalPage.getDisposalAttachmentsList(), deviceDisposalPage.getDisposalDeviceList());
+        deviceDisposalService.updateMain(deviceDisposal, deviceDisposalPage.getDisposalDeviceList());
         return Result.OK("编辑成功!");
     }
 
@@ -184,19 +184,6 @@ public class DeviceDisposalController {
 
     }
 
-    /**
-     * 通过id查询
-     *
-     * @param id
-     * @return
-     */
-    //@AutoLog(value = "设备处置--相关附件通过主表ID查询")
-    @ApiOperation(value = "设备处置--相关附件主表ID查询", notes = "设备处置--相关附件-通主表ID查询")
-    @GetMapping(value = "/queryDisposalAttachmentsByMainId")
-    public Result<List<DisposalAttachments>> queryDisposalAttachmentsListByMainId(@RequestParam(name = "id", required = true) String id) {
-        List<DisposalAttachments> disposalAttachmentsList = disposalAttachmentsService.selectByMainId(id);
-        return Result.OK(disposalAttachmentsList);
-    }
 
     /**
      * 通过id查询
@@ -239,7 +226,7 @@ public class DeviceDisposalController {
         for (DeviceDisposal main : deviceDisposalList) {
             DeviceDisposalPage vo = new DeviceDisposalPage();
             BeanUtils.copyProperties(main, vo);
-            List<DisposalAttachments> disposalAttachmentsList = disposalAttachmentsService.selectByMainId(main.getId());
+            List<Attachments> disposalAttachmentsList = attachmentsService.selectByMainId(main.getId());
             vo.setDisposalAttachmentsList(disposalAttachmentsList);
             List<DisposalDevice> disposalDeviceList = disposalDeviceService.selectByMainId(main.getId());
             vo.setDisposalDeviceList(disposalDeviceList);
@@ -279,7 +266,7 @@ public class DeviceDisposalController {
                 for (DeviceDisposalPage page : list) {
                     DeviceDisposal po = new DeviceDisposal();
                     BeanUtils.copyProperties(page, po);
-                    deviceDisposalService.saveMain(po, page.getDisposalAttachmentsList(), page.getDisposalDeviceList());
+                    deviceDisposalService.saveMain(po, page.getDisposalDeviceList());
                 }
                 return Result.OK("文件导入成功!数据行数:" + list.size());
             } catch (Exception e) {

+ 0 - 81
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/entity/DisposalAttachments.java

@@ -1,81 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceDisposal.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.jeecgframework.poi.excel.annotation.Excel;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @Description: 设备处置--相关附件
- * @Author: jeecg-boot
- * @Date: 2025-04-22
- * @Version: V1.0
- */
-@ApiModel(value = "sbsmzq_disposal_attachments对象", description = "设备处置--相关附件")
-@Data
-@TableName("sbsmzq_disposal_attachments")
-public class DisposalAttachments implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键
-     */
-    @TableId(type = IdType.ASSIGN_ID)
-    @ApiModelProperty(value = "主键")
-    private String id;
-    /**
-     * 创建人
-     */
-    @ApiModelProperty(value = "创建人")
-    private String createBy;
-    /**
-     * 创建日期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @ApiModelProperty(value = "创建日期")
-    private Date createTime;
-    /**
-     * 更新人
-     */
-    @ApiModelProperty(value = "更新人")
-    private String updateBy;
-    /**
-     * 更新日期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @ApiModelProperty(value = "更新日期")
-    private Date updateTime;
-    /**
-     * 所属部门
-     */
-    @ApiModelProperty(value = "所属部门")
-    private String sysOrgCode;
-    /**
-     * 文件名称
-     */
-    @Excel(name = "文件名称", width = 15)
-    @ApiModelProperty(value = "文件名称")
-    private String fileName;
-    /**
-     * 文件地址
-     */
-    @Excel(name = "文件地址", width = 15)
-    @ApiModelProperty(value = "文件地址")
-    private String fileAddress;
-    /**
-     * 处置信息id
-     */
-    @ApiModelProperty(value = "处置信息id")
-    private String disposalId;
-
-}

+ 0 - 31
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/mapper/DisposalAttachmentsMapper.java

@@ -1,31 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceDisposal.mapper;
-
-import java.util.List;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * @Description: 设备处置--相关附件
- * @Author: jeecg-boot
- * @Date:   2025-04-22
- * @Version: V1.0
- */
-public interface DisposalAttachmentsMapper extends BaseMapper<DisposalAttachments> {
-
-	/**
-	 * 通过主表id删除子表数据
-	 *
-	 * @param mainId 主表id
-	 * @return boolean
-	 */
-	public boolean deleteByMainId(@Param("mainId") String mainId);
-
-  /**
-   * 通过主表id查询子表数据
-   *
-   * @param mainId 主表id
-   * @return List<DisposalAttachments>
-   */
-	public List<DisposalAttachments> selectByMainId(@Param("mainId") String mainId);
-}

+ 0 - 16
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/mapper/xml/DisposalAttachmentsMapper.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.jeecg.modules.equipmentDisposal.deviceDisposal.mapper.DisposalAttachmentsMapper">
-
-	<delete id="deleteByMainId" parameterType="java.lang.String">
-		DELETE 
-		FROM  sbsmzq_disposal_attachments 
-		WHERE
-			 disposal_id = #{mainId} 	</delete>
-	
-	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments">
-		SELECT * 
-		FROM  sbsmzq_disposal_attachments
-		WHERE
-			 disposal_id = #{mainId} 	</select>
-</mapper>

+ 2 - 5
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/IDeviceDisposalService.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.dto.DeviceDisposalQueryDTO;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DeviceDisposal;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalDevice;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.vo.DeviceDisposalVO;
 
@@ -25,19 +24,17 @@ public interface IDeviceDisposalService extends IService<DeviceDisposal> {
      * 添加一对多
      *
      * @param deviceDisposal
-     * @param disposalAttachmentsList
      * @param disposalDeviceList
      */
-    void saveMain(DeviceDisposal deviceDisposal, List<DisposalAttachments> disposalAttachmentsList, List<DisposalDevice> disposalDeviceList);
+    void saveMain(DeviceDisposal deviceDisposal, List<DisposalDevice> disposalDeviceList);
 
     /**
      * 修改一对多
      *
      * @param deviceDisposal
-     * @param disposalAttachmentsList
      * @param disposalDeviceList
      */
-    void updateMain(DeviceDisposal deviceDisposal, List<DisposalAttachments> disposalAttachmentsList, List<DisposalDevice> disposalDeviceList);
+    void updateMain(DeviceDisposal deviceDisposal, List<DisposalDevice> disposalDeviceList);
 
     /**
      * 删除一对多

+ 0 - 23
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/IDisposalAttachmentsService.java

@@ -1,23 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceDisposal.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
-
-import java.util.List;
-
-/**
- * @Description: 设备处置--相关附件
- * @Author: jeecg-boot
- * @Date: 2025-04-22
- * @Version: V1.0
- */
-public interface IDisposalAttachmentsService extends IService<DisposalAttachments> {
-
-    /**
-     * 通过主表id查询子表数据
-     *
-     * @param mainId 主表id
-     * @return List<DisposalAttachments>
-     */
-    List<DisposalAttachments> selectByMainId(String mainId);
-}

+ 2 - 23
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/impl/DeviceDisposalServiceImpl.java

@@ -5,10 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.dto.DeviceDisposalQueryDTO;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DeviceDisposal;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalDevice;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.mapper.DeviceDisposalMapper;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.mapper.DisposalAttachmentsMapper;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.mapper.DisposalDeviceMapper;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.service.IDeviceDisposalService;
 import org.jeecg.modules.equipmentDisposal.deviceDisposal.vo.DeviceDisposalVO;
@@ -32,21 +30,12 @@ public class DeviceDisposalServiceImpl extends ServiceImpl<DeviceDisposalMapper,
     @Autowired
     private DeviceDisposalMapper deviceDisposalMapper;
     @Autowired
-    private DisposalAttachmentsMapper disposalAttachmentsMapper;
-    @Autowired
     private DisposalDeviceMapper disposalDeviceMapper;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void saveMain(DeviceDisposal deviceDisposal, List<DisposalAttachments> disposalAttachmentsList, List<DisposalDevice> disposalDeviceList) {
+    public void saveMain(DeviceDisposal deviceDisposal, List<DisposalDevice> disposalDeviceList) {
         deviceDisposalMapper.insert(deviceDisposal);
-        if (disposalAttachmentsList != null && disposalAttachmentsList.size() > 0) {
-            for (DisposalAttachments entity : disposalAttachmentsList) {
-                //外键设置
-                entity.setDisposalId(deviceDisposal.getId());
-                disposalAttachmentsMapper.insert(entity);
-            }
-        }
         if (disposalDeviceList != null && disposalDeviceList.size() > 0) {
             for (DisposalDevice entity : disposalDeviceList) {
                 //外键设置
@@ -58,21 +47,13 @@ public class DeviceDisposalServiceImpl extends ServiceImpl<DeviceDisposalMapper,
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void updateMain(DeviceDisposal deviceDisposal, List<DisposalAttachments> disposalAttachmentsList, List<DisposalDevice> disposalDeviceList) {
+    public void updateMain(DeviceDisposal deviceDisposal, List<DisposalDevice> disposalDeviceList) {
         deviceDisposalMapper.updateById(deviceDisposal);
 
         //1.先删除子表数据
-        disposalAttachmentsMapper.deleteByMainId(deviceDisposal.getId());
         disposalDeviceMapper.deleteByMainId(deviceDisposal.getId());
 
         //2.子表数据重新插入
-        if (disposalAttachmentsList != null && disposalAttachmentsList.size() > 0) {
-            for (DisposalAttachments entity : disposalAttachmentsList) {
-                //外键设置
-                entity.setDisposalId(deviceDisposal.getId());
-                disposalAttachmentsMapper.insert(entity);
-            }
-        }
         if (disposalDeviceList != null && disposalDeviceList.size() > 0) {
             for (DisposalDevice entity : disposalDeviceList) {
                 //外键设置
@@ -85,7 +66,6 @@ public class DeviceDisposalServiceImpl extends ServiceImpl<DeviceDisposalMapper,
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void delMain(String id) {
-        disposalAttachmentsMapper.deleteByMainId(id);
         disposalDeviceMapper.deleteByMainId(id);
         deviceDisposalMapper.deleteById(id);
     }
@@ -94,7 +74,6 @@ public class DeviceDisposalServiceImpl extends ServiceImpl<DeviceDisposalMapper,
     @Transactional(rollbackFor = Exception.class)
     public void delBatchMain(Collection<? extends Serializable> idList) {
         for (Serializable id : idList) {
-            disposalAttachmentsMapper.deleteByMainId(id.toString());
             disposalDeviceMapper.deleteByMainId(id.toString());
             deviceDisposalMapper.deleteById(id);
         }

+ 0 - 27
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/service/impl/DisposalAttachmentsServiceImpl.java

@@ -1,27 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceDisposal.service.impl;
-
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.mapper.DisposalAttachmentsMapper;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.service.IDisposalAttachmentsService;
-import org.springframework.stereotype.Service;
-import java.util.List;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * @Description: 设备处置--相关附件
- * @Author: jeecg-boot
- * @Date:   2025-04-22
- * @Version: V1.0
- */
-@Service
-public class DisposalAttachmentsServiceImpl extends ServiceImpl<DisposalAttachmentsMapper, DisposalAttachments> implements IDisposalAttachmentsService {
-	
-	@Autowired
-	private DisposalAttachmentsMapper disposalAttachmentsMapper;
-	
-	@Override
-	public List<DisposalAttachments> selectByMainId(String mainId) {
-		return disposalAttachmentsMapper.selectByMainId(mainId);
-	}
-}

+ 109 - 73
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceDisposal/vo/DeviceDisposalPage.java

@@ -1,109 +1,145 @@
 package org.jeecg.modules.equipmentDisposal.deviceDisposal.vo;
 
-import java.util.List;
-
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalAttachments;
-import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalDevice;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.jeecg.modules.attachments.entity.Attachments;
+import org.jeecg.modules.equipmentDisposal.deviceDisposal.entity.DisposalDevice;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.jeecgframework.poi.excel.annotation.ExcelCollection;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import org.springframework.format.annotation.DateTimeFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
 
 /**
  * @Description: 设备处置
  * @Author: jeecg-boot
- * @Date:   2025-04-22
+ * @Date: 2025-04-22
  * @Version: V1.0
  */
 @Data
-@ApiModel(value="device_disposalPage对象", description="设备处置")
+@ApiModel(value = "device_disposalPage对象", description = "设备处置")
 public class DeviceDisposalPage {
 
-	/**id*/
-	@ApiModelProperty(value = "id")
+    /**
+     * id
+     */
+    @ApiModelProperty(value = "id")
     private java.lang.String id;
-	/**创建人*/
-	@ApiModelProperty(value = "创建人")
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
     private java.lang.String createBy;
-	/**创建时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value = "创建时间")
+    /**
+     * 创建时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
     private java.util.Date createTime;
-	/**更新人*/
-	@ApiModelProperty(value = "更新人")
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
     private java.lang.String updateBy;
-	/**更新时间*/
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value = "更新时间")
+    /**
+     * 更新时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
     private java.util.Date updateTime;
-	/**所属部门*/
-	@ApiModelProperty(value = "所属部门")
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
     private java.lang.String sysOrgCode;
-	/**日期*/
-	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value = "日期")
+    /**
+     * 日期
+     */
+    @Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "日期")
     private java.util.Date createDate;
-	/**处置单号*/
-	@Excel(name = "处置单号", width = 15)
-	@ApiModelProperty(value = "处置单号")
+    /**
+     * 处置单号
+     */
+    @Excel(name = "处置单号", width = 15)
+    @ApiModelProperty(value = "处置单号")
     private java.lang.String disposalNumber;
-	/**涉及设备编号*/
-	@Excel(name = "涉及设备编号", width = 15)
-	@ApiModelProperty(value = "涉及设备编号")
+    /**
+     * 涉及设备编号
+     */
+    @Excel(name = "涉及设备编号", width = 15)
+    @ApiModelProperty(value = "涉及设备编号")
     private java.lang.String deviceNumber;
-	/**涉及设备名称*/
-	@Excel(name = "涉及设备名称", width = 15)
-	@ApiModelProperty(value = "涉及设备名称")
+    /**
+     * 涉及设备名称
+     */
+    @Excel(name = "涉及设备名称", width = 15)
+    @ApiModelProperty(value = "涉及设备名称")
     private java.lang.String deviceName;
-	/**处置方式,如出租、闲置、禁用等*/
-	@Excel(name = "处置方式,如出租、闲置、禁用等", width = 15)
-	@ApiModelProperty(value = "处置方式,如出租、闲置、禁用等")
+    /**
+     * 处置方式,如出租、闲置、禁用等
+     */
+    @Excel(name = "处置方式,如出租、闲置、禁用等", width = 15)
+    @ApiModelProperty(value = "处置方式,如出租、闲置、禁用等")
     private java.lang.String disposalMethod;
-	/**说明*/
-	@Excel(name = "说明", width = 15)
-	@ApiModelProperty(value = "说明")
+    /**
+     * 说明
+     */
+    @Excel(name = "说明", width = 15)
+    @ApiModelProperty(value = "说明")
     private java.lang.String description;
-	/**申请时间*/
-	@Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value = "申请时间")
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申请时间")
     private java.util.Date applicationTime;
-	/**申请人*/
-	@Excel(name = "申请人", width = 15)
-	@ApiModelProperty(value = "申请人")
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人", width = 15)
+    @ApiModelProperty(value = "申请人")
     private java.lang.String applicant;
-	/**填单人*/
-	@Excel(name = "填单人", width = 15)
-	@ApiModelProperty(value = "填单人")
+    /**
+     * 填单人
+     */
+    @Excel(name = "填单人", width = 15)
+    @ApiModelProperty(value = "填单人")
     private java.lang.String formFiller;
-	/**当前节点*/
-	@Excel(name = "当前节点", width = 15)
-	@ApiModelProperty(value = "当前节点")
+    /**
+     * 当前节点
+     */
+    @Excel(name = "当前节点", width = 15)
+    @ApiModelProperty(value = "当前节点")
     private java.lang.String currentNode;
-	/**审批状态,如进行中、已结束、已打回*/
-	@Excel(name = "审批状态,如进行中、已结束、已打回", width = 15)
-	@ApiModelProperty(value = "审批状态,如进行中、已结束、已打回")
+    /**
+     * 审批状态,如进行中、已结束、已打回
+     */
+    @Excel(name = "审批状态,如进行中、已结束、已打回", width = 15)
+    @ApiModelProperty(value = "审批状态,如进行中、已结束、已打回")
     private java.lang.String approvalStatus;
-	/**审批结束时间*/
-	@Excel(name = "审批结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value = "审批结束时间")
+    /**
+     * 审批结束时间
+     */
+    @Excel(name = "审批结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "审批结束时间")
     private java.util.Date approvalEndTime;
 
-	@ExcelCollection(name="设备处置--相关附件")
-	@ApiModelProperty(value = "设备处置--相关附件")
-	private List<DisposalAttachments> disposalAttachmentsList;
-	@ExcelCollection(name="设备处置--处置设备")
-	@ApiModelProperty(value = "设备处置--处置设备")
-	private List<DisposalDevice> disposalDeviceList;
+    @ExcelCollection(name = "设备处置--相关附件")
+    @ApiModelProperty(value = "设备处置--相关附件")
+    private List<Attachments> disposalAttachmentsList;
+    @ExcelCollection(name = "设备处置--处置设备")
+    @ApiModelProperty(value = "设备处置--处置设备")
+    private List<DisposalDevice> disposalDeviceList;
 
 }

+ 302 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/controller/DeviceReturnController.java

@@ -0,0 +1,302 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.CommonAPI;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.TokenUtils;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.DeviceReturn;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.service.IDeviceReturnService;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.service.IReturnDeviceService;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.vo.DeviceReturnPage;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 设备归还
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+@Api(tags = "设备归还")
+@RestController
+@RequestMapping("/equipmentDisposal/deviceReturn")
+@Slf4j
+public class DeviceReturnController {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IDeviceReturnService deviceReturnService;
+    @Autowired
+    private IReturnDeviceService returnDeviceService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param deviceReturn
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备归还-分页列表查询")
+    @ApiOperation(value = "设备归还-分页列表查询", notes = "设备归还-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<DeviceReturn>> queryPageList(DeviceReturn deviceReturn,
+                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                     HttpServletRequest req) {
+        QueryWrapper<DeviceReturn> queryWrapper = QueryGenerator.initQueryWrapper(deviceReturn, req.getParameterMap());
+        Page<DeviceReturn> page = new Page<DeviceReturn>(pageNo, pageSize);
+        IPage<DeviceReturn> pageList = deviceReturnService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param deviceReturnPage
+     * @return
+     */
+    @AutoLog(value = "设备归还-添加")
+    @ApiOperation(value = "设备归还-添加", notes = "设备归还-添加")
+    @RequiresPermissions("equipmentDisposal:device_return:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody DeviceReturnPage deviceReturnPage) {
+        DeviceReturn deviceReturn = new DeviceReturn();
+        BeanUtils.copyProperties(deviceReturnPage, deviceReturn);
+        deviceReturnService.saveMain(deviceReturn, deviceReturnPage.getReturnDeviceList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param deviceReturnPage
+     * @return
+     */
+    @AutoLog(value = "设备归还-编辑")
+    @ApiOperation(value = "设备归还-编辑", notes = "设备归还-编辑")
+    @RequiresPermissions("equipmentDisposal:device_return:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody DeviceReturnPage deviceReturnPage) {
+        DeviceReturn deviceReturn = new DeviceReturn();
+        BeanUtils.copyProperties(deviceReturnPage, deviceReturn);
+        DeviceReturn deviceReturnEntity = deviceReturnService.getById(deviceReturn.getId());
+        if (deviceReturnEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+        deviceReturnService.updateMain(deviceReturn, deviceReturnPage.getReturnDeviceList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备归还-通过id删除")
+    @ApiOperation(value = "设备归还-通过id删除", notes = "设备归还-通过id删除")
+    @RequiresPermissions("equipmentDisposal:device_return:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        deviceReturnService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备归还-批量删除")
+    @ApiOperation(value = "设备归还-批量删除", notes = "设备归还-批量删除")
+    @RequiresPermissions("equipmentDisposal:device_return:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.deviceReturnService.delBatchMain(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "设备归还-通过id查询")
+    @ApiOperation(value = "设备归还-通过id查询", notes = "设备归还-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<DeviceReturn> queryById(@RequestParam(name = "id", required = true) String id) {
+        DeviceReturn deviceReturn = deviceReturnService.getById(id);
+        if (deviceReturn == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(deviceReturn);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "归还设备通过主表ID查询")
+    @ApiOperation(value = "归还设备主表ID查询", notes = "归还设备-通主表ID查询")
+    @GetMapping(value = "/queryReturnDeviceByMainId")
+    public Result<List<ReturnDevice>> queryReturnDeviceListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<ReturnDevice> returnDeviceList = returnDeviceService.selectByMainId(id);
+        return Result.OK(returnDeviceList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param deviceReturn
+     */
+    @RequiresPermissions("equipmentDisposal:device_return:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, DeviceReturn deviceReturn) {
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<DeviceReturn> queryWrapper = QueryGenerator.initQueryWrapper(deviceReturn, request.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        //配置选中数据查询条件
+        String selections = request.getParameter("selections");
+        if (oConvertUtils.isNotEmpty(selections)) {
+            List<String> selectionList = Arrays.asList(selections.split(","));
+            queryWrapper.in("id", selectionList);
+        }
+        //Step.2 获取导出数据
+        List<DeviceReturn> deviceReturnList = deviceReturnService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<DeviceReturnPage> pageList = new ArrayList<DeviceReturnPage>();
+        for (DeviceReturn main : deviceReturnList) {
+            DeviceReturnPage vo = new DeviceReturnPage();
+            BeanUtils.copyProperties(main, vo);
+            List<ReturnDevice> returnDeviceList = returnDeviceService.selectByMainId(main.getId());
+            vo.setReturnDeviceList(returnDeviceList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "设备归还列表");
+        mv.addObject(NormalExcelConstants.CLASS, DeviceReturnPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("设备归还数据", "导出人:" + sysUser.getRealname(), "设备归还"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("equipmentDisposal:device_return:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            // 获取上传文件对象
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<DeviceReturnPage> list = ExcelImportUtil.importExcel(file.getInputStream(), DeviceReturnPage.class, params);
+                for (DeviceReturnPage page : list) {
+                    DeviceReturn po = new DeviceReturn();
+                    BeanUtils.copyProperties(page, po);
+                    deviceReturnService.saveMain(po, page.getReturnDeviceList());
+                }
+                return Result.OK("文件导入成功!数据行数:" + list.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.OK("文件导入失败!");
+    }
+
+
+    /**
+     * 分页列表查询(与我相关)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "设备归还-分页列表查询(与我相关)", notes = "设备归还-分页列表查询(与我相关)")
+    @GetMapping(value = "/listByUser")
+    public Result<IPage<DeviceReturn>> queryPageListByUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                           HttpServletRequest req) {
+
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        // 构建查询条件
+        LambdaQueryWrapper<DeviceReturn> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(DeviceReturn::getHandler, loginUser.getId());
+        QueryGenerator.initQueryWrapper(queryWrapper, req.getParameterMap());
+        Page<DeviceReturn> page = new Page<DeviceReturn>(pageNo, pageSize);
+        IPage<DeviceReturn> pageList = deviceReturnService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+}

+ 121 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/entity/DeviceReturn.java

@@ -0,0 +1,121 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备归还
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+@ApiModel(value = "device_return对象", description = "设备归还")
+@Data
+@TableName("device_return")
+public class DeviceReturn implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 日期
+     */
+    @Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "日期")
+    private Date createDate;
+    /**
+     * 归还单号
+     */
+    @Excel(name = "归还单号", width = 15)
+    @ApiModelProperty(value = "归还单号")
+    private String returnNumber;
+    /**
+     * 涉及设备编号
+     */
+    @Excel(name = "涉及设备编号", width = 15)
+    @ApiModelProperty(value = "涉及设备编号")
+    private String deviceNumber;
+    /**
+     * 涉及设备名称
+     */
+    @Excel(name = "涉及设备名称", width = 15)
+    @ApiModelProperty(value = "涉及设备名称")
+    private String deviceName;
+    /**
+     * 归还人
+     */
+    @Excel(name = "归还人", width = 15)
+    @ApiModelProperty(value = "归还人")
+    private String returner;
+    /**
+     * 经办人
+     */
+    @Excel(name = "经办人", width = 15)
+    @ApiModelProperty(value = "经办人")
+    private String handler;
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申请时间")
+    private Date applicationTime;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+    /**
+     * 审批状态,如进行中、已结束、已打回
+     */
+    @Excel(name = "审批状态,如进行中、已结束、已打回", width = 15)
+    @ApiModelProperty(value = "审批状态,如进行中、已结束、已打回")
+    private String approvalStatus;
+}

+ 122 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/entity/ReturnDevice.java

@@ -0,0 +1,122 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 归还设备
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_return_device对象", description = "归还设备")
+@Data
+@TableName("sbsmzq_return_device")
+public class ReturnDevice implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 领用单号
+     */
+    @Excel(name = "领用单号", width = 15)
+    @ApiModelProperty(value = "领用单号")
+    private String receiveOrderNo;
+    /**
+     * 设备编号
+     */
+    @Excel(name = "设备编号", width = 15)
+    @ApiModelProperty(value = "设备编号")
+    private String deviceCode;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "设备名称", width = 15)
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+    /**
+     * 功能位置
+     */
+    @Excel(name = "功能位置", width = 15)
+    @ApiModelProperty(value = "功能位置")
+    private String functionLocation;
+    /**
+     * 类别
+     */
+    @Excel(name = "类别", width = 15)
+    @ApiModelProperty(value = "类别")
+    private String category;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String spec;
+    /**
+     * 设备状态
+     */
+    @Excel(name = "设备状态", width = 15)
+    @ApiModelProperty(value = "设备状态")
+    private String deviceStatus;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 设备归还id
+     */
+    @ApiModelProperty(value = "设备归还id")
+    private String returnId;
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/DeviceReturnMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.mapper;
+
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.DeviceReturn;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 设备归还
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+public interface DeviceReturnMapper extends BaseMapper<DeviceReturn> {
+
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/ReturnDeviceMapper.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.mapper;
+
+import java.util.List;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 归还设备
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+public interface ReturnDeviceMapper extends BaseMapper<ReturnDevice> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<ReturnDevice>
+   */
+	public List<ReturnDevice> selectByMainId(@Param("mainId") String mainId);
+}

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/xml/DeviceReturnMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.equipmentDisposal.deviceReturn.mapper.DeviceReturnMapper">
+
+</mapper>

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/mapper/xml/ReturnDeviceMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.equipmentDisposal.deviceReturn.mapper.ReturnDeviceMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_return_device 
+		WHERE
+			 return_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice">
+		SELECT * 
+		FROM  sbsmzq_return_device
+		WHERE
+			 return_id = #{mainId} 	</select>
+</mapper>

+ 48 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/IDeviceReturnService.java

@@ -0,0 +1,48 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.service;
+
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.DeviceReturn;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 设备归还
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+public interface IDeviceReturnService extends IService<DeviceReturn> {
+
+	/**
+	 * 添加一对多
+	 *
+	 * @param deviceReturn
+	 * @param returnDeviceList
+	 */
+	public void saveMain(DeviceReturn deviceReturn,List<ReturnDevice> returnDeviceList) ;
+	
+	/**
+	 * 修改一对多
+	 *
+   * @param deviceReturn
+   * @param returnDeviceList
+	 */
+	public void updateMain(DeviceReturn deviceReturn,List<ReturnDevice> returnDeviceList);
+	
+	/**
+	 * 删除一对多
+	 *
+	 * @param id
+	 */
+	public void delMain (String id);
+	
+	/**
+	 * 批量删除一对多
+	 *
+	 * @param idList
+	 */
+	public void delBatchMain (Collection<? extends Serializable> idList);
+	
+}

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/IReturnDeviceService.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.service;
+
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 归还设备
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+public interface IReturnDeviceService extends IService<ReturnDevice> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<ReturnDevice>
+	 */
+	public List<ReturnDevice> selectByMainId(String mainId);
+}

+ 77 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/impl/DeviceReturnServiceImpl.java

@@ -0,0 +1,77 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.service.impl;
+
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.DeviceReturn;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.mapper.ReturnDeviceMapper;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.mapper.DeviceReturnMapper;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.service.IDeviceReturnService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 设备归还
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+@Service
+public class DeviceReturnServiceImpl extends ServiceImpl<DeviceReturnMapper, DeviceReturn> implements IDeviceReturnService {
+
+	@Autowired
+	private DeviceReturnMapper deviceReturnMapper;
+	@Autowired
+	private ReturnDeviceMapper returnDeviceMapper;
+	
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void saveMain(DeviceReturn deviceReturn, List<ReturnDevice> returnDeviceList) {
+		deviceReturnMapper.insert(deviceReturn);
+		if(returnDeviceList!=null && returnDeviceList.size()>0) {
+			for(ReturnDevice entity:returnDeviceList) {
+				//外键设置
+				entity.setReturnId(deviceReturn.getId());
+				returnDeviceMapper.insert(entity);
+			}
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void updateMain(DeviceReturn deviceReturn,List<ReturnDevice> returnDeviceList) {
+		deviceReturnMapper.updateById(deviceReturn);
+		
+		//1.先删除子表数据
+		returnDeviceMapper.deleteByMainId(deviceReturn.getId());
+		
+		//2.子表数据重新插入
+		if(returnDeviceList!=null && returnDeviceList.size()>0) {
+			for(ReturnDevice entity:returnDeviceList) {
+				//外键设置
+				entity.setReturnId(deviceReturn.getId());
+				returnDeviceMapper.insert(entity);
+			}
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void delMain(String id) {
+		returnDeviceMapper.deleteByMainId(id);
+		deviceReturnMapper.deleteById(id);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void delBatchMain(Collection<? extends Serializable> idList) {
+		for(Serializable id:idList) {
+			returnDeviceMapper.deleteByMainId(id.toString());
+			deviceReturnMapper.deleteById(id);
+		}
+	}
+	
+}

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/service/impl/ReturnDeviceServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.service.impl;
+
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.mapper.ReturnDeviceMapper;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.service.IReturnDeviceService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 归还设备
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+@Service
+public class ReturnDeviceServiceImpl extends ServiceImpl<ReturnDeviceMapper, ReturnDevice> implements IReturnDeviceService {
+	
+	@Autowired
+	private ReturnDeviceMapper returnDeviceMapper;
+	
+	@Override
+	public List<ReturnDevice> selectByMainId(String mainId) {
+		return returnDeviceMapper.selectByMainId(mainId);
+	}
+}

+ 122 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceReturn/vo/DeviceReturnPage.java

@@ -0,0 +1,122 @@
+package org.jeecg.modules.equipmentDisposal.deviceReturn.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecg.modules.equipmentDisposal.deviceReturn.entity.ReturnDevice;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 设备归还
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value = "device_returnPage对象", description = "设备归还")
+public class DeviceReturnPage {
+
+    /**
+     * id
+     */
+    @ApiModelProperty(value = "id")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 日期
+     */
+    @Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "日期")
+    private Date createDate;
+    /**
+     * 归还单号
+     */
+    @Excel(name = "归还单号", width = 15)
+    @ApiModelProperty(value = "归还单号")
+    private String returnNumber;
+    /**
+     * 涉及设备编号
+     */
+    @Excel(name = "涉及设备编号", width = 15)
+    @ApiModelProperty(value = "涉及设备编号")
+    private String deviceNumber;
+    /**
+     * 涉及设备名称
+     */
+    @Excel(name = "涉及设备名称", width = 15)
+    @ApiModelProperty(value = "涉及设备名称")
+    private String deviceName;
+    /**
+     * 归还人
+     */
+    @Excel(name = "归还人", width = 15)
+    @ApiModelProperty(value = "归还人")
+    private String returner;
+    /**
+     * 经办人
+     */
+    @Excel(name = "经办人", width = 15)
+    @ApiModelProperty(value = "经办人")
+    private String handler;
+    /**
+     * 申请时间
+     */
+    @Excel(name = "申请时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申请时间")
+    private Date applicationTime;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+    /**
+     * 审批状态,如进行中、已结束、已打回
+     */
+    @Excel(name = "审批状态,如进行中、已结束、已打回", width = 15)
+    @ApiModelProperty(value = "审批状态,如进行中、已结束、已打回")
+    private String approvalStatus;
+
+    @ExcelCollection(name = "归还设备")
+    @ApiModelProperty(value = "归还设备")
+    private List<ReturnDevice> returnDeviceList;
+
+}

+ 10 - 23
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/controller/DeviceTransferController.java

@@ -17,12 +17,12 @@ import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.attachments.entity.Attachments;
+import org.jeecg.modules.attachments.service.IAttachmentsService;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.dto.DeviceTransferItemQuery;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.DeviceTransfer;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferItem;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.service.IDeviceTransferService;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.service.ITransferAttachmentsService;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.service.ITransferItemService;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.vo.DeviceTransferItemVO;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.vo.DeviceTransferPage;
@@ -72,7 +72,7 @@ public class DeviceTransferController {
     @Autowired
     private IDeviceTransferService deviceTransferService;
     @Autowired
-    private ITransferAttachmentsService transferAttachmentsService;
+    private IAttachmentsService attachmentsService;
     @Autowired
     private ITransferItemService transferItemService;
 
@@ -111,7 +111,7 @@ public class DeviceTransferController {
     public Result<String> add(@RequestBody DeviceTransferPage deviceTransferPage) {
         DeviceTransfer deviceTransfer = new DeviceTransfer();
         BeanUtils.copyProperties(deviceTransferPage, deviceTransfer);
-        deviceTransferService.saveMain(deviceTransfer, deviceTransferPage.getTransferAttachmentsList(), deviceTransferPage.getTransferItemList());
+        deviceTransferService.saveMain(deviceTransfer, deviceTransferPage.getTransferItemList());
         return Result.OK("添加成功!");
     }
 
@@ -132,7 +132,7 @@ public class DeviceTransferController {
         if (deviceTransferEntity == null) {
             return Result.error("未找到对应数据");
         }
-        deviceTransferService.updateMain(deviceTransfer, deviceTransferPage.getTransferAttachmentsList(), deviceTransferPage.getTransferItemList());
+        deviceTransferService.updateMain(deviceTransfer, deviceTransferPage.getTransferItemList());
         return Result.OK("编辑成功!");
     }
 
@@ -184,19 +184,6 @@ public class DeviceTransferController {
 
     }
 
-    /**
-     * 通过id查询
-     *
-     * @param id
-     * @return
-     */
-    //@AutoLog(value = "调拨详情--相关附件通过主表ID查询")
-    @ApiOperation(value = "调拨详情--相关附件主表ID查询", notes = "调拨详情--相关附件-通主表ID查询")
-    @GetMapping(value = "/queryTransferAttachmentsByMainId")
-    public Result<List<TransferAttachments>> queryTransferAttachmentsListByMainId(@RequestParam(name = "id", required = true) String id) {
-        List<TransferAttachments> transferAttachmentsList = transferAttachmentsService.selectByMainId(id);
-        return Result.OK(transferAttachmentsList);
-    }
 
     /**
      * 通过id查询
@@ -239,7 +226,7 @@ public class DeviceTransferController {
         for (DeviceTransfer main : deviceTransferList) {
             DeviceTransferPage vo = new DeviceTransferPage();
             BeanUtils.copyProperties(main, vo);
-            List<TransferAttachments> transferAttachmentsList = transferAttachmentsService.selectByMainId(main.getId());
+            List<Attachments> transferAttachmentsList = attachmentsService.selectByMainId(main.getId());
             vo.setTransferAttachmentsList(transferAttachmentsList);
             List<TransferItem> transferItemList = transferItemService.selectByMainId(main.getId());
             vo.setTransferItemList(transferItemList);
@@ -279,7 +266,7 @@ public class DeviceTransferController {
                 for (DeviceTransferPage page : list) {
                     DeviceTransfer po = new DeviceTransfer();
                     BeanUtils.copyProperties(page, po);
-                    deviceTransferService.saveMain(po, page.getTransferAttachmentsList(), page.getTransferItemList());
+                    deviceTransferService.saveMain(po, page.getTransferItemList());
                 }
                 return Result.OK("文件导入成功!数据行数:" + list.size());
             } catch (Exception e) {
@@ -332,9 +319,9 @@ public class DeviceTransferController {
     @ApiOperation(value = "设备调拨记录-分页列表查询", notes = "设备调拨记录-分页列表查询")
     @GetMapping(value = "/transferList")
     public Result<IPage<TransferItem>> queryPageTransferList(TransferItem transferItem,
-                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                     HttpServletRequest req) {
+                                                             @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                             HttpServletRequest req) {
         QueryWrapper<TransferItem> queryWrapper = QueryGenerator.initQueryWrapper(transferItem, req.getParameterMap());
         Page<TransferItem> page = new Page<TransferItem>(pageNo, pageSize);
         IPage<TransferItem> pageList = transferItemService.page(page, queryWrapper);

+ 0 - 80
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/entity/TransferAttachments.java

@@ -1,80 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceTransfer.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.jeecgframework.poi.excel.annotation.Excel;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @Description: 调拨详情--相关附件
- * @Author: jeecg-boot
- * @Date: 2025-04-15
- * @Version: V1.0
- */
-@ApiModel(value = "sbsmzq_transfer_attachments对象", description = "调拨详情--相关附件")
-@Data
-@TableName("sbsmzq_transfer_attachments")
-public class TransferAttachments implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键
-     */
-    @TableId(type = IdType.ASSIGN_ID)
-    @ApiModelProperty(value = "主键")
-    private String id;
-    /**
-     * 创建人
-     */
-    @ApiModelProperty(value = "创建人")
-    private String createBy;
-    /**
-     * 创建日期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @ApiModelProperty(value = "创建日期")
-    private Date createTime;
-    /**
-     * 更新人
-     */
-    @ApiModelProperty(value = "更新人")
-    private String updateBy;
-    /**
-     * 更新日期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @ApiModelProperty(value = "更新日期")
-    private Date updateTime;
-    /**
-     * 所属部门
-     */
-    @ApiModelProperty(value = "所属部门")
-    private String sysOrgCode;
-    /**
-     * 文件名称
-     */
-    @Excel(name = "文件名称", width = 15)
-    @ApiModelProperty(value = "文件名称")
-    private String fileName;
-    /**
-     * 文件地址
-     */
-    @Excel(name = "文件地址", width = 15)
-    @ApiModelProperty(value = "文件地址")
-    private String fileAddress;
-    /**
-     * 调拨转移id
-     */
-    @ApiModelProperty(value = "调拨转移id")
-    private String transferId;
-}

+ 0 - 31
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/mapper/TransferAttachmentsMapper.java

@@ -1,31 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper;
-
-import java.util.List;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * @Description: 调拨详情--相关附件
- * @Author: jeecg-boot
- * @Date:   2025-04-15
- * @Version: V1.0
- */
-public interface TransferAttachmentsMapper extends BaseMapper<TransferAttachments> {
-
-	/**
-	 * 通过主表id删除子表数据
-	 *
-	 * @param mainId 主表id
-	 * @return boolean
-	 */
-	public boolean deleteByMainId(@Param("mainId") String mainId);
-
-  /**
-   * 通过主表id查询子表数据
-   *
-   * @param mainId 主表id
-   * @return List<TransferAttachments>
-   */
-	public List<TransferAttachments> selectByMainId(@Param("mainId") String mainId);
-}

+ 0 - 16
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/mapper/xml/TransferAttachmentsMapper.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.TransferAttachmentsMapper">
-
-	<delete id="deleteByMainId" parameterType="java.lang.String">
-		DELETE 
-		FROM  sbsmzq_transfer_attachments 
-		WHERE
-			 transfer_id = #{mainId} 	</delete>
-	
-	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments">
-		SELECT * 
-		FROM  sbsmzq_transfer_attachments
-		WHERE
-			 transfer_id = #{mainId} 	</select>
-</mapper>

+ 37 - 40
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/IDeviceTransferService.java

@@ -2,11 +2,10 @@ package org.jeecg.modules.equipmentDisposal.deviceTransfer.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.dto.DeviceTransferItemQuery;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferItem;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.DeviceTransfer;
-import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferItem;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.vo.DeviceTransferItemVO;
 
 import java.io.Serializable;
@@ -16,45 +15,43 @@ import java.util.List;
 /**
  * @Description: 设备调拨转移
  * @Author: jeecg-boot
- * @Date:   2025-04-15
+ * @Date: 2025-04-15
  * @Version: V1.0
  */
 public interface IDeviceTransferService extends IService<DeviceTransfer> {
 
-	/**
-	 * 添加一对多
-	 *
-	 * @param deviceTransfer
-	 * @param transferAttachmentsList
-	 * @param transferItemList
-	 */
-	public void saveMain(DeviceTransfer deviceTransfer,List<TransferAttachments> transferAttachmentsList,List<TransferItem> transferItemList) ;
-	
-	/**
-	 * 修改一对多
-	 *
-   * @param deviceTransfer
-   * @param transferAttachmentsList
-   * @param transferItemList
-	 */
-	public void updateMain(DeviceTransfer deviceTransfer,List<TransferAttachments> transferAttachmentsList,List<TransferItem> transferItemList);
-	
-	/**
-	 * 删除一对多
-	 *
-	 * @param id
-	 */
-	public void delMain (String id);
-	
-	/**
-	 * 批量删除一对多
-	 *
-	 * @param idList
-	 */
-	public void delBatchMain (Collection<? extends Serializable> idList);
-
-	IPage<DeviceTransferItemVO> getPagedTransferItems(Page<DeviceTransferItemVO> page, DeviceTransferItemQuery query);
-
-	long getTransferItemsCount(DeviceTransferItemQuery query);
-	
+    /**
+     * 添加一对多
+     *
+     * @param deviceTransfer
+     * @param transferItemList
+     */
+    public void saveMain(DeviceTransfer deviceTransfer, List<TransferItem> transferItemList);
+
+    /**
+     * 修改一对多
+     *
+     * @param deviceTransfer
+     * @param transferItemList
+     */
+    public void updateMain(DeviceTransfer deviceTransfer, List<TransferItem> transferItemList);
+
+    /**
+     * 删除一对多
+     *
+     * @param id
+     */
+    public void delMain(String id);
+
+    /**
+     * 批量删除一对多
+     *
+     * @param idList
+     */
+    public void delBatchMain(Collection<? extends Serializable> idList);
+
+    IPage<DeviceTransferItemVO> getPagedTransferItems(Page<DeviceTransferItemVO> page, DeviceTransferItemQuery query);
+
+    long getTransferItemsCount(DeviceTransferItemQuery query);
+
 }

+ 0 - 22
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/ITransferAttachmentsService.java

@@ -1,22 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceTransfer.service;
-
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
-import com.baomidou.mybatisplus.extension.service.IService;
-import java.util.List;
-
-/**
- * @Description: 调拨详情--相关附件
- * @Author: jeecg-boot
- * @Date:   2025-04-15
- * @Version: V1.0
- */
-public interface ITransferAttachmentsService extends IService<TransferAttachments> {
-
-	/**
-	 * 通过主表id查询子表数据
-	 *
-	 * @param mainId 主表id
-	 * @return List<TransferAttachments>
-	 */
-	public List<TransferAttachments> selectByMainId(String mainId);
-}

+ 61 - 81
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/impl/DeviceTransferServiceImpl.java

@@ -2,110 +2,90 @@ package org.jeecg.modules.equipmentDisposal.deviceTransfer.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.dto.DeviceTransferItemQuery;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.DeviceTransfer;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferItem;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.TransferAttachmentsMapper;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.TransferItemMapper;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.DeviceTransferMapper;
+import org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.TransferItemMapper;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.service.IDeviceTransferService;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.vo.DeviceTransferItemVO;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
 import java.io.Serializable;
-import java.util.List;
 import java.util.Collection;
+import java.util.List;
 
 /**
  * @Description: 设备调拨转移
  * @Author: jeecg-boot
- * @Date:   2025-04-15
+ * @Date: 2025-04-15
  * @Version: V1.0
  */
 @Service
 public class DeviceTransferServiceImpl extends ServiceImpl<DeviceTransferMapper, DeviceTransfer> implements IDeviceTransferService {
 
-	@Autowired
-	private DeviceTransferMapper deviceTransferMapper;
-	@Autowired
-	private TransferAttachmentsMapper transferAttachmentsMapper;
-	@Autowired
-	private TransferItemMapper transferItemMapper;
-	
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public void saveMain(DeviceTransfer deviceTransfer, List<TransferAttachments> transferAttachmentsList,List<TransferItem> transferItemList) {
-		deviceTransferMapper.insert(deviceTransfer);
-		if(transferAttachmentsList!=null && transferAttachmentsList.size()>0) {
-			for(TransferAttachments entity:transferAttachmentsList) {
-				//外键设置
-				entity.setTransferId(deviceTransfer.getId());
-				transferAttachmentsMapper.insert(entity);
-			}
-		}
-		if(transferItemList!=null && transferItemList.size()>0) {
-			for(TransferItem entity:transferItemList) {
-				//外键设置
-				entity.setTransferId(deviceTransfer.getId());
-				transferItemMapper.insert(entity);
-			}
-		}
-	}
+    @Autowired
+    private DeviceTransferMapper deviceTransferMapper;
+    @Autowired
+    private TransferItemMapper transferItemMapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void saveMain(DeviceTransfer deviceTransfer, List<TransferItem> transferItemList) {
+        deviceTransferMapper.insert(deviceTransfer);
+        if (transferItemList != null && transferItemList.size() > 0) {
+            for (TransferItem entity : transferItemList) {
+                //外键设置
+                entity.setTransferId(deviceTransfer.getId());
+                transferItemMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void updateMain(DeviceTransfer deviceTransfer, List<TransferItem> transferItemList) {
+        deviceTransferMapper.updateById(deviceTransfer);
+
+        //1.先删除子表数据
+        transferItemMapper.deleteByMainId(deviceTransfer.getId());
 
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public void updateMain(DeviceTransfer deviceTransfer,List<TransferAttachments> transferAttachmentsList,List<TransferItem> transferItemList) {
-		deviceTransferMapper.updateById(deviceTransfer);
-		
-		//1.先删除子表数据
-		transferAttachmentsMapper.deleteByMainId(deviceTransfer.getId());
-		transferItemMapper.deleteByMainId(deviceTransfer.getId());
-		
-		//2.子表数据重新插入
-		if(transferAttachmentsList!=null && transferAttachmentsList.size()>0) {
-			for(TransferAttachments entity:transferAttachmentsList) {
-				//外键设置
-				entity.setTransferId(deviceTransfer.getId());
-				transferAttachmentsMapper.insert(entity);
-			}
-		}
-		if(transferItemList!=null && transferItemList.size()>0) {
-			for(TransferItem entity:transferItemList) {
-				//外键设置
-				entity.setTransferId(deviceTransfer.getId());
-				transferItemMapper.insert(entity);
-			}
-		}
-	}
+        //2.子表数据重新插入
+        if (transferItemList != null && transferItemList.size() > 0) {
+            for (TransferItem entity : transferItemList) {
+                //外键设置
+                entity.setTransferId(deviceTransfer.getId());
+                transferItemMapper.insert(entity);
+            }
+        }
+    }
 
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public void delMain(String id) {
-		transferAttachmentsMapper.deleteByMainId(id);
-		transferItemMapper.deleteByMainId(id);
-		deviceTransferMapper.deleteById(id);
-	}
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delMain(String id) {
+        transferItemMapper.deleteByMainId(id);
+        deviceTransferMapper.deleteById(id);
+    }
 
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public void delBatchMain(Collection<? extends Serializable> idList) {
-		for(Serializable id:idList) {
-			transferAttachmentsMapper.deleteByMainId(id.toString());
-			transferItemMapper.deleteByMainId(id.toString());
-			deviceTransferMapper.deleteById(id);
-		}
-	}
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delBatchMain(Collection<? extends Serializable> idList) {
+        for (Serializable id : idList) {
+            transferItemMapper.deleteByMainId(id.toString());
+            deviceTransferMapper.deleteById(id);
+        }
+    }
 
-	public IPage<DeviceTransferItemVO> getPagedTransferItems(Page<DeviceTransferItemVO> page, DeviceTransferItemQuery query) {
-		return baseMapper.queryTransferItemsPage(page, query);
-	}
+    public IPage<DeviceTransferItemVO> getPagedTransferItems(Page<DeviceTransferItemVO> page, DeviceTransferItemQuery query) {
+        return baseMapper.queryTransferItemsPage(page, query);
+    }
 
-	@Override
-	public long getTransferItemsCount(DeviceTransferItemQuery query) {
-		return baseMapper.countTransferItems(query);
-	}
+    @Override
+    public long getTransferItemsCount(DeviceTransferItemQuery query) {
+        return baseMapper.countTransferItems(query);
+    }
 
 }

+ 0 - 27
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/service/impl/TransferAttachmentsServiceImpl.java

@@ -1,27 +0,0 @@
-package org.jeecg.modules.equipmentDisposal.deviceTransfer.service.impl;
-
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.TransferAttachmentsMapper;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.service.ITransferAttachmentsService;
-import org.springframework.stereotype.Service;
-import java.util.List;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * @Description: 调拨详情--相关附件
- * @Author: jeecg-boot
- * @Date:   2025-04-15
- * @Version: V1.0
- */
-@Service
-public class TransferAttachmentsServiceImpl extends ServiceImpl<TransferAttachmentsMapper, TransferAttachments> implements ITransferAttachmentsService {
-	
-	@Autowired
-	private TransferAttachmentsMapper transferAttachmentsMapper;
-	
-	@Override
-	public List<TransferAttachments> selectByMainId(String mainId) {
-		return transferAttachmentsMapper.selectByMainId(mainId);
-	}
-}

+ 2 - 2
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceTransfer/vo/DeviceTransferPage.java

@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferAttachments;
+import org.jeecg.modules.attachments.entity.Attachments;
 import org.jeecg.modules.equipmentDisposal.deviceTransfer.entity.TransferItem;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.jeecgframework.poi.excel.annotation.ExcelCollection;
@@ -144,7 +144,7 @@ public class DeviceTransferPage {
 
     @ExcelCollection(name = "调拨详情--相关附件")
     @ApiModelProperty(value = "调拨详情--相关附件")
-    private List<TransferAttachments> transferAttachmentsList;
+    private List<Attachments> transferAttachmentsList;
     @ExcelCollection(name = "设备调拨转移--调拨列表")
     @ApiModelProperty(value = "设备调拨转移--调拨列表")
     private List<TransferItem> transferItemList;

+ 178 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/controller/SpecialDeviceCategoryController.java

@@ -0,0 +1,178 @@
+package org.jeecg.modules.specialEquipment.specialDevice.controller;
+
+import java.util.Arrays;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.specialEquipment.specialDevice.dto.CategoryQueryDTO;
+import org.jeecg.modules.specialEquipment.specialDevice.entity.SpecialDeviceCategory;
+import org.jeecg.modules.specialEquipment.specialDevice.service.ISpecialDeviceCategoryService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: 特种设备类别
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+@Api(tags="特种设备类别")
+@RestController
+@RequestMapping("/specialEquipment/specialDeviceCategory")
+@Slf4j
+public class SpecialDeviceCategoryController extends JeecgController<SpecialDeviceCategory, ISpecialDeviceCategoryService> {
+	@Autowired
+	private ISpecialDeviceCategoryService specialDeviceCategoryService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param specialDeviceCategory
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "特种设备类别-分页列表查询")
+	@ApiOperation(value="特种设备类别-分页列表查询", notes="特种设备类别-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<SpecialDeviceCategory>> queryPageList(SpecialDeviceCategory specialDeviceCategory,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<SpecialDeviceCategory> queryWrapper = QueryGenerator.initQueryWrapper(specialDeviceCategory, req.getParameterMap());
+		Page<SpecialDeviceCategory> page = new Page<SpecialDeviceCategory>(pageNo, pageSize);
+		IPage<SpecialDeviceCategory> pageList = specialDeviceCategoryService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param specialDeviceCategory
+	 * @return
+	 */
+	@AutoLog(value = "特种设备类别-添加")
+	@ApiOperation(value="特种设备类别-添加", notes="特种设备类别-添加")
+	@RequiresPermissions("specialEquipment:sbsmzq_special_device_category:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody SpecialDeviceCategory specialDeviceCategory) {
+		specialDeviceCategoryService.save(specialDeviceCategory);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param specialDeviceCategory
+	 * @return
+	 */
+	@AutoLog(value = "特种设备类别-编辑")
+	@ApiOperation(value="特种设备类别-编辑", notes="特种设备类别-编辑")
+	@RequiresPermissions("specialEquipment:sbsmzq_special_device_category:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody SpecialDeviceCategory specialDeviceCategory) {
+		specialDeviceCategoryService.updateById(specialDeviceCategory);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "特种设备类别-通过id删除")
+	@ApiOperation(value="特种设备类别-通过id删除", notes="特种设备类别-通过id删除")
+	@RequiresPermissions("specialEquipment:sbsmzq_special_device_category:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		specialDeviceCategoryService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "特种设备类别-批量删除")
+	@ApiOperation(value="特种设备类别-批量删除", notes="特种设备类别-批量删除")
+	@RequiresPermissions("specialEquipment:sbsmzq_special_device_category:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.specialDeviceCategoryService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "特种设备类别-通过id查询")
+	@ApiOperation(value="特种设备类别-通过id查询", notes="特种设备类别-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<SpecialDeviceCategory> queryById(@RequestParam(name="id",required=true) String id) {
+		SpecialDeviceCategory specialDeviceCategory = specialDeviceCategoryService.getById(id);
+		if(specialDeviceCategory==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(specialDeviceCategory);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param specialDeviceCategory
+    */
+    @RequiresPermissions("specialEquipment:sbsmzq_special_device_category:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, SpecialDeviceCategory specialDeviceCategory) {
+        return super.exportXls(request, specialDeviceCategory, SpecialDeviceCategory.class, "特种设备类别");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("specialEquipment:sbsmzq_special_device_category:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, SpecialDeviceCategory.class);
+    }
+
+
+	 @GetMapping("/allList")
+	 @ApiOperation(value = "查询所有设备类别信息")
+	 public Result<?> allList(CategoryQueryDTO queryDTO){
+
+		 return Result.OK(specialDeviceCategoryService.getAllList(queryDTO));
+	 }
+
+	 @GetMapping("/treeList")
+	 @ApiOperation(value = "查询设备类别树信息")
+	 public Result<?> list(CategoryQueryDTO queryDTO){
+
+		 return Result.OK(specialDeviceCategoryService.getTreeList(queryDTO));
+	 }
+}

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/dto/CategoryQueryDTO.java

@@ -0,0 +1,11 @@
+package org.jeecg.modules.specialEquipment.specialDevice.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class CategoryQueryDTO {
+
+    @ApiModelProperty("类别名称")
+    private String name;
+}

+ 115 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/entity/SpecialDeviceCategory.java

@@ -0,0 +1,115 @@
+package org.jeecg.modules.specialEquipment.specialDevice.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 特种设备类别
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_special_device_category")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_special_device_category对象", description = "特种设备类别")
+public class SpecialDeviceCategory implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 类别名称
+     */
+    @Excel(name = "类别名称", width = 15)
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+    /**
+     * 编号
+     */
+    @Excel(name = "编号", width = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 父节点ID
+     */
+    @Excel(name = "父节点ID", width = 15)
+    @ApiModelProperty(value = "父节点ID")
+    private String pid;
+    /**
+     * 类型
+     */
+    @Excel(name = "类型", width = 15)
+    @ApiModelProperty(value = "类型")
+    private Integer type;
+    /**
+     * 图标路径
+     */
+    @Excel(name = "图标路径", width = 15)
+    @ApiModelProperty(value = "图标路径")
+    private String icon;
+    /**
+     * 是否默认展开(1 是,0 否)
+     */
+    @Excel(name = "是否默认展开(1 是,0 否)", width = 15)
+    @ApiModelProperty(value = "是否默认展开(1 是,0 否)")
+    private Integer open;
+    /**
+     * 排序字段
+     */
+    @Excel(name = "排序字段", width = 15)
+    @ApiModelProperty(value = "排序字段")
+    private Integer sortOrder;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/mapper/SpecialDeviceCategoryMapper.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.specialEquipment.specialDevice.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.jeecg.modules.specialEquipment.specialDevice.entity.SpecialDeviceCategory;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 特种设备类别
+ * @Author: jeecg-boot
+ * @Date:   2025-05-15
+ * @Version: V1.0
+ */
+@Mapper
+public interface SpecialDeviceCategoryMapper extends BaseMapper<SpecialDeviceCategory> {
+
+}

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/mapper/xml/SpecialDeviceCategoryMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.specialEquipment.specialDevice.mapper.SpecialDeviceCategoryMapper">
+
+</mapper>

+ 32 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/service/ISpecialDeviceCategoryService.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.specialEquipment.specialDevice.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.specialEquipment.specialDevice.dto.CategoryQueryDTO;
+import org.jeecg.modules.specialEquipment.specialDevice.entity.SpecialDeviceCategory;
+import org.jeecg.modules.specialEquipment.specialDevice.vo.SpecialDeviceCategoryVO;
+
+import java.util.List;
+
+/**
+ * @Description: 特种设备类别
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+public interface ISpecialDeviceCategoryService extends IService<SpecialDeviceCategory> {
+
+    /**
+     * 查询所有设备类别信息
+     *
+     * @return List<SpecialDeviceCategory> list
+     */
+    List<SpecialDeviceCategory> getAllList(CategoryQueryDTO queryDTO);
+
+    /**
+     * 查询设备类别树信息
+     *
+     * @return List<SpecialDeviceCategoryVO> list
+     */
+    List<SpecialDeviceCategoryVO> getTreeList(CategoryQueryDTO queryDTO);
+
+}

+ 61 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/service/impl/SpecialDeviceCategoryServiceImpl.java

@@ -0,0 +1,61 @@
+package org.jeecg.modules.specialEquipment.specialDevice.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.specialEquipment.specialDevice.dto.CategoryQueryDTO;
+import org.jeecg.modules.specialEquipment.specialDevice.entity.SpecialDeviceCategory;
+import org.jeecg.modules.specialEquipment.specialDevice.mapper.SpecialDeviceCategoryMapper;
+import org.jeecg.modules.specialEquipment.specialDevice.service.ISpecialDeviceCategoryService;
+import org.jeecg.modules.specialEquipment.specialDevice.vo.SpecialDeviceCategoryVO;
+import org.jeecg.modules.utils.TreeUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 特种设备类别
+ * @Author: jeecg-boot
+ * @Date: 2025-05-15
+ * @Version: V1.0
+ */
+@Service
+public class SpecialDeviceCategoryServiceImpl extends ServiceImpl<SpecialDeviceCategoryMapper, SpecialDeviceCategory> implements ISpecialDeviceCategoryService {
+
+    @Autowired
+    private SpecialDeviceCategoryMapper specialDeviceCategoryMapper;
+
+    @Override
+    public List<SpecialDeviceCategory> getAllList(CategoryQueryDTO queryDTO) {
+        LambdaQueryWrapper<SpecialDeviceCategory> wrapper = new LambdaQueryWrapper<>();
+
+        if (StringUtils.hasText(queryDTO.getName())) {
+            wrapper.like(SpecialDeviceCategory::getName, queryDTO.getName());
+        }
+
+        List<SpecialDeviceCategory> specialDeviceCategoryList = specialDeviceCategoryMapper.selectList(wrapper);
+
+        return specialDeviceCategoryList;
+    }
+
+    @Override
+    public List<SpecialDeviceCategoryVO> getTreeList(CategoryQueryDTO queryDTO) {
+
+        LambdaQueryWrapper<SpecialDeviceCategory> wrapper = new LambdaQueryWrapper<>();
+
+        if (StringUtils.hasText(queryDTO.getName())) {
+            wrapper.like(SpecialDeviceCategory::getName, queryDTO.getName());
+        }
+
+        List<SpecialDeviceCategory> specialDeviceCategories = specialDeviceCategoryMapper.selectList(wrapper);
+
+        List<SpecialDeviceCategoryVO> collect = specialDeviceCategories.stream().map(item -> new SpecialDeviceCategoryVO().convert(item))
+                .collect(Collectors.toList());
+
+        TreeUtils<SpecialDeviceCategoryVO, String> treeUtils = new TreeUtils<>(SpecialDeviceCategoryVO::getPid, SpecialDeviceCategoryVO::getId, SpecialDeviceCategoryVO::setChildren);
+
+        return treeUtils.convertTree(collect);
+    }
+}

+ 88 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/specialDevice/vo/SpecialDeviceCategoryVO.java

@@ -0,0 +1,88 @@
+package org.jeecg.modules.specialEquipment.specialDevice.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.modules.specialEquipment.specialDevice.entity.SpecialDeviceCategory;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class SpecialDeviceCategoryVO {
+
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+
+    @ApiModelProperty(value = "类别名称")
+    private String name;
+
+    @ApiModelProperty(value = "编号")
+    private String number;
+
+    @ApiModelProperty(value = "父节点ID")
+    private String pid;
+
+    @ApiModelProperty(value = "类型")
+    private Integer type;
+
+    @ApiModelProperty(value = "图标路径")
+    private String icon;
+
+    @ApiModelProperty(value = "是否默认展开(1 是,0 否)")
+    private Integer open;
+
+    @ApiModelProperty(value = "排序字段")
+    private Integer sortOrder;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty("子集")
+    private List<SpecialDeviceCategoryVO> children;
+
+    public SpecialDeviceCategoryVO convert(SpecialDeviceCategory specialDeviceCategory) {
+        SpecialDeviceCategoryVO vo = new SpecialDeviceCategoryVO();
+        vo.setId(specialDeviceCategory.getId());
+        vo.setCreateBy(specialDeviceCategory.getCreateBy());
+        vo.setCreateTime(specialDeviceCategory.getCreateTime());
+        vo.setUpdateBy(specialDeviceCategory.getUpdateBy());
+        vo.setUpdateTime(specialDeviceCategory.getUpdateTime());
+        vo.setSysOrgCode(specialDeviceCategory.getSysOrgCode());
+        vo.setName(specialDeviceCategory.getName());
+        vo.setNumber(specialDeviceCategory.getNumber());
+        vo.setPid(specialDeviceCategory.getPid());
+        vo.setType(specialDeviceCategory.getType());
+        vo.setType(specialDeviceCategory.getType());
+        vo.setIcon(specialDeviceCategory.getIcon());
+        vo.setOpen(specialDeviceCategory.getOpen());
+        vo.setSortOrder(specialDeviceCategory.getSortOrder());
+        vo.setRemark(specialDeviceCategory.getRemark());
+
+        return vo;
+    }
+
+}

+ 113 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/utils/TreeUtils.java

@@ -0,0 +1,113 @@
+package org.jeecg.modules.utils;
+
+import cn.hutool.core.lang.Assert;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+
+/**
+ * 组装树结构工具类
+ *
+ * @author llp
+ * date: 2025-05-15 13:57
+ * description:  T:实体类(object)    R:id的类型(Long or String ...)
+ */
+@Getter
+@Setter
+public class TreeUtils<T, R> {
+
+
+    private TreeUtils() {
+
+    }
+
+    public TreeUtils(Function<T, R> pid, Function<T, R> id, BiConsumer<T, List<T>> child) {
+
+        this.id = id;
+        this.pid = pid;
+        this.child = child;
+    }
+
+
+    /**
+     * 父id
+     */
+    Function<T, R> pid;
+    /**
+     * id
+     */
+    Function<T, R> id;
+
+    /**
+     * 子节点
+     */
+    BiConsumer<T, List<T>> child;
+
+
+    /**
+     * 转成树
+     */
+    public List<T> convertTree(List<T> nodeList) {
+        Assert.notNull(pid, "pid不能为空");
+        Assert.notNull(id, "id不能为空");
+        Assert.notNull(child, "child不能为空");
+
+
+        List<T> returnList = new ArrayList<>();
+        List<R> tempList = new ArrayList<>();
+        for (T t : nodeList) {
+            tempList.add(id.apply(t));
+        }
+
+        for (T menu : nodeList) {
+            // 如果是顶级节点, 遍历该父节点的所有子节点
+            if (!tempList.contains(pid.apply(menu))) {
+                recursionFn(nodeList, menu);
+                returnList.add(menu);
+            }
+        }
+
+
+        return returnList;
+    }
+
+    /**
+     * 递归列表
+     */
+    private void recursionFn(List<T> list, T t) {
+        // 得到子节点列表
+        List<T> childList = getChildList(list, t);
+        child.accept(t, childList);
+        for (T tChild : childList) {
+            if (hasChild(list, tChild)) {
+                recursionFn(list, tChild);
+            }
+        }
+    }
+
+    /**
+     * 判断是否有子节点
+     */
+    private boolean hasChild(List<T> list, T t) {
+        return getChildList(list, t).size() > 0;
+    }
+
+    /**
+     * 得到子节点列表
+     */
+    private List<T> getChildList(List<T> list, T t) {
+        List<T> permissionsList = new ArrayList<>();
+        for (T n : list) {
+            if (pid.apply(n).equals(id.apply(t))) {
+                permissionsList.add(n);
+            }
+        }
+        return permissionsList;
+    }
+
+
+}

+ 2 - 2
zgzt-sbsmzq/jeecg-server-cloud/jeecg-cloud-nacos/src/main/resources/application.yml

@@ -16,8 +16,8 @@ db:
     #    '0': jdbc:mysql://192.168.1.190:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
     #  研发环境
     '0': jdbc:mysql://192.168.1.53:3306/nacos_sbsmzq?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
-  #  本地环境
-#     '0': jdbc:mysql://127.0.0.1:3307/nacos_sbsmzq?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
+  #  本地服务器环境
+#     '0': jdbc:mysql://192.168.1.53:8301/nacos_sbsmzq?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
   user:
     '0': root
   password: