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
96d3415b
Commit
96d3415b
authored
Aug 18, 2022
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
3085c425
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
42 deletions
+71
-42
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+32
-1
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+39
-41
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
96d3415b
...
@@ -470,6 +470,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -470,6 +470,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
statisticsByStation
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
statisticsByStation
(
bizOrgCode
));
}
}
...
@@ -485,6 +488,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -485,6 +488,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmEquipment
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmEquipment
(
bizOrgCode
));
}
}
@PersonIdentify
@PersonIdentify
...
@@ -500,6 +506,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -500,6 +506,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmMessage
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmMessage
(
bizOrgCode
));
}
}
@PersonIdentify
@PersonIdentify
...
@@ -515,6 +524,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -515,6 +524,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmUnEliminateEquipment
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmUnEliminateEquipment
(
bizOrgCode
));
}
}
@PersonIdentify
@PersonIdentify
...
@@ -530,6 +542,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -530,6 +542,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmUnEliminateMessage
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
todayAlarmUnEliminateMessage
(
bizOrgCode
));
}
}
...
@@ -546,6 +561,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -546,6 +561,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
monthAlarm
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
monthAlarm
(
bizOrgCode
));
}
}
@PersonIdentify
@PersonIdentify
...
@@ -561,6 +579,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -561,6 +579,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
yearsAlarm
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
yearsAlarm
(
bizOrgCode
));
}
}
...
@@ -579,8 +600,15 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -579,8 +600,15 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
alarmList
(
page
,
bizOrgCode
));
Page
<
Map
<
String
,
Object
>>
mapPage
=
iFireFightingSystemService
.
alarmList
(
page
,
bizOrgCode
);
for
(
Map
<
String
,
Object
>
record
:
mapPage
.
getRecords
())
{
record
.
put
(
"createDate"
,
ObjectUtils
.
isEmpty
(
record
.
get
(
"createDate"
))
?
""
:
String
.
valueOf
(
record
.
get
(
"createDate"
)).
replaceAll
(
"T"
,
" "
));
}
return
CommonResponseUtil
.
success
(
mapPage
);
}
}
@PersonIdentify
@PersonIdentify
...
@@ -598,6 +626,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -598,6 +626,9 @@ public class ConfigureController extends AbstractBaseController {
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
}
}
}
}
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
return
CommonResponseUtil
.
success
(
null
);
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
equipList
(
page
,
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
equipList
(
page
,
bizOrgCode
));
}
}
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
96d3415b
...
@@ -2187,7 +2187,7 @@
...
@@ -2187,7 +2187,7 @@
LEFT JOIN wl_equipment_category ec ON ec.id = fs.system_type
LEFT JOIN wl_equipment_category ec ON ec.id = fs.system_type
<where>
<where>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
and fs.biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
and fs.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
ORDER BY fs.sort
ORDER BY fs.sort
...
@@ -2204,7 +2204,7 @@
...
@@ -2204,7 +2204,7 @@
<where>
<where>
log.`status` = 1
log.`status` = 1
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
and es.biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
and es.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
<if
test=
"systemCode!=null and systemCode!=''"
>
<if
test=
"systemCode!=null and systemCode!=''"
>
and FIND_IN_SET( #{systemCode,jdbcType=VARCHAR}, log.system_codes )
and FIND_IN_SET( #{systemCode,jdbcType=VARCHAR}, log.system_codes )
...
@@ -2220,7 +2220,7 @@
...
@@ -2220,7 +2220,7 @@
<where>
<where>
log.`confirm_date` IS NULL
log.`confirm_date` IS NULL
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
and es.biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
and es.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
) AS unConfirmInfoNum
) AS unConfirmInfoNum
...
@@ -2234,7 +2234,7 @@
...
@@ -2234,7 +2234,7 @@
FROM
FROM
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 117
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 117
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
AND biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
) `cou`
</if>
) `cou`
</select>
</select>
...
@@ -2246,7 +2246,7 @@
...
@@ -2246,7 +2246,7 @@
FROM
FROM
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 116
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 116
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
AND biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
) `cou`
</if>
) `cou`
</select>
</select>
...
@@ -2285,7 +2285,7 @@
...
@@ -2285,7 +2285,7 @@
<where>
<where>
1=1
1=1
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND wc.biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
AND wc.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
) a
) a
...
@@ -2324,7 +2324,7 @@
...
@@ -2324,7 +2324,7 @@
<where>
<where>
1=1
1=1
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND wc.biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
AND wc.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
group by `wc`.`id`
group by `wc`.`id`
...
@@ -2381,7 +2381,7 @@
...
@@ -2381,7 +2381,7 @@
AND r.is_delete = 1
AND r.is_delete = 1
AND ou.`code` IS NOT NULL
AND ou.`code` IS NOT NULL
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
AND r.biz_org_code
= #{bizOrgCode,jdbcType=VARCHAR}
AND r.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
<if
test=
"systemCode!=null and systemCode!=''"
>
<if
test=
"systemCode!=null and systemCode!=''"
>
AND fs.code = #{systemCode,jdbcType=VARCHAR}
AND fs.code = #{systemCode,jdbcType=VARCHAR}
...
@@ -2432,7 +2432,7 @@
...
@@ -2432,7 +2432,7 @@
and `nz`.code = #{systemCode}
and `nz`.code = #{systemCode}
</if>
</if>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
and `nz`.biz_org_code
= #{bizOrgCode}
and `nz`.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
</select>
</select>
...
@@ -2467,7 +2467,7 @@
...
@@ -2467,7 +2467,7 @@
curdate() - INTERVAL 30 DAY
curdate() - INTERVAL 30 DAY
)
<
= cast( `rd`.`report_date` AS date ))
)
<
= cast( `rd`.`report_date` AS date ))
AND ( `fs`.`code` = #{systemCode} )
AND ( `fs`.`code` = #{systemCode} )
AND ( `fs`.`biz_org_code`
= #{bizOrgCode}
)
AND ( `fs`.`biz_org_code`
like concat(#{bizOrgCode}, '%')
)
AND ((
AND ((
`rd`.`index_type` LIKE '%Fault'
`rd`.`index_type` LIKE '%Fault'
)
)
...
@@ -2492,7 +2492,7 @@
...
@@ -2492,7 +2492,7 @@
f_fire_fighting_system
f_fire_fighting_system
where
where
code = #{systemCode} and
code = #{systemCode} and
biz_org_code
= #{bizOrgCode}
biz_org_code
like concat(#{bizOrgCode}, '%')
</select>
</select>
<select
id=
"equipmentState"
resultType=
"java.util.Map"
>
<select
id=
"equipmentState"
resultType=
"java.util.Map"
>
...
@@ -2540,7 +2540,7 @@
...
@@ -2540,7 +2540,7 @@
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
WHERE
WHERE
ed.`code` LIKE '92010800%'
ed.`code` LIKE '92010800%'
AND biz_org_code
= #{bizOrgCode}
AND biz_org_code
like concat(#{bizOrgCode}, '%')
</select>
</select>
<select
id=
"queryPressureNowStateBySpecificId"
resultType=
"java.util.Map"
>
<select
id=
"queryPressureNowStateBySpecificId"
resultType=
"java.util.Map"
>
...
@@ -2569,7 +2569,7 @@
...
@@ -2569,7 +2569,7 @@
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
WHERE
WHERE
ed.`code` LIKE '92010800%'
ed.`code` LIKE '92010800%'
AND biz_org_code
= #{bizOrgCode}
AND biz_org_code
like concat(#{bizOrgCode}, '%')
</select>
</select>
<select
id=
"exportEquipmentList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.EquipmentExportVO"
>
<select
id=
"exportEquipmentList"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.EquipmentExportVO"
>
SELECT
SELECT
...
@@ -2650,7 +2650,7 @@
...
@@ -2650,7 +2650,7 @@
</if>
</if>
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
and wesp.biz_org_code
= #{dto.bizOrgCode}
and wesp.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
...
@@ -2897,7 +2897,7 @@
...
@@ -2897,7 +2897,7 @@
SELECT COUNT(1) FROM wl_video v
SELECT COUNT(1) FROM wl_video v
<where>
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
v.biz_org_code
= #{bizOrgCode}
v.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
) AS videoNum,
) AS videoNum,
...
@@ -2905,7 +2905,7 @@
...
@@ -2905,7 +2905,7 @@
SELECT COUNT(1) FROM wl_equipment_specific ws
SELECT COUNT(1) FROM wl_equipment_specific ws
<where>
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
ws.biz_org_code
= #{bizOrgCode}
ws.biz_org_code
like concat(#{bizOrgCode}, '%')
</if>
</if>
</where>
</where>
)AS equipNum
)AS equipNum
...
@@ -2959,7 +2959,7 @@
...
@@ -2959,7 +2959,7 @@
( SELECT count( DISTINCT `wl_equipment_specific_alarm_log`.`equipment_specific_id` ) FROM `wl_equipment_specific_alarm_log`
( SELECT count( DISTINCT `wl_equipment_specific_alarm_log`.`equipment_specific_id` ) FROM `wl_equipment_specific_alarm_log`
WHERE create_date LIKE concat( curdate( ), '%' )
WHERE create_date LIKE concat( curdate( ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentDateNum`,
) AS `currentDateNum`,
(
(
...
@@ -2971,7 +2971,7 @@
...
@@ -2971,7 +2971,7 @@
create_date LIKE concat( cast( ( curdate( ) + INTERVAL - ( 1 ) DAY ) AS date ), '%' )
create_date LIKE concat( cast( ( curdate( ) + INTERVAL - ( 1 ) DAY ) AS date ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
...
@@ -2984,7 +2984,7 @@
...
@@ -2984,7 +2984,7 @@
WHERE
WHERE
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentMonthNum`,
) AS `currentMonthNum`,
(
(
...
@@ -2996,7 +2996,7 @@
...
@@ -2996,7 +2996,7 @@
`create_date` LIKE concat( date_format( cast( ( curdate( ) + INTERVAL - ( 1 ) MONTH ) AS date ), '%Y-%m' ), '%' )
`create_date` LIKE concat( date_format( cast( ( curdate( ) + INTERVAL - ( 1 ) MONTH ) AS date ), '%Y-%m' ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `lastMonthNum`
) AS `lastMonthNum`
...
@@ -3053,7 +3053,7 @@
...
@@ -3053,7 +3053,7 @@
( SELECT count( `wl_equipment_specific_alarm_log`.`equipment_specific_id` ) FROM `wl_equipment_specific_alarm_log` WHERE
( SELECT count( `wl_equipment_specific_alarm_log`.`equipment_specific_id` ) FROM `wl_equipment_specific_alarm_log` WHERE
create_date LIKE concat( curdate( ), '%' )
create_date LIKE concat( curdate( ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentDateNum`,
) AS `currentDateNum`,
...
@@ -3065,7 +3065,7 @@
...
@@ -3065,7 +3065,7 @@
WHERE
WHERE
create_date LIKE concat( cast( ( curdate( ) + INTERVAL - ( 1 ) DAY ) AS date ), '%' )
create_date LIKE concat( cast( ( curdate( ) + INTERVAL - ( 1 ) DAY ) AS date ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `yesterdayNum`,
) AS `yesterdayNum`,
...
@@ -3077,7 +3077,7 @@
...
@@ -3077,7 +3077,7 @@
WHERE
WHERE
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentMonthNum`,
) AS `currentMonthNum`,
(
(
...
@@ -3089,7 +3089,7 @@
...
@@ -3089,7 +3089,7 @@
create_date LIKE concat( date_format( cast( ( curdate( ) + INTERVAL - ( 1 ) MONTH ) AS date ), '%Y-%m' ), '%' )
create_date LIKE concat( date_format( cast( ( curdate( ) + INTERVAL - ( 1 ) MONTH ) AS date ), '%Y-%m' ), '%' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `lastMonthNum`
) AS `lastMonthNum`
...
@@ -3150,7 +3150,7 @@
...
@@ -3150,7 +3150,7 @@
WHERE
WHERE
create_date LIKE concat( curdate( ), '%' ) AND status = 1
create_date LIKE concat( curdate( ), '%' ) AND status = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentDateNum`,
) AS `currentDateNum`,
(
(
...
@@ -3165,7 +3165,7 @@
...
@@ -3165,7 +3165,7 @@
AND status = 1
AND status = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `yesterdayNum`,
) AS `yesterdayNum`,
...
@@ -3179,7 +3179,7 @@
...
@@ -3179,7 +3179,7 @@
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
AND status = 1
AND status = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentMonthNum`,
) AS `currentMonthNum`,
...
@@ -3195,7 +3195,7 @@
...
@@ -3195,7 +3195,7 @@
AND status = 1
AND status = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `lastMonthNum`
) AS `lastMonthNum`
...
@@ -3255,7 +3255,7 @@
...
@@ -3255,7 +3255,7 @@
WHERE
WHERE
create_date LIKE concat( curdate( ), '%' ) AND confirm_date IS NULL
create_date LIKE concat( curdate( ), '%' ) AND confirm_date IS NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentDateNum`,
) AS `currentDateNum`,
(
(
...
@@ -3270,7 +3270,7 @@
...
@@ -3270,7 +3270,7 @@
AND confirm_date IS NULL
AND confirm_date IS NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `yesterdayNum`,
) AS `yesterdayNum`,
...
@@ -3284,7 +3284,7 @@
...
@@ -3284,7 +3284,7 @@
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
create_date LIKE concat( date_format( curdate( ), '%Y-%m' ), '%' )
AND confirm_date IS NULL
AND confirm_date IS NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `currentMonthNum`,
) AS `currentMonthNum`,
...
@@ -3300,7 +3300,7 @@
...
@@ -3300,7 +3300,7 @@
AND confirm_date IS NULL
AND confirm_date IS NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
) AS `lastMonthNum`
) AS `lastMonthNum`
...
@@ -3330,8 +3330,7 @@
...
@@ -3330,8 +3330,7 @@
= `monthUtil`.`click_date`
= `monthUtil`.`click_date`
AND `fireAlarm`.`equipment_specific_index_name` = '火警'
AND `fireAlarm`.`equipment_specific_index_name` = '火警'
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and fireAlarm.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code =
and fireAlarm.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
#{bizOrgCode} )
</if>
</if>
)
)
...
@@ -3351,8 +3350,7 @@
...
@@ -3351,8 +3350,7 @@
LEFT JOIN `wl_equipment_specific_alarm_log` `breakdown` ON `monthUtil`.`click_date` = date_format(
LEFT JOIN `wl_equipment_specific_alarm_log` `breakdown` ON `monthUtil`.`click_date` = date_format(
`breakdown`.`create_date`, '%Y-%m-%d' ) AND `breakdown`.`equipment_specific_index_name` = '故障'
`breakdown`.`create_date`, '%Y-%m-%d' ) AND `breakdown`.`equipment_specific_index_name` = '故障'
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and breakdown.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code =
and breakdown.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code like concat(#{bizOrgCode}, '%') )
#{bizOrgCode} )
</if>
</if>
)
)
...
@@ -3372,7 +3370,7 @@
...
@@ -3372,7 +3370,7 @@
LEFT JOIN `wl_equipment_specific_alarm_log` `shield` ON date_format( `shield`.`create_date`, '%Y-%m-%d' ) =
LEFT JOIN `wl_equipment_specific_alarm_log` `shield` ON date_format( `shield`.`create_date`, '%Y-%m-%d' ) =
`monthUtil`.`click_date` AND `shield`.`equipment_specific_index_name` = '屏蔽'
`monthUtil`.`click_date` AND `shield`.`equipment_specific_index_name` = '屏蔽'
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and shield.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
and shield.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
)
</if>
</if>
...
@@ -3395,7 +3393,7 @@
...
@@ -3395,7 +3393,7 @@
date_format( `other`.`create_date`, '%Y-%m-%d' ) = `monthUtil`.`click_date`
date_format( `other`.`create_date`, '%Y-%m-%d' ) = `monthUtil`.`click_date`
AND `other`.`equipment_specific_index_name` NOT IN ( '火警', '故障', '屏蔽' )
AND `other`.`equipment_specific_index_name` NOT IN ( '火警', '故障', '屏蔽' )
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and other.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and other.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
...
@@ -3427,7 +3425,7 @@
...
@@ -3427,7 +3425,7 @@
FROM
FROM
( `one_years_month_util_view` `monthUtil` LEFT JOIN `wl_equipment_specific_alarm_log` `wes1` ON date_format( `wes1`.`create_date`, '%Y-%m' ) = `monthUtil`.`date`
( `one_years_month_util_view` `monthUtil` LEFT JOIN `wl_equipment_specific_alarm_log` `wes1` ON date_format( `wes1`.`create_date`, '%Y-%m' ) = `monthUtil`.`date`
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
)
)
...
@@ -3444,7 +3442,7 @@
...
@@ -3444,7 +3442,7 @@
FROM
FROM
( `one_years_month_util_view` `monthUtil` LEFT JOIN `wl_equipment_specific_alarm_log` `wes1` ON date_format( `wes1`.`create_date`, '%Y-%m' ) = `monthUtil`.`date`
( `one_years_month_util_view` `monthUtil` LEFT JOIN `wl_equipment_specific_alarm_log` `wes1` ON date_format( `wes1`.`create_date`, '%Y-%m' ) = `monthUtil`.`date`
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
and wes1.equipment_specific_id in(SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
)
)
GROUP BY
GROUP BY
...
@@ -3461,7 +3459,7 @@
...
@@ -3461,7 +3459,7 @@
SELECT * FROM alarm_all_list_view
SELECT * FROM alarm_all_list_view
<where>
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
specificId in (SELECT id FROM wl_equipment_specific WHERE biz_org_code
= #{bizOrgCode}
)
specificId in (SELECT id FROM wl_equipment_specific WHERE biz_org_code
like concat(#{bizOrgCode}, '%')
)
</if>
</if>
</where>
</where>
ORDER BY createDate DESC
ORDER BY createDate DESC
...
...
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