Browse Source

新增设备检验、故障处理、检验记录、维修工单、计划备件、备件更换、验收信息模块

lingpeng.li 1 week ago
parent
commit
ecce688361
46 changed files with 3610 additions and 1 deletions
  1. 1 1
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceSale/dto/DeviceSaleItemQuery.java
  2. 177 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/AcceptanceInfoController.java
  3. 177 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/FaultHandlingInfoController.java
  4. 331 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/MaintenanceOrderController.java
  5. 179 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/PlannedSparePartsController.java
  6. 175 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/SparePartReplaceController.java
  7. 106 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/AcceptanceInfo.java
  8. 129 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/FaultHandlingInfo.java
  9. 232 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/MaintenanceOrder.java
  10. 97 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/PlannedSpareParts.java
  11. 160 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/SparePartReplace.java
  12. 40 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/AcceptanceInfoMapper.java
  13. 38 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/FaultHandlingInfoMapper.java
  14. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/MaintenanceOrderMapper.java
  15. 26 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/PlannedSparePartsMapper.java
  16. 26 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/SparePartReplaceMapper.java
  17. 25 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/AcceptanceInfoMapper.xml
  18. 26 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/FaultHandlingInfoMapper.xml
  19. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/MaintenanceOrderMapper.xml
  20. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/PlannedSparePartsMapper.xml
  21. 11 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/SparePartReplaceMapper.xml
  22. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IAcceptanceInfoService.java
  23. 28 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IFaultHandlingInfoService.java
  24. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IMaintenanceOrderService.java
  25. 23 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IPlannedSparePartsService.java
  26. 23 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/ISparePartReplaceService.java
  27. 45 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/AcceptanceInfoServiceImpl.java
  28. 42 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/FaultHandlingInfoServiceImpl.java
  29. 19 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/MaintenanceOrderServiceImpl.java
  30. 31 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/PlannedSparePartsServiceImpl.java
  31. 28 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/SparePartReplaceServiceImpl.java
  32. 197 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/vo/MyMaintenanceVO.java
  33. 331 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/controller/EquipmentInspectionController.java
  34. 30 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/dto/InspectionRecordQueryDTO.java
  35. 157 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/entity/EquipmentInspection.java
  36. 126 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/entity/InspectionRecord.java
  37. 14 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/EquipmentInspectionMapper.java
  38. 41 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/InspectionRecordMapper.java
  39. 5 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/xml/EquipmentInspectionMapper.xml
  40. 101 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/xml/InspectionRecordMapper.xml
  41. 48 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/IEquipmentInspectionService.java
  42. 32 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/IInspectionRecordService.java
  43. 77 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/impl/EquipmentInspectionServiceImpl.java
  44. 42 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/impl/InspectionRecordServiceImpl.java
  45. 115 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/vo/EquipmentInspectionPage.java
  46. 28 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/vo/InspectionRecordVO.java

+ 1 - 1
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceSale/dto/DeviceSaleItemQuery.java

@@ -24,7 +24,7 @@ public class DeviceSaleItemQuery {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime startTime;
     /**
-     * 申请结束时间时间
+     * 申请结束时间
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")

+ 177 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/AcceptanceInfoController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.equipmentMaintenance.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.equipmentMaintenance.entity.AcceptanceInfo;
+import org.jeecg.modules.equipmentMaintenance.service.IAcceptanceInfoService;
+
+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-06-04
+ * @Version: V1.0
+ */
+@Api(tags="验收信息")
+@RestController
+@RequestMapping("/equipmentMaintenance/acceptanceInfo")
+@Slf4j
+public class AcceptanceInfoController extends JeecgController<AcceptanceInfo, IAcceptanceInfoService> {
+	@Autowired
+	private IAcceptanceInfoService acceptanceInfoService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param acceptanceInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "验收信息-分页列表查询")
+	@ApiOperation(value="验收信息-分页列表查询", notes="验收信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<AcceptanceInfo>> queryPageList(AcceptanceInfo acceptanceInfo,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<AcceptanceInfo> queryWrapper = QueryGenerator.initQueryWrapper(acceptanceInfo, req.getParameterMap());
+		Page<AcceptanceInfo> page = new Page<AcceptanceInfo>(pageNo, pageSize);
+		IPage<AcceptanceInfo> pageList = acceptanceInfoService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param acceptanceInfo
+	 * @return
+	 */
+	@AutoLog(value = "验收信息-添加")
+	@ApiOperation(value="验收信息-添加", notes="验收信息-添加")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_acceptance_info:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody AcceptanceInfo acceptanceInfo) {
+		acceptanceInfoService.save(acceptanceInfo);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param acceptanceInfo
+	 * @return
+	 */
+	@AutoLog(value = "验收信息-编辑")
+	@ApiOperation(value="验收信息-编辑", notes="验收信息-编辑")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_acceptance_info:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody AcceptanceInfo acceptanceInfo) {
+		acceptanceInfoService.updateById(acceptanceInfo);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "验收信息-通过id删除")
+	@ApiOperation(value="验收信息-通过id删除", notes="验收信息-通过id删除")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_acceptance_info:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		acceptanceInfoService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "验收信息-批量删除")
+	@ApiOperation(value="验收信息-批量删除", notes="验收信息-批量删除")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_acceptance_info:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.acceptanceInfoService.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<AcceptanceInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		AcceptanceInfo acceptanceInfo = acceptanceInfoService.getById(id);
+		if(acceptanceInfo==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(acceptanceInfo);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param acceptanceInfo
+    */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_acceptance_info:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, AcceptanceInfo acceptanceInfo) {
+        return super.exportXls(request, acceptanceInfo, AcceptanceInfo.class, "验收信息");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_acceptance_info:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, AcceptanceInfo.class);
+    }
+
+
+	 /**
+	  * 通过id查询
+	  *
+	  * @param id
+	  * @return
+	  */
+	 @ApiOperation(value = "验收信息主表ID查询", notes = "验收信息主表ID查询")
+	 @GetMapping(value = "/queryAcceptanceInfoByMainId")
+	 public Result<AcceptanceInfo> queryAcceptanceInfoByMainId(@RequestParam(name = "id", required = true) String id) {
+		 AcceptanceInfo acceptanceInfo = acceptanceInfoService.selectByMainId(id);
+		 return Result.OK(acceptanceInfo);
+	 }
+
+}

+ 177 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/FaultHandlingInfoController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.equipmentMaintenance.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.equipmentMaintenance.entity.FaultHandlingInfo;
+import org.jeecg.modules.equipmentMaintenance.service.IFaultHandlingInfoService;
+
+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-06-04
+ * @Version: V1.0
+ */
+@Api(tags="故障处理信息")
+@RestController
+@RequestMapping("/equipmentMaintenance/faultHandlingInfo")
+@Slf4j
+public class FaultHandlingInfoController extends JeecgController<FaultHandlingInfo, IFaultHandlingInfoService> {
+	@Autowired
+	private IFaultHandlingInfoService faultHandlingInfoService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param faultHandlingInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "故障处理信息-分页列表查询")
+	@ApiOperation(value="故障处理信息-分页列表查询", notes="故障处理信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<FaultHandlingInfo>> queryPageList(FaultHandlingInfo faultHandlingInfo,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<FaultHandlingInfo> queryWrapper = QueryGenerator.initQueryWrapper(faultHandlingInfo, req.getParameterMap());
+		Page<FaultHandlingInfo> page = new Page<FaultHandlingInfo>(pageNo, pageSize);
+		IPage<FaultHandlingInfo> pageList = faultHandlingInfoService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param faultHandlingInfo
+	 * @return
+	 */
+	@AutoLog(value = "故障处理信息-添加")
+	@ApiOperation(value="故障处理信息-添加", notes="故障处理信息-添加")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_fault_handling_info:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody FaultHandlingInfo faultHandlingInfo) {
+		faultHandlingInfoService.save(faultHandlingInfo);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param faultHandlingInfo
+	 * @return
+	 */
+	@AutoLog(value = "故障处理信息-编辑")
+	@ApiOperation(value="故障处理信息-编辑", notes="故障处理信息-编辑")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_fault_handling_info:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody FaultHandlingInfo faultHandlingInfo) {
+		faultHandlingInfoService.updateById(faultHandlingInfo);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "故障处理信息-通过id删除")
+	@ApiOperation(value="故障处理信息-通过id删除", notes="故障处理信息-通过id删除")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_fault_handling_info:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		faultHandlingInfoService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "故障处理信息-批量删除")
+	@ApiOperation(value="故障处理信息-批量删除", notes="故障处理信息-批量删除")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_fault_handling_info:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.faultHandlingInfoService.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<FaultHandlingInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		FaultHandlingInfo faultHandlingInfo = faultHandlingInfoService.getById(id);
+		if(faultHandlingInfo==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(faultHandlingInfo);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param faultHandlingInfo
+    */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_fault_handling_info:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, FaultHandlingInfo faultHandlingInfo) {
+        return super.exportXls(request, faultHandlingInfo, FaultHandlingInfo.class, "故障处理信息");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_fault_handling_info:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, FaultHandlingInfo.class);
+    }
+
+
+	 /**
+	  * 通过id查询
+	  *
+	  * @param id
+	  * @return
+	  */
+	 @ApiOperation(value = "故障处理信息主表ID查询", notes = "故障处理信息主表ID查询")
+	 @GetMapping(value = "/queryFaultHandlingInfoByMainId")
+	 public Result<FaultHandlingInfo> queryFaultHandlingInfoByMainId(@RequestParam(name = "id", required = true) String id) {
+		 FaultHandlingInfo faultHandlingInfo = faultHandlingInfoService.selectByMainId(id);
+		 return Result.OK(faultHandlingInfo);
+	 }
+
+}

+ 331 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/MaintenanceOrderController.java

@@ -0,0 +1,331 @@
+package org.jeecg.modules.equipmentMaintenance.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.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.base.controller.JeecgController;
+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.modules.equipmentMaintenance.entity.AcceptanceInfo;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+import org.jeecg.modules.equipmentMaintenance.entity.MaintenanceOrder;
+import org.jeecg.modules.equipmentMaintenance.service.IAcceptanceInfoService;
+import org.jeecg.modules.equipmentMaintenance.service.IFaultHandlingInfoService;
+import org.jeecg.modules.equipmentMaintenance.service.IMaintenanceOrderService;
+import org.jeecg.modules.equipmentMaintenance.vo.MyMaintenanceVO;
+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.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 维修工单
+ * @Author: jeecg-boot
+ * @Date: 2025-06-04
+ * @Version: V1.0
+ */
+@Api(tags = "维修工单")
+@RestController
+@RequestMapping("/equipmentMaintenance/maintenanceOrder")
+@Slf4j
+public class MaintenanceOrderController extends JeecgController<MaintenanceOrder, IMaintenanceOrderService> {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IMaintenanceOrderService maintenanceOrderService;
+
+    @Autowired
+    private IFaultHandlingInfoService faultHandlingInfoService;
+
+    @Autowired
+    private IAcceptanceInfoService acceptanceInfoService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param maintenanceOrder
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "维修工单-分页列表查询")
+    @ApiOperation(value = "维修工单-分页列表查询", notes = "维修工单-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<MaintenanceOrder>> queryPageList(MaintenanceOrder maintenanceOrder,
+                                                         @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                         HttpServletRequest req) {
+        QueryWrapper<MaintenanceOrder> queryWrapper = QueryGenerator.initQueryWrapper(maintenanceOrder, req.getParameterMap());
+        Page<MaintenanceOrder> page = new Page<MaintenanceOrder>(pageNo, pageSize);
+        IPage<MaintenanceOrder> pageList = maintenanceOrderService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param maintenanceOrder
+     * @return
+     */
+    @AutoLog(value = "维修工单-添加")
+    @ApiOperation(value = "维修工单-添加", notes = "维修工单-添加")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_maintenance_order:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody MaintenanceOrder maintenanceOrder) {
+        maintenanceOrderService.save(maintenanceOrder);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param maintenanceOrder
+     * @return
+     */
+    @AutoLog(value = "维修工单-编辑")
+    @ApiOperation(value = "维修工单-编辑", notes = "维修工单-编辑")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_maintenance_order:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody MaintenanceOrder maintenanceOrder) {
+        maintenanceOrderService.updateById(maintenanceOrder);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "维修工单-通过id删除")
+    @ApiOperation(value = "维修工单-通过id删除", notes = "维修工单-通过id删除")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_maintenance_order:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        maintenanceOrderService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "维修工单-批量删除")
+    @ApiOperation(value = "维修工单-批量删除", notes = "维修工单-批量删除")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_maintenance_order:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.maintenanceOrderService.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<MaintenanceOrder> queryById(@RequestParam(name = "id", required = true) String id) {
+        MaintenanceOrder maintenanceOrder = maintenanceOrderService.getById(id);
+        if (maintenanceOrder == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(maintenanceOrder);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param maintenanceOrder
+     */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_maintenance_order:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, MaintenanceOrder maintenanceOrder) {
+        return super.exportXls(request, maintenanceOrder, MaintenanceOrder.class, "维修工单");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_maintenance_order:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, MaintenanceOrder.class);
+    }
+
+
+    /**
+     * 分页列表查询(我的维修)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "维修工单-分页列表查询(我的维修)", notes = "维修工单-分页列表查询(我的维修)")
+    @GetMapping(value = "/myMaintenance")
+    public Result<IPage<MyMaintenanceVO>> queryMyMaintenancePage(MaintenanceOrder maintenanceOrder,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            HttpServletRequest req) {
+
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        String userId = loginUser.getId();
+
+        // 1. 查询该用户处理过的工单 ID
+        List<String> handledIds = faultHandlingInfoService.list(
+                        new LambdaQueryWrapper<FaultHandlingInfo>()
+                                .eq(FaultHandlingInfo::getHandler, userId)
+                                .select(FaultHandlingInfo::getMaintenanceId)
+                ).stream()
+                .map(FaultHandlingInfo::getMaintenanceId)
+                .distinct()
+                .collect(Collectors.toList());
+
+        // 2. 构建分页查询条件:报修人 或 处理人
+        QueryWrapper<MaintenanceOrder> queryWrapper = QueryGenerator.initQueryWrapper(maintenanceOrder, req.getParameterMap());
+        queryWrapper.and(qw ->
+                qw.eq("reporter", userId)
+                        .or()
+                        .in(!handledIds.isEmpty(), "id", handledIds)
+        );
+
+        // 3. 分页查询工单
+        Page<MaintenanceOrder> page = new Page<>(pageNo, pageSize);
+        IPage<MaintenanceOrder> orderPage = maintenanceOrderService.page(page, queryWrapper);
+
+        // 4. 取出当前页的工单 ID 列表
+        List<String> pageMaintenanceIds = orderPage.getRecords().stream()
+                .map(MaintenanceOrder::getId)
+                .collect(Collectors.toList());
+
+        // 5. 查询当前用户对这些工单的最新处理记录
+        Map<String, FaultHandlingInfo> latestMap = faultHandlingInfoService.getLatestByHandlerAndMaintenanceIds(userId, pageMaintenanceIds);
+
+        // 6. 封装返回 VO 列表
+        List<MyMaintenanceVO> voList = orderPage.getRecords().stream().map(order -> {
+            MyMaintenanceVO vo = new MyMaintenanceVO();
+            BeanUtils.copyProperties(order, vo);
+
+            FaultHandlingInfo handling = latestMap.get(order.getId());
+            if (handling != null) {
+                vo.setHandler(handling.getHandler()); // 或 vo.setHandlerName(...)
+            }
+            return vo;
+        }).collect(Collectors.toList());
+
+        // 7. 封装分页结果返回
+        IPage<MyMaintenanceVO> resultPage = new Page<>();
+        resultPage.setRecords(voList);
+        resultPage.setTotal(orderPage.getTotal());
+        resultPage.setCurrent(orderPage.getCurrent());
+        resultPage.setSize(orderPage.getSize());
+
+        return Result.OK(resultPage);
+    }
+
+
+    /**
+     * 分页列表查询(我的维修)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "维修工单-分页列表查询(我的验收)", notes = "维修工单-分页列表查询(我的验收)")
+    @GetMapping(value = "/myAcceptance")
+    public Result<IPage<MyMaintenanceVO>> queryMyAcceptancePage(MaintenanceOrder maintenanceOrder,
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            HttpServletRequest req) {
+
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        String userId = loginUser.getId();
+
+        // 1. 查询该用户验收过的工单 ID
+        List<String> acceptanceIds = acceptanceInfoService.list(
+                        new LambdaQueryWrapper<AcceptanceInfo>()
+                                .eq(AcceptanceInfo::getAccepter, userId)
+                                .select(AcceptanceInfo::getMaintenanceId)
+                ).stream()
+                .map(AcceptanceInfo::getMaintenanceId)
+                .distinct()
+                .collect(Collectors.toList());
+
+        // 2. 构建分页查询条件:验收人
+        QueryWrapper<MaintenanceOrder> queryWrapper = QueryGenerator.initQueryWrapper(maintenanceOrder, req.getParameterMap());
+        queryWrapper.in(!acceptanceIds.isEmpty(), "id", acceptanceIds);
+
+        // 3. 分页查询工单
+        Page<MaintenanceOrder> page = new Page<>(pageNo, pageSize);
+        IPage<MaintenanceOrder> orderPage = maintenanceOrderService.page(page, queryWrapper);
+
+        // 4. 取出当前页的工单 ID 列表
+        List<String> pageMaintenanceIds = orderPage.getRecords().stream()
+                .map(MaintenanceOrder::getId)
+                .collect(Collectors.toList());
+
+        // 5. 查询当前用户对这些工单的最新处理记录
+        Map<String, AcceptanceInfo> latestMap = acceptanceInfoService.getLatestByAcceptanceAndMaintenanceIds(userId, pageMaintenanceIds);
+
+        // 6. 封装返回 VO 列表
+        List<MyMaintenanceVO> voList = orderPage.getRecords().stream().map(order -> {
+            MyMaintenanceVO vo = new MyMaintenanceVO();
+            BeanUtils.copyProperties(order, vo);
+
+            AcceptanceInfo acceptanceInfo = latestMap.get(order.getId());
+            if (acceptanceInfo != null) {
+                vo.setAccepter(acceptanceInfo.getAccepter());
+            }
+            return vo;
+        }).collect(Collectors.toList());
+
+        // 7. 封装分页结果返回
+        IPage<MyMaintenanceVO> resultPage = new Page<>();
+        resultPage.setRecords(voList);
+        resultPage.setTotal(orderPage.getTotal());
+        resultPage.setCurrent(orderPage.getCurrent());
+        resultPage.setSize(orderPage.getSize());
+
+        return Result.OK(resultPage);
+    }
+
+}

+ 179 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/PlannedSparePartsController.java

@@ -0,0 +1,179 @@
+package org.jeecg.modules.equipmentMaintenance.controller;
+
+import java.util.Arrays;
+import java.util.List;
+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.equipmentMaintenance.entity.FaultHandlingInfo;
+import org.jeecg.modules.equipmentMaintenance.entity.PlannedSpareParts;
+import org.jeecg.modules.equipmentMaintenance.service.IPlannedSparePartsService;
+
+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-06-06
+ * @Version: V1.0
+ */
+@Api(tags="计划备件")
+@RestController
+@RequestMapping("/equipmentMaintenance/plannedSpareParts")
+@Slf4j
+public class PlannedSparePartsController extends JeecgController<PlannedSpareParts, IPlannedSparePartsService> {
+	@Autowired
+	private IPlannedSparePartsService plannedSparePartsService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param plannedSpareParts
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "计划备件-分页列表查询")
+	@ApiOperation(value="计划备件-分页列表查询", notes="计划备件-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<PlannedSpareParts>> queryPageList(PlannedSpareParts plannedSpareParts,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<PlannedSpareParts> queryWrapper = QueryGenerator.initQueryWrapper(plannedSpareParts, req.getParameterMap());
+		Page<PlannedSpareParts> page = new Page<PlannedSpareParts>(pageNo, pageSize);
+		IPage<PlannedSpareParts> pageList = plannedSparePartsService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param plannedSpareParts
+	 * @return
+	 */
+	@AutoLog(value = "计划备件-添加")
+	@ApiOperation(value="计划备件-添加", notes="计划备件-添加")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_planned_spare_parts:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody PlannedSpareParts plannedSpareParts) {
+		plannedSparePartsService.save(plannedSpareParts);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param plannedSpareParts
+	 * @return
+	 */
+	@AutoLog(value = "计划备件-编辑")
+	@ApiOperation(value="计划备件-编辑", notes="计划备件-编辑")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_planned_spare_parts:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody PlannedSpareParts plannedSpareParts) {
+		plannedSparePartsService.updateById(plannedSpareParts);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "计划备件-通过id删除")
+	@ApiOperation(value="计划备件-通过id删除", notes="计划备件-通过id删除")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_planned_spare_parts:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		plannedSparePartsService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "计划备件-批量删除")
+	@ApiOperation(value="计划备件-批量删除", notes="计划备件-批量删除")
+	@RequiresPermissions("equipmentMaintenance:sbsmzq_planned_spare_parts:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.plannedSparePartsService.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<PlannedSpareParts> queryById(@RequestParam(name="id",required=true) String id) {
+		PlannedSpareParts plannedSpareParts = plannedSparePartsService.getById(id);
+		if(plannedSpareParts==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(plannedSpareParts);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param plannedSpareParts
+    */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_planned_spare_parts:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, PlannedSpareParts plannedSpareParts) {
+        return super.exportXls(request, plannedSpareParts, PlannedSpareParts.class, "计划备件");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_planned_spare_parts:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, PlannedSpareParts.class);
+    }
+
+
+	 /**
+	  * 通过id查询
+	  *
+	  * @param id
+	  * @return
+	  */
+	 @ApiOperation(value = "计划备件主表ID查询", notes = "计划备件主表ID查询")
+	 @GetMapping(value = "/queryPlannedSparePartsByMainId")
+	 public Result<List<PlannedSpareParts>> queryPlannedSparePartsByMainId(@RequestParam(name = "id", required = true) String id) {
+		 List<PlannedSpareParts> plannedSpareParts = plannedSparePartsService.selectByMainId(id);
+		 return Result.OK(plannedSpareParts);
+	 }
+
+}

+ 175 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/controller/SparePartReplaceController.java

@@ -0,0 +1,175 @@
+package org.jeecg.modules.equipmentMaintenance.controller;
+
+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.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.equipmentMaintenance.entity.SparePartReplace;
+import org.jeecg.modules.equipmentMaintenance.service.ISparePartReplaceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 备件更换
+ * @Author: jeecg-boot
+ * @Date: 2025-06-06
+ * @Version: V1.0
+ */
+@Api(tags = "备件更换")
+@RestController
+@RequestMapping("/equipmentMaintenance/sparePartReplace")
+@Slf4j
+public class SparePartReplaceController extends JeecgController<SparePartReplace, ISparePartReplaceService> {
+    @Autowired
+    private ISparePartReplaceService sparePartReplaceService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param sparePartReplace
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "备件更换-分页列表查询")
+    @ApiOperation(value = "备件更换-分页列表查询", notes = "备件更换-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<SparePartReplace>> queryPageList(SparePartReplace sparePartReplace,
+                                                         @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                         HttpServletRequest req) {
+        QueryWrapper<SparePartReplace> queryWrapper = QueryGenerator.initQueryWrapper(sparePartReplace, req.getParameterMap());
+        Page<SparePartReplace> page = new Page<SparePartReplace>(pageNo, pageSize);
+        IPage<SparePartReplace> pageList = sparePartReplaceService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param sparePartReplace
+     * @return
+     */
+    @AutoLog(value = "备件更换-添加")
+    @ApiOperation(value = "备件更换-添加", notes = "备件更换-添加")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_spare_part_replace:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody SparePartReplace sparePartReplace) {
+        sparePartReplaceService.save(sparePartReplace);
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param sparePartReplace
+     * @return
+     */
+    @AutoLog(value = "备件更换-编辑")
+    @ApiOperation(value = "备件更换-编辑", notes = "备件更换-编辑")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_spare_part_replace:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody SparePartReplace sparePartReplace) {
+        sparePartReplaceService.updateById(sparePartReplace);
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "备件更换-通过id删除")
+    @ApiOperation(value = "备件更换-通过id删除", notes = "备件更换-通过id删除")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_spare_part_replace:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        sparePartReplaceService.removeById(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "备件更换-批量删除")
+    @ApiOperation(value = "备件更换-批量删除", notes = "备件更换-批量删除")
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_spare_part_replace:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.sparePartReplaceService.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<SparePartReplace> queryById(@RequestParam(name = "id", required = true) String id) {
+        SparePartReplace sparePartReplace = sparePartReplaceService.getById(id);
+        if (sparePartReplace == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(sparePartReplace);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param sparePartReplace
+     */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_spare_part_replace:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, SparePartReplace sparePartReplace) {
+        return super.exportXls(request, sparePartReplace, SparePartReplace.class, "备件更换");
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("equipmentMaintenance:sbsmzq_spare_part_replace:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, SparePartReplace.class);
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "备件更换主表ID查询", notes = "备件更换主表ID查询")
+    @GetMapping(value = "/querySparePartReplaceByMainId")
+    public Result<List<SparePartReplace>> querySparePartReplaceByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<SparePartReplace> sparePartReplaces = sparePartReplaceService.selectByMainId(id);
+        return Result.OK(sparePartReplaces);
+    }
+}

+ 106 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/AcceptanceInfo.java

@@ -0,0 +1,106 @@
+package org.jeecg.modules.equipmentMaintenance.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.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 验收信息
+ * @Author: jeecg-boot
+ * @Date: 2025-06-04
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_acceptance_info")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_acceptance_info对象", description = "验收信息")
+public class AcceptanceInfo 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 = 15)
+    @ApiModelProperty(value = "验收人")
+    private String accepter;
+    /**
+     * 验收时间
+     */
+    @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 acceptanceTime;
+    /**
+     * 验收结果
+     */
+    @Excel(name = "验收结果", width = 15)
+    @ApiModelProperty(value = "验收结果")
+    private String result;
+    /**
+     * 评分
+     */
+    @Excel(name = "评分", width = 15)
+    @ApiModelProperty(value = "评分")
+    private BigDecimal score;
+    /**
+     * 说明
+     */
+    @Excel(name = "说明", width = 15)
+    @ApiModelProperty(value = "说明")
+    private String description;
+    /**
+     * 维修工单id
+     */
+    @Excel(name = "维修工单id", width = 15)
+    @ApiModelProperty(value = "维修工单id")
+    private String maintenanceId;
+}

+ 129 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/FaultHandlingInfo.java

@@ -0,0 +1,129 @@
+package org.jeecg.modules.equipmentMaintenance.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-06-04
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_fault_handling_info")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_fault_handling_info对象", description = "故障处理信息")
+public class FaultHandlingInfo 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 = 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 processTime;
+    /**
+     * 处理结果
+     */
+    @Excel(name = "处理结果", width = 15)
+    @ApiModelProperty(value = "处理结果")
+    private String processResult;
+    /**
+     * 协同处理人
+     */
+    @Excel(name = "协同处理人", width = 15)
+    @ApiModelProperty(value = "协同处理人")
+    private String collaborator;
+    /**
+     * 维修方式
+     */
+    @Excel(name = "维修方式", width = 15)
+    @ApiModelProperty(value = "维修方式")
+    private String repairMethod;
+    /**
+     * 故障类型
+     */
+    @Excel(name = "故障类型", width = 15)
+    @ApiModelProperty(value = "故障类型")
+    private String faultType;
+    /**
+     * 故障原因
+     */
+    @Excel(name = "故障原因", width = 15)
+    @ApiModelProperty(value = "故障原因")
+    private String faultReason;
+    /**
+     * 处理内容
+     */
+    @Excel(name = "处理内容", width = 15)
+    @ApiModelProperty(value = "处理内容")
+    private String processContent;
+    /**
+     * 预防措施
+     */
+    @Excel(name = "预防措施", width = 15)
+    @ApiModelProperty(value = "预防措施")
+    private String preventiveMeasures;
+    /**
+     * 维修工单id
+     */
+    @Excel(name = "维修工单id", width = 15)
+    @ApiModelProperty(value = "维修工单id")
+    private String maintenanceId;
+}

+ 232 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/MaintenanceOrder.java

@@ -0,0 +1,232 @@
+package org.jeecg.modules.equipmentMaintenance.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.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 维修工单
+ * @Author: jeecg-boot
+ * @Date: 2025-06-04
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_maintenance_order")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_maintenance_order对象", description = "维修工单")
+public class MaintenanceOrder 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 = 15)
+    @ApiModelProperty(value = "维修单号")
+    private String maintenanceNo;
+    /**
+     * 设备编号
+     */
+    @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 reporter;
+    /**
+     * 设备状态
+     */
+    @Excel(name = "设备状态", width = 15)
+    @ApiModelProperty(value = "设备状态")
+    private String deviceStatus;
+    /**
+     * 类别
+     */
+    @Excel(name = "类别", width = 15)
+    @ApiModelProperty(value = "类别")
+    private String category;
+    /**
+     * 来源
+     */
+    @Excel(name = "来源", width = 15)
+    @ApiModelProperty(value = "来源")
+    private String source;
+    /**
+     * 来源单号
+     */
+    @Excel(name = "来源单号", width = 15)
+    @ApiModelProperty(value = "来源单号")
+    private String sourceOrderNo;
+    /**
+     * 故障等级
+     */
+    @Excel(name = "故障等级", width = 15)
+    @ApiModelProperty(value = "故障等级")
+    private String faultLevel;
+    /**
+     * 故障类型
+     */
+    @Excel(name = "故障类型", width = 15)
+    @ApiModelProperty(value = "故障类型")
+    private String faultType;
+    /**
+     * 故障原因
+     */
+    @Excel(name = "故障原因", width = 15)
+    @ApiModelProperty(value = "故障原因")
+    private String faultReason;
+    /**
+     * 故障描述
+     */
+    @Excel(name = "故障描述", width = 15)
+    @ApiModelProperty(value = "故障描述")
+    private String faultDescription;
+    /**
+     * 状态
+     */
+    @Excel(name = "状态", width = 15)
+    @ApiModelProperty(value = "状态")
+    private String status;
+    /**
+     * 维修工种
+     */
+    @Excel(name = "维修工种", width = 15)
+    @ApiModelProperty(value = "维修工种")
+    private String repairWorkType;
+    /**
+     * 当前步骤
+     */
+    @Excel(name = "当前步骤", width = 15)
+    @ApiModelProperty(value = "当前步骤")
+    private String currentStep;
+    /**
+     * 维修方式
+     */
+    @Excel(name = "维修方式", width = 15)
+    @ApiModelProperty(value = "维修方式")
+    private String repairMethod;
+    /**
+     * 计划维修时间
+     */
+    @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 planRepairTime;
+    /**
+     * 解决时间
+     */
+    @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 solveTime;
+    /**
+     * 处理内容
+     */
+    @Excel(name = "处理内容", width = 15)
+    @ApiModelProperty(value = "处理内容")
+    private String processingContent;
+    /**
+     * 停机时间
+     */
+    @Excel(name = "停机时间", width = 15)
+    @ApiModelProperty(value = "停机时间")
+    private String downtime;
+    /**
+     * 验收人
+     */
+    @Excel(name = "验收人", width = 15)
+    @ApiModelProperty(value = "验收人")
+    private String acceptancePerson;
+    /**
+     * 验收时间
+     */
+    @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 acceptanceTime;
+    /**
+     * 评分
+     */
+    @Excel(name = "评分", width = 15)
+    @ApiModelProperty(value = "评分")
+    private BigDecimal score;
+    /**
+     * 验收说明
+     */
+    @Excel(name = "验收说明", width = 15)
+    @ApiModelProperty(value = "验收说明")
+    private String acceptanceDescription;
+    /**
+     * 报障时间
+     */
+    @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 faultTime;
+}

+ 97 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/PlannedSpareParts.java

@@ -0,0 +1,97 @@
+package org.jeecg.modules.equipmentMaintenance.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-06-06
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_planned_spare_parts")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_planned_spare_parts对象", description = "计划备件")
+public class PlannedSpareParts 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 = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 名称
+     */
+    @Excel(name = "名称", width = 15)
+    @ApiModelProperty(value = "名称")
+    private String name;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String spec;
+    /**
+     * 数量
+     */
+    @Excel(name = "数量", width = 15)
+    @ApiModelProperty(value = "数量")
+    private Integer quantity;
+    /**
+     * 维修工单id
+     */
+    @Excel(name = "维修工单id", width = 15)
+    @ApiModelProperty(value = "维修工单id")
+    private String maintenanceId;
+}

+ 160 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/entity/SparePartReplace.java

@@ -0,0 +1,160 @@
+package org.jeecg.modules.equipmentMaintenance.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.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 备件更换
+ * @Author: jeecg-boot
+ * @Date: 2025-06-06
+ * @Version: V1.0
+ */
+@Data
+@TableName("sbsmzq_spare_part_replace")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "sbsmzq_spare_part_replace对象", description = "备件更换")
+public class SparePartReplace 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 = 15)
+    @ApiModelProperty(value = "编号")
+    private String number;
+    /**
+     * 名称
+     */
+    @Excel(name = "名称", width = 15)
+    @ApiModelProperty(value = "名称")
+    private String name;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String spec;
+    /**
+     * 动作
+     */
+    @Excel(name = "动作", width = 15)
+    @ApiModelProperty(value = "动作")
+    private String action;
+    /**
+     * 操作人员
+     */
+    @Excel(name = "操作人员", width = 15)
+    @ApiModelProperty(value = "操作人员")
+    private String operator;
+    /**
+     * 更换日期
+     */
+    @Excel(name = "更换日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "更换日期")
+    private Date replacementDate;
+    /**
+     * 更换周期
+     */
+    @Excel(name = "更换周期", width = 15)
+    @ApiModelProperty(value = "更换周期")
+    private String replacementCycle;
+    /**
+     * 使用时长
+     */
+    @Excel(name = "使用时长", width = 15)
+    @ApiModelProperty(value = "使用时长")
+    private String usageDuration;
+    /**
+     * 显示为在用备件(是=1,否=0)
+     */
+    @Excel(name = "显示为在用备件(是=1,否=0)", width = 15)
+    @ApiModelProperty(value = "显示为在用备件(是=1,否=0)")
+    private Integer isDisplayedAsActive;
+    /**
+     * 批次号
+     */
+    @Excel(name = "批次号", width = 15)
+    @ApiModelProperty(value = "批次号")
+    private String batchNumber;
+    /**
+     * 数量
+     */
+    @Excel(name = "数量", width = 15)
+    @ApiModelProperty(value = "数量")
+    private BigDecimal quantity;
+    /**
+     * 单价
+     */
+    @Excel(name = "单价", width = 15)
+    @ApiModelProperty(value = "单价")
+    private BigDecimal unitPrice;
+    /**
+     * 小计
+     */
+    @Excel(name = "小计", width = 15)
+    @ApiModelProperty(value = "小计")
+    private BigDecimal total;
+    /**
+     * 说明
+     */
+    @Excel(name = "说明", width = 15)
+    @ApiModelProperty(value = "说明")
+    private String description;
+    /**
+     * 维修工单id
+     */
+    @Excel(name = "维修工单id", width = 15)
+    @ApiModelProperty(value = "维修工单id")
+    private String maintenanceId;
+}

+ 40 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/AcceptanceInfoMapper.java

@@ -0,0 +1,40 @@
+package org.jeecg.modules.equipmentMaintenance.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentMaintenance.entity.AcceptanceInfo;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+
+import java.util.List;
+
+/**
+ * @Description: 验收信息
+ * @Author: jeecg-boot
+ * @Date: 2025-06-04
+ * @Version: V1.0
+ */
+@Mapper
+public interface AcceptanceInfoMapper extends BaseMapper<AcceptanceInfo> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return AcceptanceInfo
+     */
+    AcceptanceInfo selectByMainId(@Param("mainId") String mainId);
+
+
+    /**
+     * 查询指定验收人和工单ID列表下,每个工单验收记录
+     * @param acceptanceId 当前验收ID
+     * @param maintenanceIds 工单ID列表
+     * @return 每个工单的验收记录
+     */
+    List<AcceptanceInfo> getLatestByAcceptanceAndMaintenanceIds(
+            @Param("acceptanceId") String acceptanceId,
+            @Param("maintenanceIds") List<String> maintenanceIds
+    );
+
+}

+ 38 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/FaultHandlingInfoMapper.java

@@ -0,0 +1,38 @@
+package org.jeecg.modules.equipmentMaintenance.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+
+import java.util.List;
+
+/**
+ * @Description: 故障处理信息
+ * @Author: jeecg-boot
+ * @Date: 2025-06-04
+ * @Version: V1.0
+ */
+@Mapper
+public interface FaultHandlingInfoMapper extends BaseMapper<FaultHandlingInfo> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return FaultHandlingInfo
+     */
+    FaultHandlingInfo selectByMainId(@Param("mainId") String mainId);
+
+    /**
+     * 查询指定处理人和工单ID列表下,每个工单最新的处理记录
+     * @param handler 当前处理人ID
+     * @param maintenanceIds 工单ID列表
+     * @return 每个工单最新的一条处理记录
+     */
+    List<FaultHandlingInfo> getLatestByHandlerAndMaintenanceIds(
+            @Param("handler") String handler,
+            @Param("maintenanceIds") List<String> maintenanceIds
+    );
+
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/MaintenanceOrderMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.equipmentMaintenance.mapper;
+
+import org.jeecg.modules.equipmentMaintenance.entity.MaintenanceOrder;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 维修工单
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+public interface MaintenanceOrderMapper extends BaseMapper<MaintenanceOrder> {
+
+}

+ 26 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/PlannedSparePartsMapper.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.equipmentMaintenance.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentMaintenance.entity.PlannedSpareParts;
+
+import java.util.List;
+
+/**
+ * @Description: 计划备件
+ * @Author: jeecg-boot
+ * @Date: 2025-06-06
+ * @Version: V1.0
+ */
+@Mapper
+public interface PlannedSparePartsMapper extends BaseMapper<PlannedSpareParts> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<PlannedSpareParts>
+     */
+    List<PlannedSpareParts> selectByMainId(@Param("mainId") String mainId);
+}

+ 26 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/SparePartReplaceMapper.java

@@ -0,0 +1,26 @@
+package org.jeecg.modules.equipmentMaintenance.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentMaintenance.entity.SparePartReplace;
+
+import java.util.List;
+
+/**
+ * @Description: 备件更换
+ * @Author: jeecg-boot
+ * @Date: 2025-06-06
+ * @Version: V1.0
+ */
+@Mapper
+public interface SparePartReplaceMapper extends BaseMapper<SparePartReplace> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<SparePartReplace>
+     */
+    List<SparePartReplace> selectByMainId(@Param("mainId") String mainId);
+}

+ 25 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/AcceptanceInfoMapper.xml

@@ -0,0 +1,25 @@
+<?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.equipmentMaintenance.mapper.AcceptanceInfoMapper">
+
+    <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentMaintenance.entity.AcceptanceInfo">
+        SELECT *
+        FROM sbsmzq_acceptance_info
+        WHERE maintenance_id = #{mainId}
+        ORDER BY acceptance_time DESC LIMIT 1
+    </select>
+
+    <select id="getLatestByAcceptanceAndMaintenanceIds" resultType="org.jeecg.modules.equipmentMaintenance.entity.AcceptanceInfo">
+        SELECT *
+        FROM sbsmzq_acceptance_info
+        WHERE accepter = #{acceptanceId}
+        <if test="maintenanceIds != null and maintenanceIds.size > 0">
+            AND maintenance_id IN
+            <foreach collection="maintenanceIds" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+        ORDER BY acceptance_time DESC
+    </select>
+
+</mapper>

+ 26 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/FaultHandlingInfoMapper.xml

@@ -0,0 +1,26 @@
+<?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.equipmentMaintenance.mapper.FaultHandlingInfoMapper">
+
+    <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo">
+        SELECT *
+        FROM sbsmzq_fault_handling_info
+        WHERE maintenance_id = #{mainId}
+        ORDER BY process_time DESC LIMIT 1
+    </select>
+
+    <select id="getLatestByHandlerAndMaintenanceIds" resultType="org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo">
+        SELECT *
+        FROM sbsmzq_fault_handling_info
+        WHERE handler = #{handler}
+        <if test="maintenanceIds != null and maintenanceIds.size > 0">
+            AND maintenance_id IN
+            <foreach collection="maintenanceIds" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+        ORDER BY process_time DESC
+    </select>
+
+
+</mapper>

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/MaintenanceOrderMapper.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.equipmentMaintenance.mapper.MaintenanceOrderMapper">
+
+</mapper>

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/PlannedSparePartsMapper.xml

@@ -0,0 +1,11 @@
+<?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.equipmentMaintenance.mapper.PlannedSparePartsMapper">
+
+    <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentMaintenance.entity.PlannedSpareParts">
+        SELECT *
+        FROM sbsmzq_planned_spare_parts
+        WHERE maintenance_id = #{mainId}
+    </select>
+
+</mapper>

+ 11 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/mapper/xml/SparePartReplaceMapper.xml

@@ -0,0 +1,11 @@
+<?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.equipmentMaintenance.mapper.SparePartReplaceMapper">
+
+    <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentMaintenance.entity.SparePartReplace">
+        SELECT *
+        FROM sbsmzq_acceptance_info
+        WHERE maintenance_id = #{mainId}
+    </select>
+
+</mapper>

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IAcceptanceInfoService.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.equipmentMaintenance.service;
+
+import org.jeecg.modules.equipmentMaintenance.entity.AcceptanceInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 验收信息
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+public interface IAcceptanceInfoService extends IService<AcceptanceInfo> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return FaultHandlingInfo
+     */
+    AcceptanceInfo selectByMainId(String mainId);
+
+    Map<String, AcceptanceInfo> getLatestByAcceptanceAndMaintenanceIds(String acceptanceId, List<String> maintenanceIds);
+}

+ 28 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IFaultHandlingInfoService.java

@@ -0,0 +1,28 @@
+package org.jeecg.modules.equipmentMaintenance.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 故障处理信息
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+public interface IFaultHandlingInfoService extends IService<FaultHandlingInfo> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return FaultHandlingInfo
+     */
+    FaultHandlingInfo selectByMainId(String mainId);
+
+    Map<String, FaultHandlingInfo> getLatestByHandlerAndMaintenanceIds(String handlerId, List<String> maintenanceIds);
+
+
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IMaintenanceOrderService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.equipmentMaintenance.service;
+
+import org.jeecg.modules.equipmentMaintenance.entity.MaintenanceOrder;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 维修工单
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+public interface IMaintenanceOrderService extends IService<MaintenanceOrder> {
+
+}

+ 23 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/IPlannedSparePartsService.java

@@ -0,0 +1,23 @@
+package org.jeecg.modules.equipmentMaintenance.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentMaintenance.entity.PlannedSpareParts;
+
+import java.util.List;
+
+/**
+ * @Description: 计划备件
+ * @Author: jeecg-boot
+ * @Date:   2025-06-06
+ * @Version: V1.0
+ */
+public interface IPlannedSparePartsService extends IService<PlannedSpareParts> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<PlannedSpareParts>
+     */
+    List<PlannedSpareParts> selectByMainId(String mainId);
+}

+ 23 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/ISparePartReplaceService.java

@@ -0,0 +1,23 @@
+package org.jeecg.modules.equipmentMaintenance.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentMaintenance.entity.SparePartReplace;
+
+import java.util.List;
+
+/**
+ * @Description: 备件更换
+ * @Author: jeecg-boot
+ * @Date: 2025-06-06
+ * @Version: V1.0
+ */
+public interface ISparePartReplaceService extends IService<SparePartReplace> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<SparePartReplace>
+     */
+    List<SparePartReplace> selectByMainId(String mainId);
+}

+ 45 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/AcceptanceInfoServiceImpl.java

@@ -0,0 +1,45 @@
+package org.jeecg.modules.equipmentMaintenance.service.impl;
+
+import org.jeecg.modules.equipmentMaintenance.entity.AcceptanceInfo;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+import org.jeecg.modules.equipmentMaintenance.mapper.AcceptanceInfoMapper;
+import org.jeecg.modules.equipmentMaintenance.service.IAcceptanceInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 验收信息
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+@Service
+public class AcceptanceInfoServiceImpl extends ServiceImpl<AcceptanceInfoMapper, AcceptanceInfo> implements IAcceptanceInfoService {
+
+    @Autowired
+    private AcceptanceInfoMapper acceptanceInfoMapper;
+
+    @Override
+    public AcceptanceInfo selectByMainId(String mainId) {
+        return acceptanceInfoMapper.selectByMainId(mainId);
+    }
+
+    @Override
+    public Map<String, AcceptanceInfo> getLatestByAcceptanceAndMaintenanceIds(String acceptanceId, List<String> maintenanceIds) {
+        List<AcceptanceInfo> list = acceptanceInfoMapper.getLatestByAcceptanceAndMaintenanceIds(acceptanceId, maintenanceIds);
+        // 按 maintenanceId 分组并取最新一条
+        return list.stream()
+                .collect(Collectors.toMap(
+                        AcceptanceInfo::getMaintenanceId,
+                        fh -> fh,
+                        (fh1, fh2) -> fh1 // 已排序,取第一个
+                ));
+    }
+}

+ 42 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/FaultHandlingInfoServiceImpl.java

@@ -0,0 +1,42 @@
+package org.jeecg.modules.equipmentMaintenance.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.equipmentMaintenance.entity.FaultHandlingInfo;
+import org.jeecg.modules.equipmentMaintenance.mapper.FaultHandlingInfoMapper;
+import org.jeecg.modules.equipmentMaintenance.service.IFaultHandlingInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 故障处理信息
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+@Service
+public class FaultHandlingInfoServiceImpl extends ServiceImpl<FaultHandlingInfoMapper, FaultHandlingInfo> implements IFaultHandlingInfoService {
+
+    @Autowired
+    private FaultHandlingInfoMapper faultHandlingInfoMapper;
+
+    @Override
+    public FaultHandlingInfo selectByMainId(String mainId) {
+        return faultHandlingInfoMapper.selectByMainId(mainId);
+    }
+
+    @Override
+    public Map<String, FaultHandlingInfo> getLatestByHandlerAndMaintenanceIds(String handler, List<String> maintenanceIds) {
+        List<FaultHandlingInfo> list = faultHandlingInfoMapper.getLatestByHandlerAndMaintenanceIds(handler, maintenanceIds);
+        // 按 maintenanceId 分组并取最新一条
+        return list.stream()
+                .collect(Collectors.toMap(
+                        FaultHandlingInfo::getMaintenanceId,
+                        fh -> fh,
+                        (fh1, fh2) -> fh1 // 已排序,取第一个
+                ));
+    }
+}

+ 19 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/MaintenanceOrderServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.equipmentMaintenance.service.impl;
+
+import org.jeecg.modules.equipmentMaintenance.entity.MaintenanceOrder;
+import org.jeecg.modules.equipmentMaintenance.mapper.MaintenanceOrderMapper;
+import org.jeecg.modules.equipmentMaintenance.service.IMaintenanceOrderService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 维修工单
+ * @Author: jeecg-boot
+ * @Date:   2025-06-04
+ * @Version: V1.0
+ */
+@Service
+public class MaintenanceOrderServiceImpl extends ServiceImpl<MaintenanceOrderMapper, MaintenanceOrder> implements IMaintenanceOrderService {
+
+}

+ 31 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/PlannedSparePartsServiceImpl.java

@@ -0,0 +1,31 @@
+package org.jeecg.modules.equipmentMaintenance.service.impl;
+
+import org.jeecg.modules.equipmentMaintenance.entity.PlannedSpareParts;
+import org.jeecg.modules.equipmentMaintenance.mapper.FaultHandlingInfoMapper;
+import org.jeecg.modules.equipmentMaintenance.mapper.PlannedSparePartsMapper;
+import org.jeecg.modules.equipmentMaintenance.service.IPlannedSparePartsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @Description: 计划备件
+ * @Author: jeecg-boot
+ * @Date:   2025-06-06
+ * @Version: V1.0
+ */
+@Service
+public class PlannedSparePartsServiceImpl extends ServiceImpl<PlannedSparePartsMapper, PlannedSpareParts> implements IPlannedSparePartsService {
+
+    @Autowired
+    private PlannedSparePartsMapper plannedSparePartsMapper;
+
+    @Override
+    public List<PlannedSpareParts> selectByMainId(String mainId) {
+        return plannedSparePartsMapper.selectByMainId(mainId);
+    }
+}

+ 28 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/service/impl/SparePartReplaceServiceImpl.java

@@ -0,0 +1,28 @@
+package org.jeecg.modules.equipmentMaintenance.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.equipmentMaintenance.entity.SparePartReplace;
+import org.jeecg.modules.equipmentMaintenance.mapper.SparePartReplaceMapper;
+import org.jeecg.modules.equipmentMaintenance.service.ISparePartReplaceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description: 备件更换
+ * @Author: jeecg-boot
+ * @Date: 2025-06-06
+ * @Version: V1.0
+ */
+@Service
+public class SparePartReplaceServiceImpl extends ServiceImpl<SparePartReplaceMapper, SparePartReplace> implements ISparePartReplaceService {
+
+    @Autowired
+    private SparePartReplaceMapper sparePartReplaceMapper;
+
+    @Override
+    public List<SparePartReplace> selectByMainId(String mainId) {
+        return sparePartReplaceMapper.selectByMainId(mainId);
+    }
+}

+ 197 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentMaintenance/vo/MyMaintenanceVO.java

@@ -0,0 +1,197 @@
+package org.jeecg.modules.equipmentMaintenance.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class MyMaintenanceVO {
+
+    /**
+     * 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;
+    /**
+     * 维修单号
+     */
+    @ApiModelProperty(value = "维修单号")
+    private String maintenanceNo;
+    /**
+     * 设备编号
+     */
+    @ApiModelProperty(value = "设备编号")
+    private String deviceCode;
+    /**
+     * 设备名称
+     */
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+    /**
+     * 功能位置
+     */
+    @ApiModelProperty(value = "功能位置")
+    private String functionLocation;
+    /**
+     * 报障人
+     */
+    @ApiModelProperty(value = "报障人")
+    private String reporter;
+    /**
+     * 设备状态
+     */
+    @ApiModelProperty(value = "设备状态")
+    private String deviceStatus;
+    /**
+     * 类别
+     */
+    @ApiModelProperty(value = "类别")
+    private String category;
+    /**
+     * 来源
+     */
+    @ApiModelProperty(value = "来源")
+    private String source;
+    /**
+     * 来源单号
+     */
+    @ApiModelProperty(value = "来源单号")
+    private String sourceOrderNo;
+    /**
+     * 故障等级
+     */
+    @ApiModelProperty(value = "故障等级")
+    private String faultLevel;
+    /**
+     * 故障类型
+     */
+    @ApiModelProperty(value = "故障类型")
+    private String faultType;
+    /**
+     * 故障原因
+     */
+    @ApiModelProperty(value = "故障原因")
+    private String faultReason;
+    /**
+     * 故障描述
+     */
+    @ApiModelProperty(value = "故障描述")
+    private String faultDescription;
+    /**
+     * 状态
+     */
+    @ApiModelProperty(value = "状态")
+    private String status;
+    /**
+     * 维修工种
+     */
+    @ApiModelProperty(value = "维修工种")
+    private String repairWorkType;
+    /**
+     * 当前步骤
+     */
+    @ApiModelProperty(value = "当前步骤")
+    private String currentStep;
+    /**
+     * 维修方式
+     */
+    @ApiModelProperty(value = "维修方式")
+    private String repairMethod;
+    /**
+     * 计划维修时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "计划维修时间")
+    private Date planRepairTime;
+    /**
+     * 解决时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "解决时间")
+    private Date solveTime;
+    /**
+     * 处理内容
+     */
+    @ApiModelProperty(value = "处理内容")
+    private String processingContent;
+    /**
+     * 停机时间
+     */
+    @ApiModelProperty(value = "停机时间")
+    private String downtime;
+    /**
+     * 验收人
+     */
+    @ApiModelProperty(value = "验收人")
+    private String acceptancePerson;
+    /**
+     * 验收时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "验收时间")
+    private Date acceptanceTime;
+    /**
+     * 评分
+     */
+    @ApiModelProperty(value = "评分")
+    private BigDecimal score;
+    /**
+     * 验收说明
+     */
+    @ApiModelProperty(value = "验收说明")
+    private String acceptanceDescription;
+    /**
+     * 报障时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "报障时间")
+    private Date faultTime;
+    /**
+     * 处理人
+     */
+    @ApiModelProperty(value = "处理人")
+    private String handler;
+    /**
+     * 验收人
+     */
+    @ApiModelProperty(value = "验收人")
+    private String accepter;
+}

+ 331 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/controller/EquipmentInspectionController.java

@@ -0,0 +1,331 @@
+package org.jeecg.modules.specialEquipment.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.deviceSale.dto.DeviceSaleItemQuery;
+import org.jeecg.modules.equipmentDisposal.deviceSale.vo.DeviceSaleItemVO;
+import org.jeecg.modules.purchaseManage.equipmentAccept.entity.EquipmentAccept;
+import org.jeecg.modules.specialEquipment.dto.InspectionRecordQueryDTO;
+import org.jeecg.modules.specialEquipment.entity.EquipmentInspection;
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import org.jeecg.modules.specialEquipment.service.IEquipmentInspectionService;
+import org.jeecg.modules.specialEquipment.service.IInspectionRecordService;
+import org.jeecg.modules.specialEquipment.vo.EquipmentInspectionPage;
+import org.jeecg.modules.specialEquipment.vo.InspectionRecordVO;
+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-06-03
+ * @Version: V1.0
+ */
+@Api(tags = "设备检验")
+@RestController
+@RequestMapping("/specialEquipment/equipmentInspection")
+@Slf4j
+public class EquipmentInspectionController {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IEquipmentInspectionService equipmentInspectionService;
+    @Autowired
+    private IInspectionRecordService inspectionRecordService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param equipmentInspection
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备检验-分页列表查询")
+    @ApiOperation(value = "设备检验-分页列表查询", notes = "设备检验-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<EquipmentInspection>> queryPageList(EquipmentInspection equipmentInspection,
+                                                            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                            HttpServletRequest req) {
+        QueryWrapper<EquipmentInspection> queryWrapper = QueryGenerator.initQueryWrapper(equipmentInspection, req.getParameterMap());
+        Page<EquipmentInspection> page = new Page<EquipmentInspection>(pageNo, pageSize);
+        IPage<EquipmentInspection> pageList = equipmentInspectionService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param equipmentInspectionPage
+     * @return
+     */
+    @AutoLog(value = "设备检验-添加")
+    @ApiOperation(value = "设备检验-添加", notes = "设备检验-添加")
+    @RequiresPermissions("specialEquipment:sbsmzq_equipment_inspection:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody EquipmentInspectionPage equipmentInspectionPage) {
+        EquipmentInspection equipmentInspection = new EquipmentInspection();
+        BeanUtils.copyProperties(equipmentInspectionPage, equipmentInspection);
+        equipmentInspectionService.saveMain(equipmentInspection, equipmentInspectionPage.getInspectionRecordList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param equipmentInspectionPage
+     * @return
+     */
+    @AutoLog(value = "设备检验-编辑")
+    @ApiOperation(value = "设备检验-编辑", notes = "设备检验-编辑")
+    @RequiresPermissions("specialEquipment:sbsmzq_equipment_inspection:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody EquipmentInspectionPage equipmentInspectionPage) {
+        EquipmentInspection equipmentInspection = new EquipmentInspection();
+        BeanUtils.copyProperties(equipmentInspectionPage, equipmentInspection);
+        EquipmentInspection equipmentInspectionEntity = equipmentInspectionService.getById(equipmentInspection.getId());
+        if (equipmentInspectionEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+        equipmentInspectionService.updateMain(equipmentInspection, equipmentInspectionPage.getInspectionRecordList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备检验-通过id删除")
+    @ApiOperation(value = "设备检验-通过id删除", notes = "设备检验-通过id删除")
+    @RequiresPermissions("specialEquipment:sbsmzq_equipment_inspection:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        equipmentInspectionService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备检验-批量删除")
+    @ApiOperation(value = "设备检验-批量删除", notes = "设备检验-批量删除")
+    @RequiresPermissions("specialEquipment:sbsmzq_equipment_inspection:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.equipmentInspectionService.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<EquipmentInspection> queryById(@RequestParam(name = "id", required = true) String id) {
+        EquipmentInspection equipmentInspection = equipmentInspectionService.getById(id);
+        if (equipmentInspection == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(equipmentInspection);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "检验记录通过主表ID查询")
+    @ApiOperation(value = "检验记录主表ID查询", notes = "检验记录-通主表ID查询")
+    @GetMapping(value = "/queryInspectionRecordByMainId")
+    public Result<List<InspectionRecord>> queryInspectionRecordListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<InspectionRecord> inspectionRecordList = inspectionRecordService.selectByMainId(id);
+        return Result.OK(inspectionRecordList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param equipmentInspection
+     */
+    @RequiresPermissions("specialEquipment:sbsmzq_equipment_inspection:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, EquipmentInspection equipmentInspection) {
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<EquipmentInspection> queryWrapper = QueryGenerator.initQueryWrapper(equipmentInspection, 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<EquipmentInspection> equipmentInspectionList = equipmentInspectionService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<EquipmentInspectionPage> pageList = new ArrayList<EquipmentInspectionPage>();
+        for (EquipmentInspection main : equipmentInspectionList) {
+            EquipmentInspectionPage vo = new EquipmentInspectionPage();
+            BeanUtils.copyProperties(main, vo);
+            List<InspectionRecord> inspectionRecordList = inspectionRecordService.selectByMainId(main.getId());
+            vo.setInspectionRecordList(inspectionRecordList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "设备检验列表");
+        mv.addObject(NormalExcelConstants.CLASS, EquipmentInspectionPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("设备检验数据", "导出人:" + sysUser.getRealname(), "设备检验"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("specialEquipment:sbsmzq_equipment_inspection: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<EquipmentInspectionPage> list = ExcelImportUtil.importExcel(file.getInputStream(), EquipmentInspectionPage.class, params);
+                for (EquipmentInspectionPage page : list) {
+                    EquipmentInspection po = new EquipmentInspection();
+                    BeanUtils.copyProperties(page, po);
+                    equipmentInspectionService.saveMain(po, page.getInspectionRecordList());
+                }
+                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<EquipmentInspection>> 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<EquipmentInspection> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EquipmentInspection::getDirector, loginUser.getId());
+        QueryGenerator.initQueryWrapper(queryWrapper, req.getParameterMap());
+        Page<EquipmentInspection> page = new Page<EquipmentInspection>(pageNo, pageSize);
+        IPage<EquipmentInspection> pageList = equipmentInspectionService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+
+    @ApiOperation(value = "检验记录-设备检验与检验记录组合查询", notes = "检验记录-设备检验与检验记录组合查询")
+    @GetMapping("/listInspectionItems")
+    public Result<IPage<InspectionRecordVO>> listInspectionItems(
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            InspectionRecordQueryDTO queryDTO) {
+
+        // 禁用自动 searchCount
+        Page<InspectionRecordVO> page = new Page<>(pageNo, pageSize, false); // false 表示不自动 count
+
+        // 查询当前页数据
+        IPage<InspectionRecordVO> pagedInspectionItems = inspectionRecordService.queryInspectionRecordPage(page, queryDTO);
+
+        // 手动查询总数
+        long total = inspectionRecordService.queryInspectionRecordCount(queryDTO);
+
+        // 设置数据与总数
+        page.setRecords(pagedInspectionItems.getRecords());
+        page.setTotal(total);
+
+        return Result.OK(page);
+    }
+
+}

+ 30 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/dto/InspectionRecordQueryDTO.java

@@ -0,0 +1,30 @@
+package org.jeecg.modules.specialEquipment.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+
+@Data
+public class InspectionRecordQueryDTO {
+
+    private String deviceCode;   //设备编号
+    private String deviceName;   //设备名称
+    private String inspectionType;  //检验类型
+    private String inspectionResult; //检验结果
+    /**
+     * 检验开始时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDateTime startTime;
+    /**
+     * 检验结束时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDateTime endTime;
+
+    private String keyword;
+}

+ 157 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/entity/EquipmentInspection.java

@@ -0,0 +1,157 @@
+package org.jeecg.modules.specialEquipment.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-06-03
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_equipment_inspection对象", description = "设备检验")
+@Data
+@TableName("sbsmzq_equipment_inspection")
+public class EquipmentInspection 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 inspectionNo;
+    /**
+     * 设备编号
+     */
+    @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 inspectionType;
+    /**
+     * 检验周期
+     */
+    @Excel(name = "检验周期", width = 15)
+    @ApiModelProperty(value = "检验周期")
+    private String inspectionCycle;
+    /**
+     * 上次检验时间
+     */
+    @Excel(name = "上次检验时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "上次检验时间")
+    private Date lastInspectTime;
+    /**
+     * 检验结果
+     */
+    @Excel(name = "检验结果", width = 15)
+    @ApiModelProperty(value = "检验结果")
+    private String inspectionResult;
+    /**
+     * 报告编号
+     */
+    @Excel(name = "报告编号", width = 15)
+    @ApiModelProperty(value = "报告编号")
+    private String reportNo;
+    /**
+     * 下次检验时间
+     */
+    @Excel(name = "下次检验时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "下次检验时间")
+    private Date nextInspectTime;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String spec;
+    /**
+     * 特种设备类别
+     */
+    @Excel(name = "特种设备类别", width = 15)
+    @ApiModelProperty(value = "特种设备类别")
+    private String equipmentCategory;
+    /**
+     * 负责人
+     */
+    @Excel(name = "负责人", width = 15)
+    @ApiModelProperty(value = "负责人")
+    private String director;
+    /**
+     * 使用登记证号
+     */
+    @Excel(name = "使用登记证号", width = 15)
+    @ApiModelProperty(value = "使用登记证号")
+    private String registrationNumber;
+    /**
+     * 位置
+     */
+    @Excel(name = "位置", width = 15)
+    @ApiModelProperty(value = "位置")
+    private String location;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 126 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/entity/InspectionRecord.java

@@ -0,0 +1,126 @@
+package org.jeecg.modules.specialEquipment.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-06-03
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_inspection_record对象", description = "检验记录")
+@Data
+@TableName("sbsmzq_inspection_record")
+public class InspectionRecord 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 number;
+    /**
+     * 处理人
+     */
+    @Excel(name = "处理人", width = 15)
+    @ApiModelProperty(value = "处理人")
+    private String handler;
+    /**
+     * 检验时间
+     */
+    @Excel(name = "检验时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "检验时间")
+    private Date inspectionDate;
+    /**
+     * 检验结果
+     */
+    @Excel(name = "检验结果", width = 15)
+    @ApiModelProperty(value = "检验结果")
+    private String inspectionResult;
+    /**
+     * 报告编号
+     */
+    @Excel(name = "报告编号", width = 15)
+    @ApiModelProperty(value = "报告编号")
+    private String reportNumber;
+    /**
+     * 下次检验日期
+     */
+    @Excel(name = "下次检验日期", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "下次检验日期")
+    private Date nextInspectionDate;
+    /**
+     * 存在问题
+     */
+    @Excel(name = "存在问题", width = 15)
+    @ApiModelProperty(value = "存在问题")
+    private String problem;
+    /**
+     * 整改情况
+     */
+    @Excel(name = "整改情况", width = 15)
+    @ApiModelProperty(value = "整改情况")
+    private String rectification;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    /**
+     * 设备检验id
+     */
+    @ApiModelProperty(value = "设备检验id")
+    private String inspectionId;
+}

+ 14 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/EquipmentInspectionMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.specialEquipment.mapper;
+
+import org.jeecg.modules.specialEquipment.entity.EquipmentInspection;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 设备检验
+ * @Author: jeecg-boot
+ * @Date:   2025-06-03
+ * @Version: V1.0
+ */
+public interface EquipmentInspectionMapper extends BaseMapper<EquipmentInspection> {
+
+}

+ 41 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/InspectionRecordMapper.java

@@ -0,0 +1,41 @@
+package org.jeecg.modules.specialEquipment.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentDisposal.deviceDisposal.dto.DeviceDisposalQueryDTO;
+import org.jeecg.modules.specialEquipment.dto.InspectionRecordQueryDTO;
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import org.jeecg.modules.specialEquipment.vo.InspectionRecordVO;
+
+import java.util.List;
+
+/**
+ * @Description: 检验记录
+ * @Author: jeecg-boot
+ * @Date: 2025-06-03
+ * @Version: V1.0
+ */
+public interface InspectionRecordMapper extends BaseMapper<InspectionRecord> {
+
+    /**
+     * 通过主表id删除子表数据
+     *
+     * @param mainId 主表id
+     * @return boolean
+     */
+    boolean deleteByMainId(@Param("mainId") String mainId);
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<InspectionRecord>
+     */
+    List<InspectionRecord> selectByMainId(@Param("mainId") String mainId);
+
+    IPage<InspectionRecordVO> queryInspectionRecordPage(Page<InspectionRecordVO> page, @Param("query") InspectionRecordQueryDTO query);
+
+    Long queryInspectionRecordCount(@Param("query") InspectionRecordQueryDTO query);
+}

+ 5 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/xml/EquipmentInspectionMapper.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.mapper.EquipmentInspectionMapper">
+
+</mapper>

+ 101 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/mapper/xml/InspectionRecordMapper.xml

@@ -0,0 +1,101 @@
+<?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.mapper.InspectionRecordMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_inspection_record 
+		WHERE
+			 inspection_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.specialEquipment.entity.InspectionRecord">
+		SELECT * 
+		FROM  sbsmzq_inspection_record
+		WHERE
+			 inspection_id = #{mainId} 	</select>
+
+
+	<select id="queryInspectionRecordPage" resultType="org.jeecg.modules.specialEquipment.vo.InspectionRecordVO">
+		SELECT
+		ds.id AS inspectionId,
+		ds.device_code,
+		ds.device_name,
+		ds.inspection_type,
+		ti.id AS itemId,
+		ti.number,
+		ti.inspection_date,
+		ti.inspection_result,
+		ti.report_number,
+		ti.next_inspection_date,
+		ti.problem,
+		ti.rectification
+		FROM sbsmzq_equipment_inspection ds
+		LEFT JOIN sbsmzq_inspection_record ti
+		ON ds.id COLLATE utf8mb4_general_ci = ti.inspection_id COLLATE utf8mb4_general_ci
+		<where>
+			<if test="query.deviceCode != null and query.deviceCode != ''">
+				AND ds.device_code = #{query.deviceCode}
+			</if>
+			<if test="query.deviceName != null and query.deviceName != ''">
+				AND ds.device_name = #{query.deviceName}
+			</if>
+			<if test="query.inspectionType != null and query.inspectionType != ''">
+				AND ds.inspection_type = #{query.inspectionType}
+			</if>
+			<if test="query.inspectionResult != null and query.inspectionResult != ''">
+				AND ds.inspection_result = #{query.inspectionResult}
+			</if>
+			<if test="query.startTime != null">
+				AND ti.inspection_date &gt;= #{query.startTime}
+			</if>
+			<if test="query.endTime != null">
+				AND ti.inspection_date &lt;= #{query.endTime}
+			</if>
+			<if test="query.keyword != null and query.keyword != ''">
+				AND (
+				ds.device_code LIKE CONCAT('%', #{query.keyword}, '%')
+				OR ds.device_name LIKE CONCAT('%', #{query.keyword}, '%')
+				OR ds.inspection_type LIKE CONCAT('%', #{query.keyword}, '%')
+				)
+			</if>
+		</where>
+		ORDER BY ti.inspection_date DESC
+	</select>
+
+
+	<select id="queryInspectionRecordCount" resultType="java.lang.Long">
+		SELECT COUNT(1)
+		FROM sbsmzq_equipment_inspection ds
+		LEFT JOIN sbsmzq_inspection_record ti
+		ON ds.id COLLATE utf8mb4_general_ci = ti.inspection_id COLLATE utf8mb4_general_ci
+		<where>
+			<if test="query.deviceCode != null and query.deviceCode != ''">
+				AND ds.device_code = #{query.deviceCode}
+			</if>
+			<if test="query.deviceName != null and query.deviceName != ''">
+				AND ds.device_name = #{query.deviceName}
+			</if>
+			<if test="query.inspectionType != null and query.inspectionType != ''">
+				AND ds.inspection_type = #{query.inspectionType}
+			</if>
+			<if test="query.inspectionResult != null and query.inspectionResult != ''">
+				AND ds.inspection_result = #{query.inspectionResult}
+			</if>
+			<if test="query.startTime != null">
+				AND ti.inspection_date &gt;= #{query.startTime}
+			</if>
+			<if test="query.endTime != null">
+				AND ti.inspection_date &lt;= #{query.endTime}
+			</if>
+			<if test="query.keyword != null and query.keyword != ''">
+				AND (
+				ds.device_code LIKE CONCAT('%', #{query.keyword}, '%')
+				OR ds.device_name LIKE CONCAT('%', #{query.keyword}, '%')
+				OR ds.inspection_type LIKE CONCAT('%', #{query.keyword}, '%')
+				)
+			</if>
+		</where>
+		ORDER BY ti.inspection_date DESC
+	</select>
+
+</mapper>

+ 48 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/IEquipmentInspectionService.java

@@ -0,0 +1,48 @@
+package org.jeecg.modules.specialEquipment.service;
+
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import org.jeecg.modules.specialEquipment.entity.EquipmentInspection;
+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-06-03
+ * @Version: V1.0
+ */
+public interface IEquipmentInspectionService extends IService<EquipmentInspection> {
+
+	/**
+	 * 添加一对多
+	 *
+	 * @param equipmentInspection
+	 * @param inspectionRecordList
+	 */
+	public void saveMain(EquipmentInspection equipmentInspection,List<InspectionRecord> inspectionRecordList) ;
+	
+	/**
+	 * 修改一对多
+	 *
+   * @param equipmentInspection
+   * @param inspectionRecordList
+	 */
+	public void updateMain(EquipmentInspection equipmentInspection,List<InspectionRecord> inspectionRecordList);
+	
+	/**
+	 * 删除一对多
+	 *
+	 * @param id
+	 */
+	public void delMain (String id);
+	
+	/**
+	 * 批量删除一对多
+	 *
+	 * @param idList
+	 */
+	public void delBatchMain (Collection<? extends Serializable> idList);
+	
+}

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

@@ -0,0 +1,32 @@
+package org.jeecg.modules.specialEquipment.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.deviceSale.dto.DeviceSaleItemQuery;
+import org.jeecg.modules.specialEquipment.dto.InspectionRecordQueryDTO;
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import org.jeecg.modules.specialEquipment.vo.InspectionRecordVO;
+
+import java.util.List;
+
+/**
+ * @Description: 检验记录
+ * @Author: jeecg-boot
+ * @Date: 2025-06-03
+ * @Version: V1.0
+ */
+public interface IInspectionRecordService extends IService<InspectionRecord> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<InspectionRecord>
+     */
+    List<InspectionRecord> selectByMainId(String mainId);
+
+    IPage<InspectionRecordVO> queryInspectionRecordPage(Page<InspectionRecordVO> page, InspectionRecordQueryDTO queryDTO);
+
+    long queryInspectionRecordCount(InspectionRecordQueryDTO queryDTO);
+}

+ 77 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/impl/EquipmentInspectionServiceImpl.java

@@ -0,0 +1,77 @@
+package org.jeecg.modules.specialEquipment.service.impl;
+
+import org.jeecg.modules.specialEquipment.entity.EquipmentInspection;
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import org.jeecg.modules.specialEquipment.mapper.InspectionRecordMapper;
+import org.jeecg.modules.specialEquipment.mapper.EquipmentInspectionMapper;
+import org.jeecg.modules.specialEquipment.service.IEquipmentInspectionService;
+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-06-03
+ * @Version: V1.0
+ */
+@Service
+public class EquipmentInspectionServiceImpl extends ServiceImpl<EquipmentInspectionMapper, EquipmentInspection> implements IEquipmentInspectionService {
+
+	@Autowired
+	private EquipmentInspectionMapper equipmentInspectionMapper;
+	@Autowired
+	private InspectionRecordMapper inspectionRecordMapper;
+	
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void saveMain(EquipmentInspection equipmentInspection, List<InspectionRecord> inspectionRecordList) {
+		equipmentInspectionMapper.insert(equipmentInspection);
+		if(inspectionRecordList!=null && inspectionRecordList.size()>0) {
+			for(InspectionRecord entity:inspectionRecordList) {
+				//外键设置
+				entity.setInspectionId(equipmentInspection.getId());
+				inspectionRecordMapper.insert(entity);
+			}
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void updateMain(EquipmentInspection equipmentInspection,List<InspectionRecord> inspectionRecordList) {
+		equipmentInspectionMapper.updateById(equipmentInspection);
+		
+		//1.先删除子表数据
+		inspectionRecordMapper.deleteByMainId(equipmentInspection.getId());
+		
+		//2.子表数据重新插入
+		if(inspectionRecordList!=null && inspectionRecordList.size()>0) {
+			for(InspectionRecord entity:inspectionRecordList) {
+				//外键设置
+				entity.setInspectionId(equipmentInspection.getId());
+				inspectionRecordMapper.insert(entity);
+			}
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void delMain(String id) {
+		inspectionRecordMapper.deleteByMainId(id);
+		equipmentInspectionMapper.deleteById(id);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void delBatchMain(Collection<? extends Serializable> idList) {
+		for(Serializable id:idList) {
+			inspectionRecordMapper.deleteByMainId(id.toString());
+			equipmentInspectionMapper.deleteById(id);
+		}
+	}
+	
+}

+ 42 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/service/impl/InspectionRecordServiceImpl.java

@@ -0,0 +1,42 @@
+package org.jeecg.modules.specialEquipment.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.specialEquipment.dto.InspectionRecordQueryDTO;
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import org.jeecg.modules.specialEquipment.mapper.InspectionRecordMapper;
+import org.jeecg.modules.specialEquipment.service.IInspectionRecordService;
+import org.jeecg.modules.specialEquipment.vo.InspectionRecordVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Description: 检验记录
+ * @Author: jeecg-boot
+ * @Date: 2025-06-03
+ * @Version: V1.0
+ */
+@Service
+public class InspectionRecordServiceImpl extends ServiceImpl<InspectionRecordMapper, InspectionRecord> implements IInspectionRecordService {
+
+    @Autowired
+    private InspectionRecordMapper inspectionRecordMapper;
+
+    @Override
+    public List<InspectionRecord> selectByMainId(String mainId) {
+        return inspectionRecordMapper.selectByMainId(mainId);
+    }
+
+    @Override
+    public IPage<InspectionRecordVO> queryInspectionRecordPage(Page<InspectionRecordVO> page, InspectionRecordQueryDTO queryDTO) {
+        return inspectionRecordMapper.queryInspectionRecordPage(page, queryDTO);
+    }
+
+    @Override
+    public long queryInspectionRecordCount(InspectionRecordQueryDTO queryDTO) {
+        return inspectionRecordMapper.queryInspectionRecordCount(queryDTO);
+    }
+}

+ 115 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/vo/EquipmentInspectionPage.java

@@ -0,0 +1,115 @@
+package org.jeecg.modules.specialEquipment.vo;
+
+import java.util.List;
+
+import org.jeecg.modules.specialEquipment.entity.InspectionRecord;
+import lombok.Data;
+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;
+
+/**
+ * @Description: 设备检验
+ * @Author: jeecg-boot
+ * @Date:   2025-06-03
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value="sbsmzq_equipment_inspectionPage对象", description="设备检验")
+public class EquipmentInspectionPage {
+
+	/**主键*/
+	@ApiModelProperty(value = "主键")
+    private java.lang.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")
+	@ApiModelProperty(value = "创建日期")
+    private java.util.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")
+	@ApiModelProperty(value = "更新日期")
+    private java.util.Date updateTime;
+	/**所属部门*/
+	@ApiModelProperty(value = "所属部门")
+    private java.lang.String sysOrgCode;
+	/**检验编号*/
+	@Excel(name = "检验编号", width = 15)
+	@ApiModelProperty(value = "检验编号")
+    private java.lang.String inspectionNo;
+	/**设备编号*/
+	@Excel(name = "设备编号", width = 15)
+	@ApiModelProperty(value = "设备编号")
+    private java.lang.String deviceCode;
+	/**设备名称*/
+	@Excel(name = "设备名称", width = 15)
+	@ApiModelProperty(value = "设备名称")
+    private java.lang.String deviceName;
+	/**检验类型*/
+	@Excel(name = "检验类型", width = 15)
+	@ApiModelProperty(value = "检验类型")
+    private java.lang.String inspectionType;
+	/**检验周期*/
+	@Excel(name = "检验周期", width = 15)
+	@ApiModelProperty(value = "检验周期")
+    private java.lang.String inspectionCycle;
+	/**上次检验时间*/
+	@Excel(name = "上次检验时间", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+	@ApiModelProperty(value = "上次检验时间")
+    private java.util.Date lastInspectTime;
+	/**检验结果*/
+	@Excel(name = "检验结果", width = 15)
+	@ApiModelProperty(value = "检验结果")
+    private java.lang.String inspectionResult;
+	/**报告编号*/
+	@Excel(name = "报告编号", width = 15)
+	@ApiModelProperty(value = "报告编号")
+    private java.lang.String reportNo;
+	/**下次检验时间*/
+	@Excel(name = "下次检验时间", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+	@ApiModelProperty(value = "下次检验时间")
+    private java.util.Date nextInspectTime;
+	/**规格型号*/
+	@Excel(name = "规格型号", width = 15)
+	@ApiModelProperty(value = "规格型号")
+    private java.lang.String spec;
+	/**特种设备类别*/
+	@Excel(name = "特种设备类别", width = 15)
+	@ApiModelProperty(value = "特种设备类别")
+    private java.lang.String equipmentCategory;
+	/**负责人*/
+	@Excel(name = "负责人", width = 15)
+	@ApiModelProperty(value = "负责人")
+    private java.lang.String director;
+	/**使用登记证号*/
+	@Excel(name = "使用登记证号", width = 15)
+	@ApiModelProperty(value = "使用登记证号")
+    private java.lang.String registrationNumber;
+	/**位置*/
+	@Excel(name = "位置", width = 15)
+	@ApiModelProperty(value = "位置")
+    private java.lang.String location;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+	@ApiModelProperty(value = "备注")
+    private java.lang.String remark;
+
+	@ExcelCollection(name="检验记录")
+	@ApiModelProperty(value = "检验记录")
+	private List<InspectionRecord> inspectionRecordList;
+
+}

+ 28 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/specialEquipment/vo/InspectionRecordVO.java

@@ -0,0 +1,28 @@
+package org.jeecg.modules.specialEquipment.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class InspectionRecordVO {
+
+    // EquipmentInspection 字段
+    private String inspectionId;  //设备检验id
+    private String deviceCode;   //设备编号
+    private String deviceName;   //设备名称
+    private String inspectionType;  //检验类型
+
+
+    // InspectionRecord 字段
+    private String itemId;  // 检验记录id
+    private String number;   // 编号
+    private Date inspectionDate; //检验时间
+    private String inspectionResult; //检验结果
+    private String reportNumber;   // 报告编号
+    private Date nextInspectionDate; // 下次检验日期
+    private String problem;  // 存在问题
+    private String rectification; //整改情况
+
+
+}