Forráskód Böngészése

feat(repairs): 添加报修部门筛选功能

- 在 RepairApplicationFormDTO 中新增 deptId 字段用于报修部门筛选
- 修改 RepairApplicationFormMapper.xml 查询语句增加部门表关联查询
- 在 selectPageList 方法中添加 deptId 筛选条件支持
- 在 RepairApplicationFormVO 中新增 deptId 和 deptName 映射字段
- 完善报修申请单列表页面的部门筛选功能实现
dazhaxie 1 napja
szülő
commit
b956777307

+ 5 - 0
platform-dao/src/main/java/com/platform/dao/dto/repair/RepairApplicationFormDTO.java

@@ -335,4 +335,9 @@ public class RepairApplicationFormDTO extends BaseDTO implements Serializable {
     private String threeRepairUser;
 
     private String fourRepairUser;
+
+    /**
+     * 报修部门ID(筛选条件/保存报修部门)
+     */
+    private String deptId;
 }

+ 10 - 0
platform-dao/src/main/java/com/platform/dao/vo/repair/RepairApplicationFormVO.java

@@ -371,4 +371,14 @@ public class RepairApplicationFormVO extends BaseVO implements Serializable {
     private String fourRepairUserName;
 
     private String positionName;
+
+    /**
+     * 报修部门ID
+     */
+    private String deptId;
+
+    /**
+     * 报修部门名称
+     */
+    private String deptName;
 }

+ 7 - 1
platform-dao/src/main/resources/mapper/repair/RepairApplicationFormMapper.xml

@@ -8,7 +8,8 @@
         user3.real_name as checkUserName,
         sb.name as sbName,part.name as partName,
         sb.no as sbNo, sb.cph as sbCph, sb.model_id as modelId,
-        error.name as repairErrorTypeName
+        error.name as repairErrorTypeName,
+        dept.name as deptName
     </sql>
     <select id="selectPageList" parameterType="com.platform.dao.dto.repair.RepairApplicationFormDTO"
             resultType="com.platform.dao.vo.repair.RepairApplicationFormVO">
@@ -29,6 +30,7 @@
         left join t_sys_user user4 on sb.repair_user = user4.user_id
         left join t_error_type error on application.repair_error_type_id = error.id
         left join t_part_info part on application.part_id = part.id
+        left join t_sys_dept dept on application.dept_id = dept.dept_id
         <where>
             <if test="keyword != null and keyword != ''">
                 and (
@@ -125,6 +127,9 @@
             <if test="searchEndTime != null">
                 and application.apply_time <![CDATA[ <= ]]> #{searchEndTime}
             </if>
+            <if test="deptId != null and deptId != ''">
+                and application.dept_id = #{deptId}
+            </if>
         </where>
     </select>
     <select id="selectById" parameterType="java.lang.Object"
@@ -138,6 +143,7 @@
         left join t_sb_info sb on application.sb_id = sb.id
         left join t_part_info part on application.part_id = part.id
         left join t_error_type error on application.repair_error_type_id = error.id
+        left join t_sys_dept dept on application.dept_id = dept.dept_id
         where application.id = #{id,jdbcType=VARCHAR}
     </select>