Commit ecc7017a authored by 李秀明's avatar 李秀明

Merge remote-tracking branch 'origin/develop_dl' into develop_dl

parents 3fbe8016 e56fe0e0
...@@ -121,6 +121,8 @@ ...@@ -121,6 +121,8 @@
u.parent_id parentId, u.parent_id parentId,
u.person_status personStatus, u.person_status personStatus,
(select biz_org_name from cb_org_usr where sequence_nbr = u.parent_id) as companyName, (select biz_org_name from cb_org_usr where sequence_nbr = u.parent_id) as companyName,
(SELECT IFNULL(SUM(IF(aqr.SOURCE = 'patrol', 1, 0)), 0) FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = u.sequence_nbr ) as 'patrol',
(SELECT IFNULL(SUM(IF(aqr.SOURCE != 'patrol', 1, 0)), 0) FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = u.sequence_nbr ) as 'other',
g.* g.*
FROM FROM
cb_org_usr u cb_org_usr u
......
...@@ -2602,12 +2602,11 @@ ...@@ -2602,12 +2602,11 @@
wes.name as equipmentName, wes.name as equipmentName,
wed.equipment_name systemType, wed.equipment_name systemType,
wes.equip_status AS equipStatus, wes.equip_status AS equipStatus,
IFNULL(IFNULL(SUM(IF(aqr.source='equip',1,0)),0),0) as 'equip', (SELECT IFNULL(SUM(IF(aqr.SOURCE = 'equip', 1, 0)), 0) FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = wes.id ) as 'equip',
IFNULL(count(aqr.sequence_nbr) - IFNULL(SUM(IF(aqr.source='equip',1,0)),0),0) as 'other' (SELECT IFNULL(SUM(IF(aqr.SOURCE != 'equip', 1, 0)), 0) FROM dl_amos_idx_biz.idx_access_qrcode_record aqr WHERE aqr.buss_id = wes.id ) as 'other'
FROM FROM
wl_equipment_specific wes wl_equipment_specific wes
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
LEFT JOIN dl_amos_idx_biz.idx_access_qrcode_record aqr on aqr.buss_id = wes.id
<where> <where>
<if test="equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"> <if test="equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''">
AND wes.biz_org_code LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%') AND wes.biz_org_code LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
......
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