关键字查询
This commit is contained in:
parent
66f5e42806
commit
5bc667038d
|
|
@ -49,6 +49,10 @@ public class MachinesVo {
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
private String creater;
|
private String creater;
|
||||||
|
/**
|
||||||
|
* 关键字
|
||||||
|
*/
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,16 +28,14 @@
|
||||||
left join mm_type mt2 on mt.PARENT_ID=mt2.id
|
left join mm_type mt2 on mt.PARENT_ID=mt2.id
|
||||||
left join mm_type mt3 on mt2.PARENT_ID=mt3.id
|
left join mm_type mt3 on mt2.PARENT_ID=mt3.id
|
||||||
where mm.BATCH_STATUS=7
|
where mm.BATCH_STATUS=7
|
||||||
|
<if test="keyWord!=null and keyWord!=''">
|
||||||
|
and (
|
||||||
|
mt2.NAME like concat('%',#{name},'%') or
|
||||||
|
mt3.NAME like concat('%',#{type},'%') or
|
||||||
|
mt.NAME like concat('%',#{model},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="name!=null and name!=''">
|
|
||||||
and mt2.NAME like concat('%',#{name},'%')
|
|
||||||
</if>
|
|
||||||
<if test="type!=null and type!=''">
|
|
||||||
and mt3.NAME like concat('%',#{type},'%')
|
|
||||||
</if>
|
|
||||||
<if test="model!=null and model!=''">
|
|
||||||
and mt.NAME like concat('%',#{model},'%')
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getWfRecordList" resultType="com.bonus.gzgqj.business.app.entity.MachinesVo">
|
<select id="getWfRecordList" resultType="com.bonus.gzgqj.business.app.entity.MachinesVo">
|
||||||
select wir.sup_id ,wat.AGREEMENT_ID,
|
select wir.sup_id ,wat.AGREEMENT_ID,
|
||||||
|
|
@ -61,15 +59,13 @@
|
||||||
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
||||||
left join pa_type pt2 on pt1.parent_id=pt2.id and pt2.`level`=1 and pt2.is_active=1
|
left join pa_type pt2 on pt1.parent_id=pt2.id and pt2.`level`=1 and pt2.is_active=1
|
||||||
WHERE pt.is_active=1 and pt.`level`=3
|
WHERE pt.is_active=1 and pt.`level`=3
|
||||||
<if test="type!=null and type !=''">
|
<if test="keyWord!=null and keyWord!=''">
|
||||||
and pt2.name like concat('%',#{type},'%')
|
and (
|
||||||
</if>
|
pt2.name like concat('%',#{type},'%') or
|
||||||
<if test="name!=null and name !=''">
|
pt1.name like concat('%',#{name},'%') or
|
||||||
and pt1.name like concat('%',#{name},'%')
|
pt.name like concat('%',#{model},'%')
|
||||||
</if>
|
)
|
||||||
<if test="model!=null and model !=''">
|
</if>
|
||||||
and pt.name like concat('%',#{model},'%')
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getSqList" resultType="java.lang.Integer">
|
<select id="getSqList" resultType="java.lang.Integer">
|
||||||
select count(1)
|
select count(1)
|
||||||
|
|
@ -90,10 +86,10 @@
|
||||||
<where>
|
<where>
|
||||||
<if test="keyWord!=null and keyWord!=''">
|
<if test="keyWord!=null and keyWord!=''">
|
||||||
and (
|
and (
|
||||||
tpa.code like('%',#{keyWord},'%') or
|
tpa.code like('%',#{keyWord},'%') or
|
||||||
tpa.user_name like('%',#{keyWord},'%') or
|
tpa.user_name like('%',#{keyWord},'%') or
|
||||||
tpa.remark like('%',#{keyWord},'%') or
|
tpa.remark like('%',#{keyWord},'%') or
|
||||||
tpa.pro_name like('%',#{keyWord},'%')
|
tpa.pro_name like('%',#{keyWord},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue