diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingErrorInfoModel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingErrorInfoModel.java index 7477c1a109..f2746aa90b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingErrorInfoModel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingErrorInfoModel.java @@ -12,6 +12,9 @@ import lombok.Data; @Data public class BuildingErrorInfoModel { + @Excel(name = "行号", width = 20) + private Integer num; + @Excel(name = "小区名称" , width = 20) private String neighborHoodName; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java index e76c391324..dac7c09015 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java @@ -1,5 +1,6 @@ package com.epmet.model; +import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -35,4 +36,7 @@ public class BuildingInfoModel { @ExcelProperty(value = "户数") private Integer totalHouseNum; + @ExcelIgnore + private Integer num; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java index 4531b2c03f..c49ea51719 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java @@ -13,7 +13,7 @@ import org.hibernate.validator.constraints.Length; @Data public class HouseErrorInfoModel { - @Excel(name = "行号(不计算表头)", width = 20) + @Excel(name = "行号", width = 20) private Integer num; @Excel(name = "所属小区", width = 20) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java index 47681e15d1..cc0bc625ca 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java @@ -86,6 +86,7 @@ public class ImportBuildingInfoListener extends AnalysisEventListener gridIdList = customerGridList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList()); LambdaQueryWrapper queryWrapper = new QueryWrapper().lambda() .in(IcNeighborHoodEntity::getGridId, gridIdList) - .last("ORDER BY CAST(NEIGHBOR_HOOD_NAME AS SIGNED), CONVERT(NEIGHBOR_HOOD_NAME using gbk)"); + .orderByAsc(IcNeighborHoodEntity::getCreatedTime); List icNeighborHoodList = icNeighborHoodDao.selectList(queryWrapper); if(CollectionUtils.isEmpty(icNeighborHoodList)){ agencyList.addAll(gridList); @@ -205,8 +205,7 @@ public class BuildingServiceImpl implements BuildingService { List neighborHoodIdList = icNeighborHoodList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList()); LambdaQueryWrapper buildingQueryWrapper = new QueryWrapper().lambda() .in(IcBuildingEntity::getNeighborHoodId, neighborHoodIdList) - .last("ORDER BY CAST(BUILDING_NAME AS SIGNED), CONVERT(BUILDING_NAME using gbk)"); - //.orderByAsc(IcBuildingEntity::getCreatedTime,IcBuildingEntity::getBuildingName); + .orderByAsc(IcBuildingEntity::getCreatedTime,IcBuildingEntity::getBuildingName); List icBuildingList = icBuildingDao.selectList(buildingQueryWrapper); if(CollectionUtils.isEmpty(neighborHoodIdList)){ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java index 122a6fbd66..122e9755a0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java @@ -120,7 +120,7 @@ public class IcBuildingServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcBuildingEntity::getNeighborHoodId, neighborHoodId); - wrapper.last("ORDER BY CAST(BUILDING_NAME AS SIGNED),CONVERT ( BUILDING_NAME USING gbk ) ASC"); + wrapper.last("ORDER BY CONVERT ( BUILDING_NAME USING gbk ) ASC"); List list = baseDao.selectList(wrapper); if(CollectionUtils.isEmpty(list)) { return Collections.emptyList(); @@ -153,4 +153,4 @@ public class IcBuildingServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(formDTO.getBuildingId()), IcHouseEntity::getBuildingId, formDTO.getBuildingId()); wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcHouseEntity::getBuildingUnitId, formDTO.getUnitId()); - wrapper.last("ORDER BY CAST(DOOR_NAME AS SIGNED), CONVERT (DOOR_NAME USING gbk )"); + wrapper.last("ORDER BY CONVERT ( HOUSE_NAME USING gbk ) ASC"); List list = baseDao.selectList(wrapper); if(CollectionUtils.isEmpty(list)) { return Collections.emptyList(); @@ -160,7 +160,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId()); - wrapper.last("ORDER BY ORDER BY CAST(DOOR_NAME AS SIGNED), CONVERT (DOOR_NAME USING gbk ), CONVERT ( HOUSE_NAME USING gbk ) ASC"); + wrapper.last("ORDER BY CONVERT ( HOUSE_NAME USING gbk ) ASC"); List list = baseDao.selectList(wrapper); if(CollectionUtils.isEmpty(list)) { return Collections.emptyList(); @@ -246,4 +246,4 @@ public class IcHouseServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(agencyId),IcNeighborHoodEntity::getAgencyId, agencyId); wrapper.eq(StringUtils.isNotBlank(gridId), IcNeighborHoodEntity::getGridId, gridId); - wrapper.last("ORDER BY CAST(NEIGHBOR_HOOD_NAME AS SIGNED), CONVERT(NEIGHBOR_HOOD_NAME using gbk)"); + wrapper.last("ORDER BY CONVERT ( NEIGHBOR_HOOD_NAME USING gbk ) ASC"); List list = baseDao.selectList(wrapper); if(CollectionUtils.isEmpty(list)) { return Collections.emptyList(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index 0c0c38aa37..d4561898a7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -106,9 +106,7 @@ AND a.DEL_FLAG = '0' - order by - CAST(a.BUILDING_NAME AS SIGNED), - CONVERT(a.BUILDING_NAME using gbk) + order by a.CREATED_TIME, a.BUILDING_NAME