<?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.springblade.jfpt.equipmentinfo.mapper.EquipmentInfoMapper">
|
|
<select id="selectEquipmentInfoDeptPages" resultType="org.springblade.jfpt.equipmentinfo.vo.EquipmentInfoVo">
|
select id,name,type,dept_id deptId,serial_number serialNumber,remark,create_time createTime,
|
province,city,district,street
|
from
|
equipment_info
|
where 1=1
|
<if test="equipmentInfo.name!=null and equipmentInfo.name!=''">
|
and name like concat('%',#{equipmentInfo.name},'%')
|
</if>
|
<if test="equipmentInfo.serialNumber!=null and equipmentInfo.serialNumber!=''">
|
and serial_number like concat('%',#{equipmentInfo.serialNumber},'%')
|
</if>
|
<if test="equipmentInfo.province!=null and equipmentInfo.province!=''">
|
and province like concat('%',#{equipmentInfo.province},'%')
|
</if>
|
<if test="equipmentInfo.city!=null and equipmentInfo.city!=''">
|
and city like concat('%',#{equipmentInfo.city},'%')
|
</if>
|
<if test="equipmentInfo.district!=null and equipmentInfo.district!=''">
|
and district like concat('%',#{equipmentInfo.district},'%')
|
</if>
|
<if test="pid!=null and pid!=''">
|
and dept_id like concat('%',#{pid},'%')
|
</if>
|
order by create_time desc
|
</select>
|
|
<!--获取设备信息详情数据-->
|
<select id="getEquipmentInfoById" resultType="org.springblade.jfpt.equipmentinfo.vo.EquipmentInfoVo">
|
select id,name,type,dept_id deptId,serial_number serialNumber,remark,create_time createTime,
|
province,city,district,street
|
from
|
equipment_info
|
where id = #{id}
|
</select>
|
|
</mapper>
|