diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DemandAnalysisLegendEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DemandAnalysisLegendEnum.java index dc4d024308..0b7a0bc5f4 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DemandAnalysisLegendEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DemandAnalysisLegendEnum.java @@ -5,7 +5,7 @@ public enum DemandAnalysisLegendEnum { /** * 环境变量枚举 */ - VOLUNTEER("volunteer", "志愿者"), + VOLUNTEER("ic_user_volunteer", "志愿者"), PARTY_UNIT("party_unit", "联建单位"), COMMUNITY_ORG("community_org", "社区自组织"), UNFINISHED("unfinished", "未完成"), diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index ffb3b10869..d27c32445e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -955,6 +955,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl firstCategoryList=demandDictService.querySubCodeList(subCodeFormDTO); if(CollectionUtils.isEmpty(firstCategoryList)){ return new CategoryAnalysisResDTO(Collections.EMPTY_LIST,Collections.EMPTY_LIST); @@ -1032,25 +1033,11 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl iter = detailMap.keySet().iterator(); - String key = ""; - while (iter.hasNext()) { - key = iter.next(); - if(key.contains(resultDetail.getLegendCode())){ - resultDetail.setTotalService(detailMap.get(resultDetail.getLegendCode()).getTotalService()); - resultDetail.setServiceDemandTotal(detailMap.get(resultDetail.getLegendCode()).getServiceDemandTotal()); - } - } - - } - } - /*for(CategoryAnalysisDetail resultDetail:result.getDetail()){ if(detailMap.containsKey(resultDetail.getLegendCode())&&null!=detailMap.get(resultDetail.getLegendCode())){ resultDetail.setTotalService(detailMap.get(resultDetail.getLegendCode()).getTotalService()); resultDetail.setServiceDemandTotal(detailMap.get(resultDetail.getLegendCode()).getServiceDemandTotal()); } - }*/ + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 0a0bdd34ae..4fe2195446 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -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 @@ and m.GRID_PIDS like concat(#{gridPids},'%') + 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} + + and m.GRID_ID=#{orgId} + + + and m.GRID_PIDS like concat(#{gridPids},'%') + + 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,