|
|
@ -389,6 +389,7 @@ |
|
|
|
when s.SERVICE_TYPE='social_org' then '社会组织' |
|
|
|
when s.SERVICE_TYPE='community_org' then '社区自组织' |
|
|
|
when s.SERVICE_TYPE='party_unit' then '区域化党建单位' |
|
|
|
when s.SERVICE_TYPE='ic_user_volunteer' then '志愿者' |
|
|
|
end |
|
|
|
)as legendName, |
|
|
|
count(s.DEMAND_REC_ID) as serviceDemandTotal, |
|
|
@ -406,6 +407,7 @@ |
|
|
|
<if test="null != orgType and orgType == 'agency' "> |
|
|
|
and m.GRID_PIDS like concat(#{gridPids},'%') |
|
|
|
</if> |
|
|
|
and s.SERVICE_TYPE not like '%volunteer%' |
|
|
|
and DATE_FORMAT(m.REPORT_TIME,'%Y-%m-%d') >= #{startDateId} |
|
|
|
and DATE_FORMAT(m.REPORT_TIME,'%Y-%m-%d') <= #{endDateId} |
|
|
|
and m.CATEGORY_CODE like concat(#{categoryCode},'%') |
|
|
@ -413,6 +415,32 @@ |
|
|
|
|
|
|
|
union all |
|
|
|
|
|
|
|
select |
|
|
|
#{categoryCode} as categoryCode, |
|
|
|
'ic_user_volunteer' as legendCode, |
|
|
|
'志愿者' as legendName, |
|
|
|
count(s.DEMAND_REC_ID) as serviceDemandTotal, |
|
|
|
count(distinct s.SERVER_ID) as totalService |
|
|
|
from ic_user_demand_service s |
|
|
|
inner join ic_user_demand_rec m |
|
|
|
on(s.DEMAND_REC_ID=m.ID) |
|
|
|
where s.DEL_FLAG='0' |
|
|
|
and m.DEL_FLAG='0' |
|
|
|
and m.`STATUS`='finished' |
|
|
|
and m.CUSTOMER_ID=#{customerId} |
|
|
|
<if test="null != orgType and orgType == 'grid' "> |
|
|
|
and m.GRID_ID=#{orgId} |
|
|
|
</if> |
|
|
|
<if test="null != orgType and orgType == 'agency' "> |
|
|
|
and m.GRID_PIDS like concat(#{gridPids},'%') |
|
|
|
</if> |
|
|
|
and s.SERVICE_TYPE like '%volunteer%' |
|
|
|
and DATE_FORMAT(m.REPORT_TIME,'%Y-%m-%d') >= #{startDateId} |
|
|
|
and DATE_FORMAT(m.REPORT_TIME,'%Y-%m-%d') <= #{endDateId} |
|
|
|
and m.CATEGORY_CODE like concat(#{categoryCode},'%') |
|
|
|
|
|
|
|
union all |
|
|
|
|
|
|
|
select |
|
|
|
#{categoryCode} as categoryCode, |
|
|
|
'unfinished' as legendCode, |
|
|
|