From 7cfedf9390f245c84254eedba1f08d3ac06df102 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期一, 07 四月 2025 15:19:18 +0800
Subject: [PATCH] 设备工单

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java         |   23 ++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java                  |  128 ++++++++++++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml         |   42 +++++
 lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java                 |    5 
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java |   48 ++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java    |  169 +++++++++++++++++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamRepairOrderMapper.java            |   28 +++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java   |   18 ++
 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/ReportRepairEnum.java       |   10 +
 9 files changed, 465 insertions(+), 6 deletions(-)

diff --git a/lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java b/lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java
index e826933..2343268 100644
--- a/lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java
+++ b/lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java
@@ -618,9 +618,4 @@
     Integer SHIFT_TYPE_1 = 1;
     Integer SHIFT_TYPE_2 = 2;
 
-    /**
-     * 鎶ヤ慨鐘舵��
-     */
-    String REPORT_STATUS = "1";
-
 }
diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/ReportRepairEnum.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/ReportRepairEnum.java
new file mode 100644
index 0000000..1d770de
--- /dev/null
+++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/ReportRepairEnum.java
@@ -0,0 +1,10 @@
+package org.jeecg.modules.eam.constant;
+
+public enum ReportRepairEnum {
+    WAIT_REPAIR, // 寰呯淮淇�
+    UNDER_REPAIR, // 缁翠慨涓�
+    WAIT_SPARES, // 绛夊浠�
+    WAIT_CONFIRM, // 寰呯‘璁�
+    COMPLETE, // 宸插畬鎴�
+    ABOLISH, // 宸蹭綔搴�
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java
new file mode 100644
index 0000000..e30c5b6
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java
@@ -0,0 +1,169 @@
+package org.jeecg.modules.eam.controller;
+
+import java.util.Arrays;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.eam.constant.BusinessCodeConst;
+import org.jeecg.modules.eam.constant.ReportRepairEnum;
+import org.jeecg.modules.eam.entity.EamRepairOrder;
+import org.jeecg.modules.eam.entity.EamReportRepair;
+import org.jeecg.modules.eam.service.IEamRepairOrderService;
+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.jeecg.modules.eam.service.IEamReportRepairService;
+import org.jeecg.modules.mdc.util.DateUtils;
+import org.jeecg.modules.system.service.ISysBusinessCodeRuleService;
+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;
+
+/**
+ * @Description: 缁翠慨宸ュ崟
+ * @Author: Lius
+ * @Date: 2025-04-03
+ */
+@Slf4j
+@Api(tags = "缁翠慨宸ュ崟")
+@RestController
+@RequestMapping("/eam/eamRepairOrder")
+public class EamRepairOrderController extends JeecgController<EamRepairOrder, IEamRepairOrderService> {
+
+    @Resource
+    private IEamRepairOrderService eamRepairOrderService;
+
+    @Resource
+    private ISysBusinessCodeRuleService businessCodeRuleService;
+
+    @Resource
+    private IEamReportRepairService eamReportRepairService;
+
+    /**
+     * 鍒嗛〉鍒楄〃鏌ヨ
+     *
+     * @param eamRepairOrder
+     * @param pageNo
+     * @param pageSize
+     * @return
+     */
+    @AutoLog(value = "缁翠慨宸ュ崟-鍒嗛〉鍒楄〃鏌ヨ")
+    @ApiOperation(value = "缁翠慨宸ュ崟-鍒嗛〉鍒楄〃鏌ヨ", notes = "缁翠慨宸ュ崟-鍒嗛〉鍒楄〃鏌ヨ")
+    @GetMapping(value = "/list")
+    public Result<?> queryPageList(EamRepairOrder eamRepairOrder,
+                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
+        Page<EamRepairOrder> page = new Page<EamRepairOrder>(pageNo, pageSize);
+        IPage<EamRepairOrder> pageList = eamRepairOrderService.pageList(page, eamRepairOrder);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 棰嗗彇
+     *
+     * @param eamRepairOrder
+     * @return
+     */
+    @AutoLog(value = "缁翠慨宸ュ崟-棰嗗彇")
+    @ApiOperation(value = "缁翠慨宸ュ崟-棰嗗彇", notes = "缁翠慨宸ュ崟-棰嗗彇")
+    @PostMapping(value = "/add")
+    public Result<?> add(@RequestBody EamRepairOrder eamRepairOrder) {
+        if (StringUtils.isBlank(eamRepairOrder.getReportId())) {
+            return Result.error("棰嗗彇澶辫触,璇烽�夋嫨缁翠慨璁板綍锛�");
+        }
+        String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.REPAIR_ORDER_CODE_RULE);
+        eamRepairOrder.setRepairCode(codeSeq);
+        EamReportRepair eamReportRepair = eamReportRepairService.getById(eamRepairOrder.getReportId());
+        eamRepairOrder.setDelFlag(CommonConstant.DEL_FLAG_0);
+        eamRepairOrder.setEquipmentId(eamReportRepair.getEquipmentId());
+        eamReportRepair.setReportStatus(ReportRepairEnum.UNDER_REPAIR.name());
+        eamRepairOrder.setRepairStatus(ReportRepairEnum.UNDER_REPAIR.name());
+        eamRepairOrder.setActualStartTime(DateUtils.getNow());
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        eamRepairOrder.setRepairer(user.getRealname());
+        eamReportRepairService.updateById(eamReportRepair);
+        eamRepairOrderService.save(eamRepairOrder);
+        // TODO 鍚姩娴佺▼
+
+        return Result.OK("娣诲姞鎴愬姛锛�");
+    }
+
+    /**
+     * 缂栬緫
+     *
+     * @param eamRepairOrder
+     * @return
+     */
+    @AutoLog(value = "缁翠慨宸ュ崟-缂栬緫")
+    @ApiOperation(value = "缁翠慨宸ュ崟-缂栬緫", notes = "缁翠慨宸ュ崟-缂栬緫")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<?> edit(@RequestBody EamRepairOrder eamRepairOrder) {
+        eamRepairOrderService.updateById(eamRepairOrder);
+        return Result.OK("缂栬緫鎴愬姛!");
+    }
+
+    /**
+     * 閫氳繃id鍒犻櫎
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "缁翠慨宸ュ崟-閫氳繃id鍒犻櫎")
+    @ApiOperation(value = "缁翠慨宸ュ崟-閫氳繃id鍒犻櫎", notes = "缁翠慨宸ュ崟-閫氳繃id鍒犻櫎")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        eamRepairOrderService.removeById(id);
+        return Result.OK("鍒犻櫎鎴愬姛!");
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "缁翠慨宸ュ崟-鎵归噺鍒犻櫎")
+    @ApiOperation(value = "缁翠慨宸ュ崟-鎵归噺鍒犻櫎", notes = "缁翠慨宸ュ崟-鎵归噺鍒犻櫎")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.eamRepairOrderService.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<?> queryById(@RequestParam(name = "id", required = true) String id) {
+        EamRepairOrder eamRepairOrder = eamRepairOrderService.getById(id);
+        return Result.OK(eamRepairOrder);
+    }
+
+    /**
+     * 瀵煎嚭excel
+     *
+     * @param request
+     * @param eamRepairOrder
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, EamRepairOrder eamRepairOrder) {
+        return super.exportXls(request, eamRepairOrder, EamRepairOrder.class, "缁翠慨宸ュ崟");
+    }
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java
index a9576c0..a52d1ca 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportRepairController.java
@@ -5,10 +5,12 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.modules.eam.constant.ReportRepairEnum;
 import org.jeecg.modules.eam.entity.EamReportRepair;
 import org.jeecg.modules.eam.request.EamReportRepairQuery;
 import org.jeecg.modules.eam.service.IEamReportRepairService;
@@ -66,7 +68,7 @@
     @ApiOperation(value = "鏁呴殰鎶ヤ慨-娣诲姞", notes = "鏁呴殰鎶ヤ慨-娣诲姞")
     @PostMapping(value = "/add")
     public Result<?> add(@RequestBody EamReportRepair eamReportRepair) {
-        eamReportRepair.setReportStatus(CommonConstant.REPORT_STATUS);
+        eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name());
         eamReportRepair.setDelFlag(CommonConstant.DEL_FLAG_0);
         eamReportRepairService.save(eamReportRepair);
         return Result.OK("娣诲姞鎴愬姛锛�");
@@ -87,6 +89,20 @@
     }
 
     /**
+     * 閫氳繃id浣滃簾
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "鏁呴殰鎶ヤ慨-浣滃簾")
+    @ApiOperation(value = "鏁呴殰鎶ヤ慨-浣滃簾", notes = "鏁呴殰鎶ヤ慨-浣滃簾")
+    @DeleteMapping(value = "/abolish")
+    public Result<?> abolish(@RequestParam(name = "id", required = true) String id) {
+        eamReportRepairService.update(new LambdaUpdateWrapper<EamReportRepair>().set(EamReportRepair::getReportStatus, ReportRepairEnum.ABOLISH.name()).eq(EamReportRepair::getId, id));
+        return Result.OK("浣滃簾鎴愬姛!");
+    }
+
+    /**
      * 閫氳繃id鍒犻櫎
      *
      * @param id
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java
new file mode 100644
index 0000000..ad67170
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java
@@ -0,0 +1,128 @@
+package org.jeecg.modules.eam.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecg.common.system.base.entity.JeecgEntity;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 缁翠慨宸ュ崟
+ * @Author: Lius
+ * @Date: 2025-04-03
+ */
+@Data
+@TableName("eam_repair_order")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "eam_repair_order瀵硅薄", description = "缁翠慨宸ュ崟")
+public class EamRepairOrder extends JeecgEntity implements Serializable {
+
+    private static final long serialVersionUID = -2336763554235629574L;
+
+    /**
+     * 鍒犻櫎鏍囪
+     */
+    @Excel(name = "鍒犻櫎鏍囪", width = 15)
+    @ApiModelProperty(value = "鍒犻櫎鏍囪")
+    private Integer delFlag;
+    /**
+     * 宸ュ崟缂栧彿
+     */
+    @Excel(name = "宸ュ崟缂栧彿", width = 15)
+    @ApiModelProperty(value = "宸ュ崟缂栧彿")
+    private String repairCode;
+    /**
+     * 鎶ヤ慨ID
+     */
+    @Excel(name = "鎶ヤ慨ID", width = 15)
+    @ApiModelProperty(value = "鎶ヤ慨ID")
+    private String reportId;
+    /**
+     * 璁惧ID
+     */
+    @Excel(name = "璁惧ID", width = 15)
+    @ApiModelProperty(value = "璁惧ID")
+    @Dict(dictTable = "eam_equipment", dicCode = "id", dicText = "equipment_code")
+    private String equipmentId;
+    /**
+     * 缁翠慨鐘舵��
+     */
+    @Excel(name = "缁翠慨鐘舵��", width = 15)
+    @ApiModelProperty(value = "缁翠慨鐘舵��")
+    private String repairStatus;
+    /**
+     * 缁翠慨寮�濮嬫椂闂�
+     */
+    @ApiModelProperty(value = "缁翠慨寮�濮嬫椂闂�")
+    private Date actualStartTime;
+    /**
+     * 缁翠慨缁撴潫鏃堕棿
+     */
+    @ApiModelProperty(value = "缁翠慨缁撴潫鏃堕棿")
+    private Date actualEndTime;
+    /**
+     * 鏁呴殰鍘熷洜
+     */
+    @Excel(name = "鏁呴殰鍘熷洜", width = 15)
+    @ApiModelProperty(value = "鏁呴殰鍘熷洜")
+    private String faultReason;
+    /**
+     * 缁翠慨缁撴灉鎻忚堪
+     */
+    @Excel(name = "缁翠慨缁撴灉鎻忚堪", width = 15)
+    @ApiModelProperty(value = "缁翠慨缁撴灉鎻忚堪")
+    private String repairDescription;
+    /**
+     * 缁翠慨璐熻矗浜�
+     */
+    @Excel(name = "缁翠慨璐熻矗浜�", width = 15)
+    @ApiModelProperty(value = "缁翠慨璐熻矗浜�")
+    private String repairer;
+    /**
+     * 鏄惁濮斿
+     */
+    @Excel(name = "鏄惁濮斿", width = 15)
+    @ApiModelProperty(value = "鏄惁濮斿")
+    private String outsourcedFlag;
+    /**
+     * 濮斿缁翠慨鎻忚堪
+     */
+    @Excel(name = "濮斿缁翠慨鎻忚堪", width = 15)
+    @ApiModelProperty(value = "濮斿缁翠慨鎻忚堪")
+    private String outsourcedRepairDescription;
+    /**
+     * 濮斿缁翠慨寮�濮嬫椂闂�
+     */
+    @ApiModelProperty(value = "濮斿缁翠慨寮�濮嬫椂闂�")
+    private Date outsourcedStartTime;
+    /**
+     * 濮斿缁翠慨缁撴潫鏃堕棿
+     */
+    @ApiModelProperty(value = "濮斿缁翠慨缁撴潫鏃堕棿")
+    private Date outsourcedEndTime;
+    /**
+     * 濮斿璐熻矗浜�
+     */
+    @Excel(name = "濮斿璐熻矗浜�", width = 15)
+    @ApiModelProperty(value = "濮斿璐熻矗浜�")
+    private String outsourcedPerson;
+    /**
+     * 鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧
+     */
+    @Excel(name = "鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧", width = 15)
+    @ApiModelProperty(value = "鐓х墖鏂囦欢ids;id浠ラ�楀彿鍒嗛殧")
+    private String imageFiles;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "璁惧鍚嶇О")
+    private String equipmentName;
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamRepairOrderMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamRepairOrderMapper.java
new file mode 100644
index 0000000..2f773c7
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamRepairOrderMapper.java
@@ -0,0 +1,28 @@
+package org.jeecg.modules.eam.mapper;
+
+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.eam.entity.EamRepairOrder;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * @Description: 缁翠慨宸ュ崟
+ * @Author: Lius
+ * @Date: 2025-04-03
+ */
+public interface EamRepairOrderMapper extends BaseMapper<EamRepairOrder> {
+
+    /**
+     * 鍒嗛〉鍒楄〃
+     *
+     * @param page
+     * @param eamRepairOrder
+     * @param userId
+     * @param equipmentIds
+     * @return
+     */
+    IPage<EamRepairOrder> pageList(Page<EamRepairOrder> page, @Param("eamRepairOrder") EamRepairOrder eamRepairOrder, @Param("userId") String userId, @Param("equipmentIds") List<String> equipmentIds);
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml
new file mode 100644
index 0000000..afe5ce8
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamRepairOrderMapper.xml
@@ -0,0 +1,42 @@
+<?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.eam.mapper.EamRepairOrderMapper">
+
+    <select id="pageList" resultType="org.jeecg.modules.eam.entity.EamRepairOrder">
+        SELECT
+            t1.*,
+            t2.equipment_name
+        FROM
+            eam_repair_order t1
+                LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id
+        <where>
+            <choose>
+                <when test="equipmentIds != null and equipmentIds.size() > 0 ">
+                    AND t2.equipment_code IN
+                    <foreach collection="equipmentIds" item="equipmentId" index="index" open="(" close=")" separator=",">
+                        {equipmentId}
+                    </foreach>
+                </when>
+                <otherwise>
+                    EXISTS ( SELECT 1 FROM mdc_user_production t3 WHERE t3.user_id = #{userId} AND t3.pro_id= t2.org_id )
+                </otherwise>
+            </choose>
+            <if test="eamRepairOrder.equipmentId != null and eamRepairOrder.equipmentId != ''">
+                AND t2.equipment_code LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.equipmentId }),'%')
+            </if>
+            <if test="eamRepairOrder.equipmentName != null and eamRepairOrder.equipmentName != ''">
+                AND t2.equipment_name LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.equipmentName }),'%')
+            </if>
+            <if test="eamRepairOrder.repairStatus != null and eamRepairOrder.repairStatus != ''">
+                AND t1.repair_status = #{ eamRepairOrder.repairStatus }
+            </if>
+            <if test="eamRepairOrder.repairer != null and eamRepairOrder.repairer != ''">
+                AND t1.repairer LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.repairer }),'%')
+            </if>
+            <if test="eamRepairOrder.repairCode != null and eamRepairOrder.repairCode != ''">
+                AND t1.repair_code LIKE CONCAT(CONCAT('%',#{ eamRepairOrder.repairCode }),'%')
+            </if>
+        </where>
+        ORDER BY t1.create_time
+    </select>
+</mapper>
\ No newline at end of file
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java
new file mode 100644
index 0000000..0382d2c
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamRepairOrderService.java
@@ -0,0 +1,23 @@
+package org.jeecg.modules.eam.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.jeecg.modules.eam.entity.EamRepairOrder;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 缁翠慨宸ュ崟
+ * @Author: Lius
+ * @Date: 2025-04-03
+ */
+public interface IEamRepairOrderService extends IService<EamRepairOrder> {
+
+    /**
+     * 鍒嗛〉鍒楄〃
+     * @param page
+     * @param eamRepairOrder
+     * @return
+     */
+    IPage<EamRepairOrder> pageList(Page<EamRepairOrder> page, EamRepairOrder eamRepairOrder);
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java
new file mode 100644
index 0000000..5612c98
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java
@@ -0,0 +1,48 @@
+package org.jeecg.modules.eam.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.eam.entity.EamRepairOrder;
+import org.jeecg.modules.eam.mapper.EamRepairOrderMapper;
+import org.jeecg.modules.eam.service.IEamRepairOrderService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @Description: 缁翠慨宸ュ崟
+ * @Author: Lius
+ * @Date: 2025-04-03
+ */
+@Service
+public class EamRepairOrderServiceImpl extends ServiceImpl<EamRepairOrderMapper, EamRepairOrder> implements IEamRepairOrderService {
+
+    /**
+     * 鍒嗛〉鍒楄〃
+     *
+     * @param page
+     * @param eamRepairOrder
+     * @return
+     */
+    @Override
+    public IPage<EamRepairOrder> pageList(Page<EamRepairOrder> page, EamRepairOrder eamRepairOrder) {
+        //鐢ㄦ埛鏁版嵁鏉冮檺
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        if (sysUser == null) {
+            return page;
+        }
+        List<String> equipmentIds = new ArrayList<>();
+        if (StringUtils.isNotBlank(sysUser.getEquipmentIds())) {
+            //閫夋嫨浜嗚澶囷紝鏍规嵁璁惧id杩囨护璁惧
+            equipmentIds = Arrays.asList(sysUser.getEquipmentIds().split(","));
+        }
+        return this.baseMapper.pageList(page, eamRepairOrder, sysUser.getId(), equipmentIds);
+    }
+}

--
Gitblit v1.9.3