feat(eqp): 增加设备名称和备件名称的关联查询功能
- 在多个Mapper接口中添加selectVoPagePlus方法支持分页查询 - 在XML映射文件中新增selectVoPagePlus查询语句,联查设备管理表或备件表获取设备名称/备件名称- 修改ServiceImpl中的分页查询方法调用selectVoPagePlus替换原有的selectVoPage- 在Vo类中增加equipmentName和partName字段用于展示关联信息- 更新EqpEquipmentManagementMapper.xml中eqp_equipment_type关联查询条件,过滤已删除数据 - 优化queryList方法使用selectVoPagePlus实现列表查询功能
This commit is contained in:
@@ -18,6 +18,26 @@
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
<select id="selectVoPagePlus" resultType="com.klp.mes.eqp.domain.vo.EqpSparePartsChangeVo">
|
||||
-- 联查备件表拿备件名称
|
||||
SELECT
|
||||
pc.change_id,
|
||||
pc.part_id,
|
||||
sp.part_name AS partName,
|
||||
pc.change_type,
|
||||
pc.change_quantity,
|
||||
pc.reason,
|
||||
pc.change_time,
|
||||
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>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user