diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcEnterprisePatrolRecordDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcEnterprisePatrolRecordDao.java index d6f5c83879..1019bb6f69 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcEnterprisePatrolRecordDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcEnterprisePatrolRecordDao.java @@ -26,7 +26,7 @@ public interface IcEnterprisePatrolRecordDao extends BaseDao listEnterprisePatrol(@Param("customerId") String customerId, @Param("agencyId") String agencyId, @Param("staffOrgIds") String staffOrgIds, @Param("search") String search, - @Param("categoryKey") String categoryKey); + @Param("categoryKey") String categoryKey, @Param("latestResult") String latestResult); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java index 7b1779be57..10b94f81d9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java @@ -1,16 +1,13 @@ package com.epmet.dataaggre.service.govorg; -import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dataaggre.dto.govorg.result.IcEnterisePatrolResultDTO; import com.epmet.dataaggre.entity.govorg.*; -import com.epmet.dataaggre.entity.heart.IcCommunitySelfOrganizationEntity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; import java.util.Map; -import java.util.Set; /** * org库的图层service @@ -115,11 +112,11 @@ public interface GovOrgCoverageService { Integer countSuporiorResourceEntities(String customerId, String staffOrgIds, String search, String categoryKey); - Integer countEnterprisePatrol(String customerId, String agencyId, String staffOrgIds, String search, String categoryKey); + Integer countEnterprisePatrol(String customerId, String agencyId, String staffOrgIds, String search, String categoryKey,String latestResult); List listEnterprisePatrol(String customerId, String agencyId, String staffOrgIds, String search, String categoryKey, Boolean isPage, Integer pageNo, - Integer pageSize); + Integer pageSize, String latestResult); /** * 通过居民数量等条件查询房屋数量 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java index bc64607a7f..e2987a1233 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java @@ -1,7 +1,6 @@ package com.epmet.dataaggre.service.govorg.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.enums.CoverageEnums; import com.epmet.commons.tools.utils.EpmetRequestHolder; @@ -15,7 +14,10 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * org 图层service @@ -291,18 +293,18 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { } @Override - public Integer countEnterprisePatrol(String customerId, String agencyId, String staffOrgIds, String search, String categoryKey) { - return enterprisePatrolRecordDao.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey); + public Integer countEnterprisePatrol(String customerId, String agencyId, String staffOrgIds, String search, String categoryKey,String latestResult) { + return enterprisePatrolRecordDao.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey,latestResult); } @Override public List listEnterprisePatrol(String customerId, String agencyId, String staffOrgIds, String search, String categoryKey, Boolean isPage, - Integer pageNo, Integer pageSize) { + Integer pageNo, Integer pageSize, String latestResult) { if (isPage) { PageHelper.startPage(pageNo, pageSize); } - return enterprisePatrolRecordDao.listEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey); + return enterprisePatrolRecordDao.listEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey, latestResult); } @Override diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java index 3d919688b2..3e4e824fda 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java @@ -313,7 +313,7 @@ public class CoverageServiceImpl implements CoverageService { return orgCoverageService.countDangerousChemicalEntities(customerId, staffOrgIds, search, categoryKey); } else if (PLACE_TYPE_ENTERPRISE_PARTROL.equals(placeType)) { // 企事业单位巡查 - return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey); + return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey,null); } else if (PLACE_TYPE_GROUP_RENT.equals(placeType)) { // 群租房。出租的房屋,住的人口超过5人属于群租房(是个规定 return orgCoverageService.countByResiNumber(customerId, staffOrgIds, search, 5, HOUSE_RENT_FLAG_RENT); @@ -323,6 +323,10 @@ public class CoverageServiceImpl implements CoverageService { } else if (PLACE_TYPE_SUPERIOR_RESOURCE.equals(placeType)) { // 优势资源 return orgCoverageService.countSuporiorResourceEntities(customerId, staffOrgIds, search, categoryKey); + } else if(CoveragePlaceTypeEnum.ENTERPRISE_PATROL_UNQUALIFIED.equals(placeType)){ + // 企事业单位巡查 + // 最新巡查结果【0:合格 1:不合格】 + return orgCoverageService.countEnterprisePatrol(customerId, agencyId, staffOrgIds, search, categoryKey,NumConstant.ONE_STR ); } return 0; @@ -432,7 +436,7 @@ public class CoverageServiceImpl implements CoverageService { } else if (PLACE_TYPE_ENTERPRISE_PARTROL.equals(placeType)) { // 企事业单位巡查 List list = orgCoverageService.listEnterprisePatrol( - customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize); + customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize,null); return list.stream() .map(dc -> new CoverageAnalisisDataListResultDTO(dc.getEnterpriseId(), categoryKey, @@ -473,6 +477,14 @@ public class CoverageServiceImpl implements CoverageService { .map(dc -> new CoverageAnalisisDataListResultDTO(dc.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, isPage ? dc.getName() : null, dc.getLatitude(), dc.getLongitude())) .collect(Collectors.toList()); + } else if(CoveragePlaceTypeEnum.ENTERPRISE_PATROL_UNQUALIFIED.equals(placeType)){ + List list = orgCoverageService.listEnterprisePatrol( + customerId, agencyId, staffOrgIds, search, categoryKey, isPage, pageNo, pageSize,NumConstant.ONE_STR); + + return list.stream() + .map(dc -> new CoverageAnalisisDataListResultDTO(dc.getEnterpriseId(), categoryKey, + isPage ? categoryDict.getCategoryName() : null, placeType, isPage ? dc.getPlaceOrgName() : null, dc.getLatitude(), dc.getLongitude())) + .collect(Collectors.toList()); } return new ArrayList<>(); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcEnterprisePatrolRecordDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcEnterprisePatrolRecordDao.xml index 6aa433eb09..313eedb9c3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcEnterprisePatrolRecordDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcEnterprisePatrolRecordDao.xml @@ -12,6 +12,9 @@ and (e.AGENCY_ID = #{agencyId} or e.AGENCY_PIDS like CONCAT(#{staffOrgIds}, '%')) and e.PLACE_TYPE = #{categoryKey} and e.DEL_FLAG = '0' + + and e.LATEST_RESULT = #{latestResult} + @@ -34,5 +37,8 @@ and (e.AGENCY_ID = #{agencyId} or e.AGENCY_PIDS like CONCAT(#{staffOrgIds}, '%')) and e.PLACE_TYPE = #{categoryKey} and e.DEL_FLAG = '0' + + and e.LATEST_RESULT = #{latestResult} + \ No newline at end of file