refactor(eqp): 统一使用QueryWrapper替代LambdaQueryWrapper

- 修改多个Mapper接口中的查询条件构造器类型为QueryWrapper
- 更新XML映射文件中的查询条件拼接方式为customSqlSegment
- 在Service实现类中重构查询条件构建方法,明确指定表别名以避免列名歧义
- 所有涉及设备管理、设备参数、点检设备、检修记录、备品备件及其变动记录的模块均完成适配
-保留逻辑删除条件并确保其正确应用
This commit is contained in:
2025-10-18 10:58:12 +08:00
parent 7ba5a07176
commit 8418454082
21 changed files with 143 additions and 63 deletions

View File

@@ -49,12 +49,7 @@
em.remark
FROM eqp_equipment_management em
LEFT JOIN eqp_equipment_type et ON em.type_id = et.type_id and et.del_flag = '0'
<where>
em.del_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>
</mapper>

View File

@@ -32,12 +32,7 @@
ep.remark
FROM eqp_equipment_param ep
LEFT JOIN eqp_equipment_management ee ON ep.equipment_id = ee.equipment_id
<where>
ep.del_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>

View File

@@ -30,12 +30,7 @@
ie.remark
FROM eqp_inspected_equipment ie
LEFT JOIN eqp_equipment_management em ON ie.equipment_id = em.equipment_id and em.del_flag = '0'
<where>
ie.del_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>

View File

@@ -31,12 +31,7 @@
ir.remark
FROM eqp_inspection_record ir
LEFT JOIN eqp_equipment_management em ON ir.equipment_id = em.equipment_id and em.del_flag = '0'
<where>
ir.del_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>

View File

@@ -32,12 +32,7 @@
sp.remark
FROM eqp_spare_part sp
LEFT JOIN eqp_equipment_management em ON sp.equipment_id = em.equipment_id and em.del_flag = '0'
<where>
sp.del_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>

View File

@@ -31,12 +31,7 @@
pc.remark
FROM eqp_spare_parts_change pc
LEFT JOIN eqp_spare_part sp ON pc.part_id = sp.part_id and sp.del_flag = '0'
<where>
pc.del_flag = '0'
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>

View File

@@ -34,12 +34,7 @@
t.type_name AS typeName
FROM eqp_type_param tp
LEFT JOIN eqp_equipment_type t ON tp.type_id = t.type_id
<where>
tp.del_flag = 0
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
AND ${ew.sqlSegment}
</if>
</where>
${ew.customSqlSegment}
</select>