Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
f560bdab
Commit
f560bdab
authored
Oct 31, 2023
by
H2T
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码回滚
parent
de1301a7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
89 deletions
+89
-89
dbTemplate_check.xml
...rol-biz/src/main/resources/db/mapper/dbTemplate_check.xml
+1
-1
dbTemplate_input_item.xml
...iz/src/main/resources/db/mapper/dbTemplate_input_item.xml
+16
-16
dbTemplate_plan.xml
...trol-biz/src/main/resources/db/mapper/dbTemplate_plan.xml
+18
-18
dbTemplate_plan_task.xml
...biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+9
-9
pointMapper.xml
...zspatrol-biz/src/main/resources/db/mapper/pointMapper.xml
+28
-28
routeMapper.xml
...zspatrol-biz/src/main/resources/db/mapper/routeMapper.xml
+17
-17
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
f560bdab
...
@@ -572,7 +572,7 @@
...
@@ -572,7 +572,7 @@
<if
test=
"type!=null and type==3"
>
AND DATE_FORMAT(pt.check_date, '%Y') = left(#{checkTime}, 4)
</if>
<if
test=
"type!=null and type==3"
>
AND DATE_FORMAT(pt.check_date, '%Y') = left(#{checkTime}, 4)
</if>
<if
test=
"userId!=null and userId!=0"
>
AND FIND_IN_SET(#{userId}, pt.user_id)>0
</if>
<if
test=
"userId!=null and userId!=0"
>
AND FIND_IN_SET(#{userId}, pt.user_id)>0
</if>
<!-- <if test="orgCode!=null">AND org_code LIKE #{orgCode}</if>-->
<!-- <if test="orgCode!=null">AND org_code LIKE #{orgCode}</if>-->
<if
test=
"orgCode!=null"
>
AND pt.org_code LIKE concat(#{orgCode}
::text
,'%')
</if>
<if
test=
"orgCode!=null"
>
AND pt.org_code LIKE concat(#{orgCode},'%')
</if>
GROUP BY stime
GROUP BY stime
order by stime ASC
order by stime ASC
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
f560bdab
...
@@ -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('%',#{name}
::text
,'%')
</if>
<if
test=
"name!=null"
>
and a.name like concat('%',#{name},'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo}
::text
,'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo},'%')
</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('%',#{name}
::text
,'%')
</if>
<if
test=
"name!=null"
>
and a.name like concat('%',#{name},'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo}
::text
,'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo},'%')
</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}
::text
, '%')
and id like concat('%', #{id}, '%')
</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}
::text, '%') or item_no like concat('%', #{nameOrItemNo}::text
, '%'))
and (name like concat('%', #{nameOrItemNo}
, '%') or item_no like concat('%', #{nameOrItemNo}
, '%'))
</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}
::text
,'%')
and biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</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('%',#{name}
::text
,'%')
</if>
<if
test=
"name!=null"
>
and a.name like concat('%',#{name},'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo}
::text
,'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo},'%')
</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}
::text
,'%')
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</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('%',#{name}
::text
,'%')
</if>
<if
test=
"name!=null"
>
and a.name like concat('%',#{name},'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo}
::text
,'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo},'%')
</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}
::text
,'%')
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</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('%',#{name}
::text
,'%')
</if>
<if
test=
"name!=null"
>
and a.name like concat('%',#{name},'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo}
::text
,'%')
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat('%',#{itemNo},'%')
</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}
::text
,'%')
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</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
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
f560bdab
...
@@ -86,18 +86,18 @@
...
@@ -86,18 +86,18 @@
p_route b
p_route b
WHERE
WHERE
a.route_Id = b.id and a.is_delete = 0
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName}
::varchar
,'%')
</if>
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName},'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat('%',#{remark}
::varchar
,'%')
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat('%',#{remark},'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}
::varchar
,'-%')or a.org_code= #{orgCode})
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},'-%')or a.org_code= #{orgCode})
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}
::varchar
,a.user_id)
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat('%',#{bizOrgCode}
::varchar
,'%')
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat('%',#{bizOrgCode},'%')
</if>
</select>
</select>
<!--巡检计划查询 -->
<!--巡检计划查询 -->
<select
id=
"getPlanInfo"
resultType=
"java.util.HashMap"
>
<select
id=
"getPlanInfo"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
a.id,a.name , IFNULL(a.plan_begin
::varchar
,'') planBegin,a.status,
a.id,a.name , IFNULL(a.plan_begin,'') planBegin,a.status,
(
(
case a.plan_type
case a.plan_type
when 1 THEN '天'
when 1 THEN '天'
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
else '是'
else '是'
end
end
) as isFixedDateName,
) as isFixedDateName,
IFNULL(a.plan_end
::varchar
,'') planEnd,a.plan_end planEnd,a.plan_type planType,
IFNULL(a.plan_end,'') planEnd,a.plan_end planEnd,a.plan_type planType,
b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark,a.remark1,
b.name routeName,a.route_id routeId,a.is_fixed_date isFixedDate,a.remark,a.remark1,
b.dept_name bizOrgCode
b.dept_name bizOrgCode
FROM
FROM
...
@@ -120,13 +120,13 @@
...
@@ -120,13 +120,13 @@
p_route b
p_route b
WHERE
WHERE
a.route_Id = b.id and a.is_delete = 0
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName}
::varchar
,'%')
</if>
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName},'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat('%',#{remark}
::varchar
,'%')
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat('%',#{remark},'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}
::varchar
,'-%')or a.org_code= #{orgCode})
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},'-%')or a.org_code= #{orgCode})
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}
::varchar
,a.user_id)
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat('%',#{bizOrgCode}
::varchar
,'%')
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat('%',#{bizOrgCode},'%')
</if>
order by a.id desc
order by a.id desc
<choose>
<choose>
...
@@ -146,18 +146,18 @@
...
@@ -146,18 +146,18 @@
p_route b
p_route b
WHERE
WHERE
a.is_delete = 0 and a.route_Id = b.id
a.is_delete = 0 and a.route_Id = b.id
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName}
::varchar
,'%')
</if>
<if
test=
"planName!=null"
>
and a.name like concat('%',#{planName},'%')
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark like concat('%',#{remark}
::varchar
,'%')
</if>
<if
test=
"remark!=null"
>
and a.remark like concat('%',#{remark},'%')
</if>
<if
test=
"orgCode!=null"
>
and (a.org_code LIKE CONCAT(#{orgCode}
::varchar
, '-%' ) or a.org_code= #{orgCode} )
</if>
<if
test=
"orgCode!=null"
>
and (a.org_code LIKE CONCAT(#{orgCode}, '-%' ) or a.org_code= #{orgCode} )
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId}
::varchar
,a.user_id)
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat(#{bizOrgCode}
::varchar
,'%')
</if>
<if
test=
"bizOrgCode!=null"
>
and b.biz_org_code like concat(#{bizOrgCode},'%')
</if>
order by a.id
order by a.id
</select>
</select>
<select
id=
"queryPlanListByOrgCode"
resultType=
"Map"
>
<select
id=
"queryPlanListByOrgCode"
resultType=
"Map"
>
select p.id, p.name from p_plan p where p.is_delete = 0 and and b.biz_org_code like concat(#{loginOrgCode}
::varchar
,'%')
select p.id, p.name from p_plan p where p.is_delete = 0 and and b.biz_org_code like concat(#{loginOrgCode},'%')
</select>
</select>
<update
id=
"initUpdatePlanStatus"
>
<update
id=
"initUpdatePlanStatus"
>
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
f560bdab
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
LEFT JOIN p_plan_task a ON a.id = b.task_no
LEFT JOIN p_plan_task a ON a.id = b.task_no
LEFT JOIN p_point d ON d.id = b.point_id
LEFT JOIN p_point d ON d.id = b.point_id
<where>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo}
::varchar
,'%')
</if>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName}
::varchar
,'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
</if>
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_code like concat (#{bizOrgCode}
::varchar
,'%')
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_code like concat (#{bizOrgCode},'%')
</if>
<if
test=
"orgCode!=null"
>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}
::varchar
,'-%')or a.org_code= #{orgCode})
and (a.org_Code like concat (#{orgCode},'-%')or a.org_code= #{orgCode})
</if>
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.check_date = curdate()
and a.check_date = curdate()
...
@@ -78,8 +78,8 @@
...
@@ -78,8 +78,8 @@
<include
refid=
"planTaskInfoSql"
/>
<include
refid=
"planTaskInfoSql"
/>
<where>
<where>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo}
::varchar
,'%')
</if>
<if
test=
"pointNo!=null"
>
and d.point_no like concat('%',#{pointNo},'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName}
::varchar
,'%')
</if>
<if
test=
"pointName!=null"
>
and d.name like concat('%',#{pointName},'%')
</if>
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
<if
test=
"beginDate!=null and endDate!=null and endDate != '' and beginDate != ''"
>
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
and a.begin_Time
<![CDATA[>=]]>
#{beginDate} AND a.end_Time
<![CDATA[<=]]>
#{endDate}
</if>
</if>
...
@@ -92,9 +92,9 @@
...
@@ -92,9 +92,9 @@
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_code like concat (#{bizOrgCode}
::varchar
,'%')
</if>
<if
test=
"bizOrgCode!=null"
>
and a.org_code like concat (#{bizOrgCode},'%')
</if>
<if
test=
"orgCode!=null"
>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode}
::varchar
,'-%')or a.org_code= #{orgCode})
and (a.org_Code like concat (#{orgCode},'-%')or a.org_code= #{orgCode})
</if>
</if>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
<if
test=
"searchDay!=null and searchDay != '' and searchDay == 1"
>
and a.check_date = curdate()
and a.check_date = curdate()
...
@@ -285,7 +285,7 @@
...
@@ -285,7 +285,7 @@
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"checkDate != null and checkDate != '' "
>
and a.beginTime
<![CDATA[<=]]>
#{checkDate} and a.endTime
<![CDATA[>=]]>
#{checkDate}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"orgCode != null and orgCode !=''"
>
<if
test=
"orgCode != null and orgCode !=''"
>
and a.OrgCode LIKE CONCAT( #{orgCode}
::text
, '%' )
and a.OrgCode LIKE CONCAT( #{orgCode}, '%' )
</if>
</if>
<!-- <if test="departmentId != null and departmentId != 0 ">and a.userDept like concat('%', #{departmentId}, '%')</if>-->
<!-- <if test="departmentId != null and departmentId != 0 ">and a.userDept like concat('%', #{departmentId}, '%')</if>-->
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/pointMapper.xml
View file @
f560bdab
...
@@ -95,10 +95,10 @@
...
@@ -95,10 +95,10 @@
<where>
<where>
p.is_delete = 0
p.is_delete = 0
<if
test=
"pointParams.pointNo != null and pointParams.pointNo != ''"
>
<if
test=
"pointParams.pointNo != null and pointParams.pointNo != ''"
>
and p.point_no LIKE CONCAT ('%',#{pointParams.pointNo}
::varchar
,'%')
and p.point_no LIKE CONCAT ('%',#{pointParams.pointNo},'%')
</if>
</if>
<if
test=
"pointParams.name != null and pointParams.name != ''"
>
<if
test=
"pointParams.name != null and pointParams.name != ''"
>
and p.name LIKE CONCAT ('%',#{pointParams.name}
::varchar
,'%')
and p.name LIKE CONCAT ('%',#{pointParams.name},'%')
</if>
</if>
<if
test=
"pointParams.isFixed != null and pointParams.isFixed != ''"
>
<if
test=
"pointParams.isFixed != null and pointParams.isFixed != ''"
>
and p.is_fixed = #{pointParams.isFixed}
and p.is_fixed = #{pointParams.isFixed}
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
and p.catalog_id = #{pointParams.catalogId}
and p.catalog_id = #{pointParams.catalogId}
</if>
</if>
<if
test=
"pointParams.bizOrgCode != null and pointParams.bizOrgCode != ''"
>
<if
test=
"pointParams.bizOrgCode != null and pointParams.bizOrgCode != ''"
>
and p.biz_org_code LIKE CONCAT (#{pointParams.bizOrgCode}
::varchar
,'%')
and p.biz_org_code LIKE CONCAT (#{pointParams.bizOrgCode},'%')
</if>
</if>
</where>
</where>
ORDER BY p.id DESC
ORDER BY p.id DESC
...
@@ -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}
::text
,'%')
and point_no LIKE CONCAT ('%',#{pointNo},'%')
</if>
</if>
<if
test=
"name != null and name != ''"
>
<if
test=
"name != null and name != ''"
>
and name LIKE CONCAT ('%',#{name}
::text
,'%')
and name LIKE CONCAT ('%',#{name},'%')
</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}
::text
,'%')
and biz_org_code LIKE CONCAT (#{bizOrgCode} ,'%')
</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}
::text
,'%')
<if
test=
"name!=null"
>
AND ( p.point_no LIKE CONCAT('%', #{name},'%')
OR p.NAME LIKE CONCAT('%', #{name}
::text
,'%'))
</if>
OR p.NAME LIKE CONCAT('%', #{name},'%'))
</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}
::text
, '%')
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%')
</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}
::text
, '%')
AND CONCAT( ii. NAME, ',', p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%')
</if>
</if>
<if
test=
"queryType != null and queryType == 'inputItem' "
>
<if
test=
"queryType != null and queryType == 'inputItem' "
>
AND ii. NAME LIKE concat('%', #{query}
::text
, '%')
AND ii. NAME LIKE concat('%', #{query}, '%')
</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}
::text
, '%')
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%')
</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}
::text
,'%')
</if>
<if
test=
"orgCode!=null "
>
and p.biz_org_code LIKE CONCAT (#{orgCode} ,'%')
</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}
::text
,'%')
<if
test=
"name!=null"
>
AND ( p.point_no LIKE CONCAT('%', #{name},'%')
OR p.NAME LIKE CONCAT('%', #{name}
::text
,'%'))
</if>
OR p.NAME LIKE CONCAT('%', #{name},'%'))
</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}
::text
, '%')
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%')
</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}
::text
, '%')
AND CONCAT( ii. NAME, ',', p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%')
</if>
</if>
<if
test=
"queryType != null and queryType == 'inputItem' "
>
<if
test=
"queryType != null and queryType == 'inputItem' "
>
AND ii. NAME LIKE concat('%', #{query}
::text
, '%')
AND ii. NAME LIKE concat('%', #{query}, '%')
</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}
::text
, '%')
AND CONCAT(p. NAME, ',', p.point_no ) LIKE concat('%', #{query}, '%')
</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}
::text
,'%')
</if>
<if
test=
"orgCode!=null "
>
and p.biz_org_code LIKE CONCAT (#{orgCode} ,'%')
</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}
::text
, '-%' ) or org_code= #{orgCode} )
and (org_code LIKE CONCAT( #{orgCode}, '-%' ) 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}
::text
,'%' ))
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</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}
::text
,'%' ))
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</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}
::text
,'%' ))
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</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}
::text
,'%' ))
and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</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}
::text
, '-%' ) or org_code= #{orgCode} )
and (org_code LIKE CONCAT( #{orgCode}, '-%' ) 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}
::text
, '%' )
and biz_org_code LIKE CONCAT( #{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
...
@@ -1491,7 +1491,7 @@
...
@@ -1491,7 +1491,7 @@
WHERE
WHERE
pp.is_delete = 0
pp.is_delete = 0
<if
test=
"pointName != null and pointName != ''"
>
<if
test=
"pointName != null and pointName != ''"
>
AND pp.name like concat('%', #{pointName}
::varchar
, '%')
AND pp.name like concat('%', #{pointName}, '%')
</if>
</if>
<if
test=
"pointId != null"
>
<if
test=
"pointId != null"
>
AND pp.id != #{pointId}
AND pp.id != #{pointId}
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/resources/db/mapper/routeMapper.xml
View file @
f560bdab
...
@@ -88,10 +88,10 @@
...
@@ -88,10 +88,10 @@
LEFT JOIN s_user u ON r.user_id = u.id -->
LEFT JOIN s_user u ON r.user_id = u.id -->
WHERE
WHERE
r.is_delete = 0
r.is_delete = 0
<if
test=
"name!=null"
>
AND r.name LIKE CONCAT('%', #{name}
::text
, '%')
</if>
<if
test=
"name!=null"
>
AND r.name LIKE CONCAT('%', #{name}, '%')
</if>
<if
test=
"remark!=null"
>
AND r.remark LIKE CONCAT('%', #{remark}
::text
, '%')
</if>
<if
test=
"remark!=null"
>
AND r.remark LIKE CONCAT('%', #{remark}, '%')
</if>
<if
test=
"orgCode!=null"
>
AND r.org_Code = #{orgCode}
</if>
<if
test=
"orgCode!=null"
>
AND r.org_Code = #{orgCode}
</if>
<if
test=
"bizOrgCode!=null"
>
AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}
::text
, '%')
</if>
<if
test=
"bizOrgCode!=null"
>
AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%')
</if>
<!-- <if test="deptId!=null">AND r.dept_id = #{deptId}</if> -->
<!-- <if test="deptId!=null">AND r.dept_id = #{deptId}</if> -->
<choose>
<choose>
...
@@ -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}
::text
, '%')
</if>
<if
test=
"id!=null"
>
AND r.id LIKE CONCAT('%', #{id}, '%')
</if>
<if
test=
"name!=null"
>
AND r.name LIKE CONCAT('%', #{name}
::text
, '%')
</if>
<if
test=
"name!=null"
>
AND r.name LIKE CONCAT('%', #{name}, '%')
</if>
<if
test=
"remark!=null"
>
AND r.remark LIKE CONCAT('%', #{remark}
::text
, '%')
</if>
<if
test=
"remark!=null"
>
AND r.remark LIKE CONCAT('%', #{remark}, '%')
</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}
::text
, '%')
</if>
<if
test=
"bizOrgCode!=null"
>
AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%')
</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}
::text
, '%')
AND find_in_set(#{userId}, ppl.user_id) > 0 and r.biz_org_code LIKE CONCAT( #{orgCode}, '%')
</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}
::text
, '%')
AND r.biz_org_code LIKE CONCAT( #{orgCode}, '%')
</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}
::text
, '%')
</if>
<if
test=
"pointNo != null and pointNo != ''"
>
and p.point_no like CONCAT('%', #{pointNo}, '%')
</if>
<if
test=
"name != null and name != ''"
>
and p.name like CONCAT('%', #{name}
::text
, '%')
</if>
<if
test=
"name != null and name != ''"
>
and p.name like CONCAT('%', #{name}, '%')
</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}
::text
, '%')
</if>
<if
test=
"pointNo != null and pointNo != ''"
>
and p.point_no like CONCAT('%', #{pointNo}, '%')
</if>
<if
test=
"name != null and name != ''"
>
and p.name like CONCAT('%', #{name}
::text
, '%')
</if>
<if
test=
"name != null and name != ''"
>
and p.name like CONCAT('%', #{name}, '%')
</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>
...
@@ -444,8 +444,8 @@
...
@@ -444,8 +444,8 @@
and ppc.id = #{classifyId}
and ppc.id = #{classifyId}
</if>
</if>
<if
test=
"inputName!=null and inputName !=''"
>
<if
test=
"inputName!=null and inputName !=''"
>
and (pii.name like CONCAT('%', #{inputName}
::varchar
, '%')
and (pii.name like CONCAT('%', #{inputName}, '%')
or pii.item_no like CONCAT('%', #{inputName}
::varchar
, '%'))
or pii.item_no like CONCAT('%', #{inputName}, '%'))
</if>
</if>
<if
test=
"isBound!=null and isBound !=''"
>
<if
test=
"isBound!=null and isBound !=''"
>
and temp.routePointItemId >0
and temp.routePointItemId >0
...
@@ -455,7 +455,7 @@
...
@@ -455,7 +455,7 @@
</select>
</select>
<select
id=
"queryRoutesByOrgCode"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Route"
>
<select
id=
"queryRoutesByOrgCode"
resultType=
"com.yeejoin.amos.patrol.dao.entity.Route"
>
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}
::varchar
, '%')
SELECT * FROM p_route r where r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%')
</select>
</select>
<!--如果查询的点下没有检查项 返回一个标识 -->
<!--如果查询的点下没有检查项 返回一个标识 -->
...
@@ -468,7 +468,7 @@
...
@@ -468,7 +468,7 @@
left join p_route_point prp on prp.route_id = r.id
left join p_route_point prp on prp.route_id = r.id
left join p_route_point_item prpi on prpi.route_point_id = prp.id
left join p_route_point_item prpi on prpi.route_point_id = prp.id
WHERE
WHERE
r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}
::varchar
, '%')
r.is_delete = 0 and r.biz_org_code like CONCAT( #{orgCode}, '%')
GROUP BY r.id
GROUP BY r.id
order by r.create_date DESC
order by r.create_date DESC
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment