diff --git a/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 44aa2f54..49cbfdf9 100644 --- a/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/code/smart-community/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -3980,6 +3980,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl resultList=getDefaultAgeDistribute(); + ResiPortrayalResultDTO otherResult = new ResiPortrayalResultDTO(); + otherResult.setCode(null); + otherResult.setTotalResi(0); + otherResult.setCodeName("未知"); + resultList.add(otherResult); + List list=baseDao.selectAgeAgeDistribute(customerId,orgId,orgType,orgIdPath); if(CollectionUtils.isEmpty(list)){ result.setTotal(NumConstant.ZERO); diff --git a/code/smart-community/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/code/smart-community/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 95085e20..1671c325 100644 --- a/code/smart-community/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/code/smart-community/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -1611,9 +1611,9 @@ @@ -1645,20 +1646,21 @@ when temp1.age >= 60 and temp1.age <= 69 then '2' when temp1.age >= 70 and temp1.age <= 79 then '3' when temp1.age >= 80 then '4' +-- when temp1.age is NULL then '5' end ) as `code` from ( SELECT u.ID, - YEAR(NOW())-SUBSTR(u.BIRTHDAY, 1, 4) as age + IF((u.BIRTHDAY IS NULL OR u.BIRTHDAY =''),NULL,YEAR(NOW())-SUBSTR(u.BIRTHDAY, 1, 4)) as age FROM ic_resi_user u WHERE u.DEL_FLAG = '0' AND u.CUSTOMER_ID = #{customerId} and u.`STATUS`='0' - and u.BIRTHDAY is not null - and u.BIRTHDAY !='' +-- and u.BIRTHDAY is not null +-- and u.BIRTHDAY !='' and u.PIDS LIKE concat(#{orgIdPath},'%')