feat(eqp): 增加设备名称和备件名称的关联查询功能
- 在多个Mapper接口中添加selectVoPagePlus方法支持分页查询 - 在XML映射文件中新增selectVoPagePlus查询语句,联查设备管理表或备件表获取设备名称/备件名称- 修改ServiceImpl中的分页查询方法调用selectVoPagePlus替换原有的selectVoPage- 在Vo类中增加equipmentName和partName字段用于展示关联信息- 更新EqpEquipmentManagementMapper.xml中eqp_equipment_type关联查询条件,过滤已删除数据 - 优化queryList方法使用selectVoPagePlus实现列表查询功能
This commit is contained in:
@@ -44,4 +44,6 @@ public class EqpEquipmentTypeVo {
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -64,5 +64,11 @@ public class EqpInspectedEquipmentVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -64,5 +64,7 @@ public class EqpInspectionRecordVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
}
|
||||
|
||||
@@ -69,4 +69,8 @@ public class EqpSparePartVo {
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
}
|
||||
|
||||
@@ -64,5 +64,8 @@ public class EqpSparePartsChangeVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty(value = "备件名称")
|
||||
private String partName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.mes.eqp.domain.EqpInspectedEquipment;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectedEquipmentVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 待检设备Mapper接口
|
||||
@@ -12,4 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface EqpInspectedEquipmentMapper extends BaseMapperPlus<EqpInspectedEquipmentMapper, EqpInspectedEquipment, EqpInspectedEquipmentVo> {
|
||||
|
||||
Page<EqpInspectedEquipmentVo> selectVoPagePlus(Page<Object> build,@Param("ew") LambdaQueryWrapper<EqpInspectedEquipment> lqw);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.mes.eqp.domain.EqpInspectionRecord;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectionRecordVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 检修记录Mapper接口
|
||||
@@ -12,4 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface EqpInspectionRecordMapper extends BaseMapperPlus<EqpInspectionRecordMapper, EqpInspectionRecord, EqpInspectionRecordVo> {
|
||||
|
||||
Page<EqpInspectionRecordVo> selectVoPagePlus(Page<Object> build,@Param("ew") LambdaQueryWrapper<EqpInspectionRecord> lqw);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.mes.eqp.domain.EqpSparePart;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 备品备件Mapper接口
|
||||
@@ -12,4 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface EqpSparePartMapper extends BaseMapperPlus<EqpSparePartMapper, EqpSparePart, EqpSparePartVo> {
|
||||
|
||||
Page<EqpSparePartVo> selectVoPagePlus(Page<Object> build,@Param("ew") LambdaQueryWrapper<EqpSparePart> lqw);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.mes.eqp.domain.EqpSparePartsChange;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartsChangeVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录Mapper接口
|
||||
@@ -12,4 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface EqpSparePartsChangeMapper extends BaseMapperPlus<EqpSparePartsChangeMapper, EqpSparePartsChange, EqpSparePartsChangeVo> {
|
||||
|
||||
Page<EqpSparePartsChangeVo> selectVoPagePlus(Page<Object> build,@Param("ew") LambdaQueryWrapper<EqpSparePartsChange> lqw);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class EqpInspectedEquipmentServiceImpl implements IEqpInspectedEquipmentS
|
||||
@Override
|
||||
public TableDataInfo<EqpInspectedEquipmentVo> queryPageList(EqpInspectedEquipmentBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpInspectedEquipment> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpInspectedEquipmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<EqpInspectedEquipmentVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,10 @@ public class EqpInspectedEquipmentServiceImpl implements IEqpInspectedEquipmentS
|
||||
@Override
|
||||
public List<EqpInspectedEquipmentVo> queryList(EqpInspectedEquipmentBo bo) {
|
||||
LambdaQueryWrapper<EqpInspectedEquipment> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
Page<Object> build = new PageQuery().build();
|
||||
build.setSize(Long.MAX_VALUE);
|
||||
Page<EqpInspectedEquipmentVo> eqpInspectedEquipmentVoPage = baseMapper.selectVoPagePlus(build, lqw);
|
||||
return eqpInspectedEquipmentVoPage.getRecords();
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpInspectedEquipment> buildQueryWrapper(EqpInspectedEquipmentBo bo) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class EqpInspectionRecordServiceImpl implements IEqpInspectionRecordServi
|
||||
@Override
|
||||
public TableDataInfo<EqpInspectionRecordVo> queryPageList(EqpInspectionRecordBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpInspectionRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpInspectionRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<EqpInspectionRecordVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class EqpSparePartServiceImpl implements IEqpSparePartService {
|
||||
@Override
|
||||
public TableDataInfo<EqpSparePartVo> queryPageList(EqpSparePartBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpSparePart> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpSparePartVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<EqpSparePartVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class EqpSparePartsChangeServiceImpl implements IEqpSparePartsChangeServi
|
||||
@Override
|
||||
public TableDataInfo<EqpSparePartsChangeVo> queryPageList(EqpSparePartsChangeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpSparePartsChange> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpSparePartsChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<EqpSparePartsChangeVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user