diff --git a/epmet-plugins-common/src/main/java/com/epmet/plugin/commons/utils/NumUtils.java b/epmet-plugins-common/src/main/java/com/epmet/plugin/commons/utils/NumUtils.java new file mode 100644 index 0000000..58dfec3 --- /dev/null +++ b/epmet-plugins-common/src/main/java/com/epmet/plugin/commons/utils/NumUtils.java @@ -0,0 +1,30 @@ +package com.epmet.plugin.commons.utils; + +import com.epmet.commons.tools.constant.NumConstant; + +/*** + * 数字处理相关通用方法 + * @author work@yujt.net.cn + * @date 2022/5/12/0012 10:02 + */ +public class NumUtils { + + public final static int ONE_THOUSAND = 1000; + + /** + * 获取数值 + * + * @param number 数值,可能为空 + * @param excludeZero 数字不能为0 + * @param defaultNumber 默认值(数字为空值时 或 数值为0但excludeZero == true 时,使用默认值) + * @return int + * @author work@yujt.net.cn + * @date 2022/5/12/0012 10:11 + */ + public static int getNumberInt(Integer number, boolean excludeZero, int defaultNumber) { + if (null == number || (excludeZero && NumConstant.ZERO == number)) { + return defaultNumber; + } + return number; + } +} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisServiceStationFormDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisServiceStationFormDTO.java index eb088e2..86cd108 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisServiceStationFormDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisServiceStationFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.plugin.power.dto.axis.form; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; @Data @@ -9,7 +10,7 @@ public class PowerAxisServiceStationFormDTO implements Serializable { private static final long serialVersionUID = -8446905334792655596L; /** - *动力主轴节点id + * 动力主轴节点id */ private String axisStructId; /** @@ -19,5 +20,11 @@ public class PowerAxisServiceStationFormDTO implements Serializable { /** * 客户id */ + @NotBlank(message = "所属客户不能为空") private String customerId; + /** + * 组织id + */ + @NotBlank(message = "所属组织不能为空") + private String agencyId; } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelHouseHoldViewListFormDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelHouseHoldViewListFormDTO.java index c6ef16e..6f68885 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelHouseHoldViewListFormDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelHouseHoldViewListFormDTO.java @@ -2,6 +2,8 @@ package com.epmet.plugin.power.dto.axis.form; import lombok.Data; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; @Data @@ -17,15 +19,24 @@ public class PowerKernelHouseHoldViewListFormDTO implements Serializable { /** * 页码 */ - private int pageNo; + @NotNull(message = "页码不能为空") + private Integer pageNo; /** * 条数 */ - private int pageSize; + @NotNull(message = "页容量不能为空") + private Integer pageSize; + + /** + * 组织id + */ + @NotBlank(message = "所属组织不能为空") + private String agencyId; /** * 客户id */ + @NotBlank(message = "所属客户不能为空") private String customerId; } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java index 34a69fe..8242c23 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java @@ -14,7 +14,6 @@ import com.epmet.plugin.power.modules.axis.service.PowerServiceStationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; import java.util.List; /*** @@ -47,7 +46,9 @@ public class PowerAxisDataVisualController { * @date 2022/4/22 19:53 */ @PostMapping("serviceStation/listPosition") - public Result> getListPostition(@RequestBody PowerAxisServiceStationFormDTO form) { + public Result> getListPostition(@RequestBody PowerAxisServiceStationFormDTO form, @LoginUser TokenDto tokenDto) { + form.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(form); return new Result().ok(powerServiceStationService.getListPosition(form)); } @@ -118,7 +119,9 @@ public class PowerAxisDataVisualController { * @date 2022/4/23 10:20 */ @PostMapping("kernelHousehold/list") - public ResultDTO getList(@RequestBody PowerKernelHouseHoldViewListFormDTO form) { + public ResultDTO getList(@RequestBody PowerKernelHouseHoldViewListFormDTO form, @LoginUser TokenDto tokenDto) { + form.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(form); List dto = powerKernelHouseholdService.getList(form); return ResultDTO.success("查询成功", dto, powerKernelHouseholdService.getTotal(form)); } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java index cc183e1..61d5ba9 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java @@ -1,8 +1,10 @@ package com.epmet.plugin.power.modules.axis.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -48,7 +50,8 @@ public class PowerServiceStationController { @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody PowerServiceStationDTO dto){ + public Result save(@RequestBody PowerServiceStationDTO dto, @LoginUser TokenDto tokenDto){ + dto.setCustomerId(tokenDto.getCustomerId()); //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); powerServiceStationService.save(dto); diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java index 33f6571..d4831d5 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java @@ -81,7 +81,7 @@ public interface PowerAxisStructDao extends BaseDao { int getKernelHouseHold(@Param("agencyId") String agencyId, @Param("customerId") String customerId); - int getServiceStation(@Param("agencyId") String agencyId,@Param("customerId") String customerId); + int getServiceStation(@Param("agencyId") String agencyId, @Param("customerId") String customerId); List getStructTree(PowerAxisStructStructTreeFormDTO form); @@ -111,4 +111,18 @@ public interface PowerAxisStructDao extends BaseDao { * @date 2022/4/24 19:29 */ String getCateGoryCode(String customerId, int level, String tagCateGory); + + /** + * 查询动力主轴跟节点 + * + * @param customerId 客户 + * @param agencyId 组织 + * @param structLevel 级别 {@link com.epmet.plugin.power.enums.PowerTagLevelEnum#ROOT} + * @return java.lang.String + * @author work@yujt.net.cn + * @date 2022/5/12/0012 9:52 + */ + String getRootAxisStructId(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("structLevel") int structLevel); } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java index d77247e..1509ff5 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java @@ -54,6 +54,4 @@ public interface PowerKernelHouseholdDao extends BaseDao getPage(Map params); - String queryAxisStructId(@Param("agencyId") String agencyId, - @Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java index 29a10ef..557dd09 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java @@ -122,7 +122,6 @@ public interface PowerAxisStructService extends BaseService getIdByAgencyId(String agencyId); /** - * * 关键指标统计 * * @param form @@ -142,7 +141,7 @@ public interface PowerAxisStructService extends BaseService getStructTree(PowerAxisStructStructTreeFormDTO form); - List getListPosition(int structLevel,PowerAxisDataListPositionFormDTO form); + List getListPosition(int structLevel, PowerAxisDataListPositionFormDTO form); /** * 根据节点接报,组装其上级节点树 @@ -154,4 +153,16 @@ public interface PowerAxisStructService extends BaseService listParentTreeByLevel(String structLevel, String customerId); + + /** + * 获取动力主轴根节点ID + * + * @param rootStructId 根节点ID,不为空直接返回该值 + * @param customerId 客户 + * @param agencyId 组织 + * @return java.lang.String + * @author work@yujt.net.cn + * @date 2022/5/12/0012 10:26 + */ + String getRootAxisStructId(String rootStructId, String customerId, String agencyId); } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java index df6c554..34bad4f 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java @@ -10,12 +10,11 @@ import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.TreeUtils; -import com.epmet.dto.CustomerAgencyDTO; -import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; import com.epmet.plugin.power.dto.axis.form.*; import com.epmet.plugin.power.dto.axis.result.*; @@ -31,7 +30,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import javax.validation.constraints.NotBlank; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -45,9 +43,6 @@ import java.util.Map; @Service public class PowerAxisStructServiceImpl extends BaseServiceImpl implements PowerAxisStructService { - @Autowired - private GovOrgOpenFeignClient govOrgOpenFeignClient; - @Autowired private PowerAxisTagService powerAxisTagService; @@ -186,11 +181,7 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl agencyInfoResult = govOrgOpenFeignClient.getAgencyById(agencyId); - if (!agencyInfoResult.success()) { - throw new EpmetException(agencyInfoResult.getCode(), agencyInfoResult.getMsg()); - } - CustomerAgencyDTO agencyInfo = agencyInfoResult.getData(); + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId); struct.setAgencyId(agencyInfo.getId()); struct.setAgencyName(agencyInfo.getOrganizationName()); struct.setAgencyType(agencyInfo.getLevel()); @@ -275,4 +266,12 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl result = baseDao.listParentTreeByLevel(Integer.parseInt(structLevel), customerId); return TreeUtils.build(result); } + + @Override + public String getRootAxisStructId(String rootStructId, String customerId, String agencyId) { + if (StringUtils.isNotBlank(rootStructId)) { + return rootStructId; + } + return baseDao.getRootAxisStructId(customerId, agencyId, PowerTagLevelEnum.ROOT.level()); + } } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java index 453bd88..579b5b5 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java @@ -15,6 +15,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.result.HouseInfoDTO; import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.plugin.commons.utils.NumUtils; import com.epmet.plugin.power.dto.axis.PowerKernelHouseholdDTO; import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseFormDTO; import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseHoldViewListFormDTO; @@ -24,14 +25,15 @@ import com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO; import com.epmet.plugin.power.dto.axis.result.PowerkernelMemberListResultDTO; import com.epmet.plugin.power.modules.axis.dao.PowerKernelHouseholdDao; import com.epmet.plugin.power.modules.axis.entity.PowerKernelHouseholdEntity; +import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService; import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService; import com.google.common.collect.Sets; +import org.apache.commons.compress.utils.Lists; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.validation.constraints.NotBlank; import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -54,6 +56,9 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl page(Map params) { @@ -123,8 +128,12 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl getList(PowerKernelHouseHoldViewListFormDTO form) { - form.setPageNo((form.getPageNo() - 1) * form.getPageSize()); - form.setCustomerId(loginUserUtil.getLoginUserCustomerId()); + String axisStructId = powerAxisStructService.getRootAxisStructId(form.getAxisStructId(), form.getCustomerId(), form.getAgencyId()); + if (StringUtils.isBlank(axisStructId)) { + return Lists.newArrayList(); + } + form.setAxisStructId(axisStructId); + form.setPageNo((form.getPageNo() - NumConstant.ONE) * form.getPageSize()); List list = baseDao.getList(form); for (PowerKernelHouseHoldViewListResultDTO dto : list) { List nameList = dto.getKernelMemberList().stream().map(PowerkernelMemberListResultDTO::getKernelMemberName).distinct().collect(Collectors.toList()); @@ -135,22 +144,17 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl getListPosition(PowerKernelListPostitionFormDTO form) { - Integer limit = form.getLimit(); - if (null == limit || NumConstant.ZERO_L == limit) { - limit = 999; - } - String axisStructId = form.getAxisStructId(); + String customerId = form.getCustomerId(); + String axisStructId = powerAxisStructService.getRootAxisStructId(form.getAxisStructId(), customerId, form.getAgencyId()); if (StringUtils.isBlank(axisStructId)) { - String agencyId = form.getAgencyId(); - axisStructId = baseDao.queryAxisStructId(agencyId,form.getCustomerId()); + return Lists.newArrayList(); } - return baseDao.queryListPosition(axisStructId, form.getCustomerId(), limit); + return baseDao.queryListPosition(axisStructId, customerId, NumUtils.getNumberInt(form.getLimit(), true, NumUtils.ONE_THOUSAND)); } @Override diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java index 41268f5..379cf79 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java @@ -6,14 +6,16 @@ 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.page.PageData; -import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.plugin.commons.utils.NumUtils; import com.epmet.plugin.power.dto.axis.PowerServiceStationDTO; import com.epmet.plugin.power.dto.axis.form.PowerAxisServiceStationFormDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisServiceStationResultDTO; import com.epmet.plugin.power.modules.axis.dao.PowerServiceStationDao; import com.epmet.plugin.power.modules.axis.entity.PowerServiceStationEntity; +import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService; import com.epmet.plugin.power.modules.axis.service.PowerServiceStationService; +import org.apache.commons.compress.utils.Lists; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -32,9 +34,8 @@ import java.util.Map; @Service public class PowerServiceStationServiceImpl extends BaseServiceImpl implements PowerServiceStationService { - @Autowired - private LoginUserUtil loginUser; + private PowerAxisStructService powerAxisStructService; @Override public PageData page(Map params) { @@ -74,7 +75,6 @@ public class PowerServiceStationServiceImpl extends BaseServiceImpl getListPosition(PowerAxisServiceStationFormDTO form) { - form.setCustomerId(loginUser.getLoginUserCustomerId()); - List list = baseDao.getListPosition(form); - return list; + String axisStructId = powerAxisStructService.getRootAxisStructId(form.getAxisStructId(), form.getCustomerId(), form.getAgencyId()); + if (StringUtils.isBlank(axisStructId)) { + return Lists.newArrayList(); + } + form.setAxisStructId(axisStructId); + form.setLimit(NumUtils.getNumberInt(form.getLimit(), true, NumUtils.ONE_THOUSAND)); + return baseDao.getListPosition(form); } } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml index 7dc6687..3db8a0e 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml @@ -244,6 +244,19 @@ AND s.AGENCY_ID = #{agencyId} AND h.CUSTOMER_ID = #{customerId} + \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml index de66e46..ae3fce4 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml @@ -128,7 +128,8 @@ GROUP BY h.HOUSE_ID ORDER BY - s.SORT + s.SORT,h.CREATED_TIME + LIMIT #{limit} @@ -171,17 +172,5 @@ ORDER BY h.CREATED_TIME - - \ No newline at end of file