This commit is contained in:
xiaofajia 2024-12-17 16:09:49 +08:00
parent 8c68f0b7c0
commit 2fbbcb0daa
2 changed files with 19 additions and 5 deletions

View File

@ -62,4 +62,7 @@ public class InspectionEquInfo extends TenantBaseDO
@TableField(exist = false)
private Map<String,Object> params;
/** 设备类别(字典ins_equ_type) */
private String type;
}

View File

@ -8,13 +8,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectInspectionEquInfoList" parameterType="cn.iocoder.yudao.module.inspection.entity.InspectionEquInfo" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionEquInfo">
select * from inspection_equ_info
select * from inspection_equ_info
<where>
<if test="inspectionEquInfo.equName != null and inspectionEquInfo.equName != ''"> and equ_name like concat('%', #{inspectionEquInfo.equName}, '%')</if>
<if test="inspectionEquInfo.equModel != null and inspectionEquInfo.equModel != ''"> and equ_model like concat('%', #{inspectionEquInfo.equModel}, '%')</if>
<if test="inspectionEquInfo.equNumber != null and inspectionEquInfo.equNumber != ''"> and equ_number like concat('%', #{inspectionEquInfo.equNumber}, '%')</if>
<if test="inspectionEquInfo.equName != null and inspectionEquInfo.equName != ''">and equ_name like
concat('%', #{inspectionEquInfo.equName}, '%')
</if>
<if test="inspectionEquInfo.equModel != null and inspectionEquInfo.equModel != ''">and equ_model like
concat('%', #{inspectionEquInfo.equModel}, '%')
</if>
<if test="inspectionEquInfo.equNumber != null and inspectionEquInfo.equNumber != ''">and equ_number like
concat('%', #{inspectionEquInfo.equNumber}, '%')
</if>
<if test="inspectionEquInfo.params.beginNextCheckTime != null and inspectionEquInfo.params.beginNextCheckTime != '' and params.endNextCheckTime != null and params.endNextCheckTime != ''">
and next_check_time between #{inspectionEquInfo.params.beginNextCheckTime} and #{inspectionEquInfo.params.endNextCheckTime}</if>
and next_check_time between #{inspectionEquInfo.params.beginNextCheckTime} and
#{inspectionEquInfo.params.endNextCheckTime}
</if>
<if test="inspectionEquInfo.type != null and inspectionEquInfo.type != ''">
and `type` = #{inspectionEquInfo.type}
</if>
</where>
</select>