Commit a2f9b326 authored by H2T's avatar H2T

查询bug修改

parent 84c9229b
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
FROM FROM
p_input_item a p_input_item a
where a.is_delete = '0' and a.input_type!='1' where a.is_delete = '0' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if> <if test="name!=null"> and a.name like concat('%',#{name}::text,'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if> <if test="itemNo!=null"> and a.item_no like concat('%',#{itemNo}::text,'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<!-- <if test="level!=null"> and a.level = #{level} </if> --> <!-- <if test="level!=null"> and a.level = #{level} </if> -->
...@@ -108,8 +108,8 @@ ...@@ -108,8 +108,8 @@
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0' where a.is_delete = '0'
and a.input_type!='1' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if> <if test="name!=null"> and a.name like concat('%',#{name}::text,'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if> <if test="itemNo!=null"> and a.item_no like concat('%',#{itemNo}::text,'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<!-- <if test="level!=null"> and a.level = #{level} </if> --> <!-- <if test="level!=null"> and a.level = #{level} </if> -->
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
SELECT * FROM p_input_item SELECT * FROM p_input_item
where is_delete = '0' and input_type = 0 where is_delete = '0' and input_type = 0
<if test="id!=null and id !='' "> <if test="id!=null and id !='' ">
and id like concat('%', #{id}, '%') and id like concat('%', #{id}::text, '%')
</if> </if>
<if test="orgCode!=null and orgCode !='' "> <if test="orgCode!=null and orgCode !='' ">
and org_Code = #{orgCode} and org_Code = #{orgCode}
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
and input_classify = #{inputClassify} and input_classify = #{inputClassify}
</if> </if>
<if test="nameOrItemNo!=null and nameOrItemNo !='' "> <if test="nameOrItemNo!=null and nameOrItemNo !='' ">
and (name like concat('%', #{nameOrItemNo}, '%') or item_no like concat('%', #{nameOrItemNo}, '%')) and (name like concat('%', #{nameOrItemNo}::text, '%') or item_no like concat('%', #{nameOrItemNo}::text, '%'))
</if> </if>
<if test="equipmentType!=null and equipmentType.size()>0"> <if test="equipmentType!=null and equipmentType.size()>0">
and equipment_type in and equipment_type in
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
and custom_type is not null and custom_type is not null
</if> </if>
<if test="bizOrgCode!=null and bizOrgCode !=''"> <if test="bizOrgCode!=null and bizOrgCode !=''">
and biz_org_code LIKE CONCAT (#{bizOrgCode},'%') and biz_org_code LIKE CONCAT (#{bizOrgCode}::text,'%')
</if> </if>
ORDER BY create_date DESC ORDER BY create_date DESC
</select> </select>
...@@ -241,8 +241,8 @@ ...@@ -241,8 +241,8 @@
FROM FROM
p_input_item a p_input_item a
where a.is_delete = '0' and a.input_type!='1' where a.is_delete = '0' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if> <if test="name!=null"> and a.name like concat('%',#{name}::text,'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if> <if test="itemNo!=null"> and a.item_no like concat('%',#{itemNo}::text,'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach> and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach>
</if> </if>
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
and a.biz_org_code LIKE CONCAT (#{bizOrgCode} ,'%') and a.biz_org_code LIKE CONCAT (#{bizOrgCode}::text,'%')
</if> </if>
<if test="treeId != null and treeId != '' and treeId == '-1'"> <if test="treeId != null and treeId != '' and treeId == '-1'">
and a.facilities_type is not null and a.facilities_type is not null
...@@ -322,8 +322,8 @@ ...@@ -322,8 +322,8 @@
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0' where a.is_delete = '0'
and a.input_type!='1' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if> <if test="name!=null"> and a.name like concat('%',#{name}::text,'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if> <if test="itemNo!=null"> and a.item_no like concat('%',#{itemNo}::text,'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
...@@ -331,7 +331,7 @@ ...@@ -331,7 +331,7 @@
and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach> and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach>
</if> </if>
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%') and a.biz_org_code LIKE CONCAT (#{bizOrgCode}::text,'%')
</if> </if>
<if test="treeId != null and treeId != '' and treeId == '-1'"> <if test="treeId != null and treeId != '' and treeId == '-1'">
and a.facilities_type is not null and a.facilities_type is not null
...@@ -421,8 +421,8 @@ ...@@ -421,8 +421,8 @@
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0' where a.is_delete = '0'
and a.input_type!='1' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if> <if test="name!=null"> and a.name like concat('%',#{name}::text,'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if> <if test="itemNo!=null"> and a.item_no like concat('%',#{itemNo}::text,'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach> and a.catalog_id in <foreach collection="catalogIds" item="catalogId" index="index" open="(" separator="," close=")" >#{catalogId}</foreach>
</if> </if>
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%') and a.biz_org_code LIKE CONCAT (#{bizOrgCode}::text,'%')
</if> </if>
<if test="treeId != null and treeId != '' and treeId == '-1'"> <if test="treeId != null and treeId != '' and treeId == '-1'">
and a.facilities_type is not null and a.facilities_type is not null
......
...@@ -121,10 +121,10 @@ ...@@ -121,10 +121,10 @@
<where> <where>
is_delete = 0 is_delete = 0
<if test="pointNo != null and pointNo != ''"> <if test="pointNo != null and pointNo != ''">
and point_no LIKE CONCAT ('%',#{pointNo},'%') and point_no LIKE CONCAT ('%',#{pointNo}::text,'%')
</if> </if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and name LIKE CONCAT ('%',#{name},'%') and name LIKE CONCAT ('%',#{name}::text,'%')
</if> </if>
<if test="isFixed != null and isFixed != ''"> <if test="isFixed != null and isFixed != ''">
and is_fixed = #{isFixed} and is_fixed = #{isFixed}
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</if> </if>
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
and biz_org_code LIKE CONCAT (#{bizOrgCode} ,'%') and biz_org_code LIKE CONCAT (#{bizOrgCode}::text ,'%')
</if> </if>
</where> </where>
</select> </select>
...@@ -203,12 +203,12 @@ ...@@ -203,12 +203,12 @@
)</if> )</if>
AND p.is_delete = 0 AND p.is_delete = 0
and ( select COUNT(p_point_inputitem.id) fROM p_point_inputitem where p_point_inputitem.point_id =p.id) >0 and ( select COUNT(p_point_inputitem.id) fROM p_point_inputitem where p_point_inputitem.point_id =p.id) >0
<if test="name!=null"> AND ( p.point_no LIKE CONCAT('%', #{name},'%') <if test="name!=null"> AND ( p.point_no LIKE CONCAT('%', #{name}::text,'%')
OR p.NAME LIKE CONCAT('%', #{name},'%')) </if> OR p.NAME LIKE CONCAT('%', #{name}::text,'%')) </if>
<if test="query != null and query != ''"> <if test="query != null and query != ''">
<choose> <choose>
<when test="queryType != null and (queryType == 'point' || queryType == 'all') "> <when test="queryType != null and (queryType == 'point' || queryType == 'all') ">
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%') AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}::text, '%')
</when> </when>
<otherwise> <otherwise>
AND EXISTS ( AND EXISTS (
...@@ -220,20 +220,20 @@ ...@@ -220,20 +220,20 @@
WHERE WHERE
p.id = pi.point_id p.id = pi.point_id
<if test="queryType == null or queryType == '' or queryType == 'all' "> <if test="queryType == null or queryType == '' or queryType == 'all' ">
AND CONCAT( ii. NAME, ',', p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%') AND CONCAT( ii. NAME, ',', p. NAME, ',', p.point_no ) LIKE concat('%', #{query}::text, '%')
</if> </if>
<if test="queryType != null and queryType == 'inputItem' "> <if test="queryType != null and queryType == 'inputItem' ">
AND ii. NAME LIKE concat('%', #{query}, '%') AND ii. NAME LIKE concat('%', #{query}::text, '%')
</if> </if>
<if test="queryType != null and queryType == 'point' "> <if test="queryType != null and queryType == 'point' ">
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%') AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}::text, '%')
</if> </if>
) )
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<!-- <if test="orgCode!=null "> and p.org_Code= #{orgCode} </if>--> <!-- <if test="orgCode!=null "> and p.org_Code= #{orgCode} </if>-->
<if test="orgCode!=null "> and p.biz_org_code LIKE CONCAT (#{orgCode} ,'%') </if> <if test="orgCode!=null "> and p.biz_org_code LIKE CONCAT (#{orgCode}::text ,'%') </if>
</where> </where>
...@@ -261,14 +261,14 @@ ...@@ -261,14 +261,14 @@
AND p.is_delete = 0 AND p.is_delete = 0
and ( select COUNT(p_point_inputitem.id) fROM p_point_inputitem where p_point_inputitem.point_id =p.id) >0 and ( select COUNT(p_point_inputitem.id) fROM p_point_inputitem where p_point_inputitem.point_id =p.id) >0
<if test="name!=null"> AND ( p.point_no LIKE CONCAT('%', #{name},'%') <if test="name!=null"> AND ( p.point_no LIKE CONCAT('%', #{name}::text,'%')
OR p.NAME LIKE CONCAT('%', #{name},'%')) </if> OR p.NAME LIKE CONCAT('%', #{name}::text,'%')) </if>
<if test="query != null and query != ''"> <if test="query != null and query != ''">
<choose> <choose>
<when test="queryType != null and (queryType == 'point'|| queryType == 'all')"> <when test="queryType != null and (queryType == 'point'|| queryType == 'all')">
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%') AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}::text, '%')
</when> </when>
<otherwise> <otherwise>
AND EXISTS ( AND EXISTS (
...@@ -280,13 +280,13 @@ ...@@ -280,13 +280,13 @@
WHERE WHERE
p.id = pi.point_id p.id = pi.point_id
<if test="queryType == null or queryType == '' or queryType == 'all' "> <if test="queryType == null or queryType == '' or queryType == 'all' ">
AND CONCAT( ii. NAME, ',', p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%') AND CONCAT( ii. NAME, ',', p. NAME, ',', p.point_no ) LIKE concat('%', #{query}::text, '%')
</if> </if>
<if test="queryType != null and queryType == 'inputItem' "> <if test="queryType != null and queryType == 'inputItem' ">
AND ii. NAME LIKE concat('%', #{query}, '%') AND ii. NAME LIKE concat('%', #{query}::text, '%')
</if> </if>
<if test="queryType != null and queryType == 'point' "> <if test="queryType != null and queryType == 'point' ">
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%') AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}::text, '%')
</if> </if>
) )
</otherwise> </otherwise>
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
</if> </if>
<!-- <if test="orgCode!=null "> and p.org_Code= #{orgCode} </if>--> <!-- <if test="orgCode!=null "> and p.org_Code= #{orgCode} </if>-->
<if test="orgCode!=null "> and p.biz_org_code LIKE CONCAT (#{orgCode} ,'%') </if> <if test="orgCode!=null "> and p.biz_org_code LIKE CONCAT (#{orgCode}::text ,'%') </if>
</where> </where>
limit #{offset},#{pageSize}; limit #{offset},#{pageSize};
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
(select status ,id FROM p_point (select status ,id FROM p_point
where is_delete = 0 where is_delete = 0
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT( #{orgCode}, '-%' ) or org_code= #{orgCode} ) and (org_code LIKE CONCAT( #{orgCode}::text, '-%' ) or org_code= #{orgCode} )
</if> </if>
) vp ) vp
) tt group by tt.RealTimeStatus,tt.status order by status ) tt group by tt.RealTimeStatus,tt.status order by status
...@@ -503,7 +503,7 @@ ...@@ -503,7 +503,7 @@
WHERE WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' ) check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode}::text,'%' ))
</if> </if>
AND is_ok = 1 AND is_ok = 1
) AS over_num, ) AS over_num,
...@@ -515,7 +515,7 @@ ...@@ -515,7 +515,7 @@
WHERE WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' ) check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode}::text,'%' ))
</if> </if>
AND is_ok = 2 AND is_ok = 2
) AS unfinish_num, ) AS unfinish_num,
...@@ -527,7 +527,7 @@ ...@@ -527,7 +527,7 @@
WHERE WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' ) check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode}::text,'%' ))
</if> </if>
AND is_ok = 3 AND is_ok = 3
) AS miss_num, ) AS miss_num,
...@@ -539,7 +539,7 @@ ...@@ -539,7 +539,7 @@
WHERE WHERE
( p_plan_task.check_date LIKE concat( curdate( ), '%' ) ) ( p_plan_task.check_date LIKE concat( curdate( ), '%' ) )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode}::text,'%' ))
</if> </if>
) AS today_num ) AS today_num
</select> </select>
...@@ -559,7 +559,7 @@ ...@@ -559,7 +559,7 @@
(select DISTINCT is_ok as realTimeStatus ,point_id FROM p_check (select DISTINCT is_ok as realTimeStatus ,point_id FROM p_check
<where> <where>
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT( #{orgCode}, '-%' ) or org_code= #{orgCode} ) and (org_code LIKE CONCAT( #{orgCode}::text, '-%' ) or org_code= #{orgCode} )
</if> </if>
</where> </where>
) vp ) vp
...@@ -585,7 +585,7 @@ ...@@ -585,7 +585,7 @@
(select status ,id FROM p_point (select status ,id FROM p_point
where is_delete = 0 where is_delete = 0
<if test="orgCode!=null"> <if test="orgCode!=null">
and biz_org_code LIKE CONCAT( #{orgCode}, '%' ) and biz_org_code LIKE CONCAT( #{orgCode}::text, '%' )
</if> </if>
) vp ) vp
) tt group by tt.RealTimeStatus,tt.status order by status ) tt group by tt.RealTimeStatus,tt.status order by status
......
...@@ -117,13 +117,13 @@ ...@@ -117,13 +117,13 @@
p_route r p_route r
WHERE WHERE
r.is_delete = 0 r.is_delete = 0
<if test="id!=null">AND r.id LIKE CONCAT('%', #{id}, '%')</if> <if test="id!=null">AND r.id LIKE CONCAT('%', #{id}::text, '%')</if>
<if test="name!=null">AND r.name LIKE CONCAT('%', #{name}, '%')</if> <if test="name!=null">AND r.name LIKE CONCAT('%', #{name}::text, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if> <if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}::text, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if> <if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="enterpriseType!=null">AND r.enterprise_type = #{enterpriseType}</if> <if test="enterpriseType!=null">AND r.enterprise_type = #{enterpriseType}</if>
<if test="equipType!=null">AND r.equip_type = #{equipType}</if> <if test="equipType!=null">AND r.equip_type = #{equipType}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if> <if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}::text, '%') </if>
<choose> <choose>
<when test="deptId > 0 " > AND r.dept_id = #{deptId}</when> <when test="deptId > 0 " > AND r.dept_id = #{deptId}</when>
<when test="deptId == -1 " > AND r.dept_id in(0,-1)</when> <when test="deptId == -1 " > AND r.dept_id in(0,-1)</when>
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
LEFT JOIN p_route r ON r.id = ppl.route_id LEFT JOIN p_route r ON r.id = ppl.route_id
WHERE WHERE
r.is_delete = 0 r.is_delete = 0
AND find_in_set(#{userId}, ppl.user_id) > 0 and r.biz_org_code LIKE CONCAT( #{orgCode}, '%') AND find_in_set(#{userId}, ppl.user_id) > 0 and r.biz_org_code LIKE CONCAT( #{orgCode}::text, '%')
</if> </if>
<if test="(orgCode != null and orgCode != '')"> <if test="(orgCode != null and orgCode != '')">
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
WHERE WHERE
r.is_delete = 0 r.is_delete = 0
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
AND r.biz_org_code LIKE CONCAT( #{orgCode}, '%') AND r.biz_org_code LIKE CONCAT( #{orgCode}::text, '%')
</if> </if>
</if>) temp </if>) temp
...@@ -266,8 +266,8 @@ ...@@ -266,8 +266,8 @@
where p.is_delete = 0 where p.is_delete = 0
AND rp.route_id = #{routeId} AND rp.route_id = #{routeId}
AND p.org_code = #{orgCode} AND p.org_code = #{orgCode}
<if test="pointNo != null and pointNo != ''">and p.point_no like CONCAT('%', #{pointNo}, '%')</if> <if test="pointNo != null and pointNo != ''">and p.point_no like CONCAT('%', #{pointNo}::text, '%')</if>
<if test="name != null and name != ''">and p.name like CONCAT('%', #{name}, '%')</if> <if test="name != null and name != ''">and p.name like CONCAT('%', #{name}::text, '%')</if>
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when> <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
...@@ -310,8 +310,8 @@ ...@@ -310,8 +310,8 @@
AND rp.route_id = #{routeId} AND rp.route_id = #{routeId}
AND p.org_code = #{orgCode} AND p.org_code = #{orgCode}
order by rp.order_no order by rp.order_no
<if test="pointNo != null and pointNo != ''">and p.point_no like CONCAT('%', #{pointNo}, '%')</if> <if test="pointNo != null and pointNo != ''">and p.point_no like CONCAT('%', #{pointNo}::text, '%')</if>
<if test="name != null and name != ''">and p.name like CONCAT('%', #{name}, '%')</if> <if test="name != null and name != ''">and p.name like CONCAT('%', #{name}::text, '%')</if>
<choose> <choose>
<when test="pageSize==-1"></when> <when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when> <when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment