diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java index 4793b49558..0582f19669 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java @@ -18,13 +18,10 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.org.CustomerGridEntity; import com.epmet.dto.group.result.CustomerGridInfoResultDTO; import com.epmet.entity.stats.DimGridEntity; import org.apache.ibatis.annotations.Mapper; - -import java.util.Date; -import java.util.List; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -37,9 +34,15 @@ import java.util.List; @Mapper public interface DimGridDao extends BaseDao { - DimGridEntity getLastCreatedGridDimEntity(); + DimGridEntity getLastCreatedGridDimEntity(); - List selectCustomerGrid(); + List selectCustomerGrid(); + /** + * desc:根据客户Id获取 该客户下的网格数据 + * @param customerId + * @return + */ + List getGridListByCustomerId(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index 410c92d282..0a12646bb2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.stats.DimGridDao; @@ -112,8 +114,8 @@ public class DimGridServiceImpl extends BaseServiceImpl getGridListByCustomerId(String customerId) { if (StringUtils.isBlank(customerId)){ + throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); } - //baseDao.getGridListByCustomerId(customerId); - return null; + return baseDao.getGridListByCustomerId(customerId); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml index d71a9799a7..03e73a3289 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml @@ -23,5 +23,16 @@ dc.del_flag = 0 AND dg.del_flag = 0 + \ No newline at end of file