Browse Source

楼栋排序

master
zxc 3 years ago
parent
commit
df919f5121
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
  2. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
  3. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java
  4. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java
  5. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java
  6. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java
  7. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java
  8. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
  9. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.18__edit_building_and_house_sort.sql
  10. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx
  11. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java

@ -68,7 +68,7 @@ public class IcBuildingDTO implements Serializable {
/**
* 排序
*/
private Integer sort;
private Double sort;
/**
* 总单元数

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java

@ -166,5 +166,5 @@ public class ImportGeneralDTO implements Serializable {
/**
* 排序
*/
private Integer sort;
private Double sort;
}

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java

@ -85,7 +85,7 @@ public class IcBulidingAddFormDTO implements Serializable {
* 排序
*/
@NotNull(message = "排序不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
private Integer sort = 0;
private Double sort = 0.00;
/**
* 总单元数

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java

@ -29,7 +29,7 @@ public class IcBuildingListResultDTO extends PageFormDTO {
private Integer realTotalHouseNum;
private String latitude;
private String agencyId;
private Integer sort;
private Double sort;
private String agencyName;
private String buildingId;
private String buildingName;

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java

@ -63,7 +63,7 @@ public class IcBuildingEntity extends BaseEpmetEntity {
/**
* 排序
*/
private Integer sort;
private Double sort;
/**
* 总单元数

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/BuildingInfoModel.java

@ -42,6 +42,9 @@ public class BuildingInfoModel {
@ExcelProperty(value = "楼长电话")
private String buildingLeaderMobile;
@ExcelProperty(value = "排序")
private Double sort;
@ExcelIgnore
private Integer num;

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java

@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -117,6 +118,11 @@ public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingIn
disposeErrorMsg(info,"单元数的值未填写");
return;
}
if (null == data.getSort()){
data.setSort(NumConstant.ZERO_DOT_ZERO);
}else {
data.setSort(getDouble(data.getSort()));
}
// 应产品要求添加
if (StringUtils.isNotBlank(dto.getType()) && (!dto.getType().equals("商品房") && !dto.getType().equals("自建房")) && !dto.getType().equals("别墅")){
nums.add(num);
@ -137,6 +143,14 @@ public class ImportBuildingInfoListener extends AnalysisEventListener<BuildingIn
}
}
public Double getDouble(Double d){
if (null == d){
return NumConstant.ZERO_DOT_ZERO;
}
DecimalFormat df = new DecimalFormat("#.##");
return Double.parseDouble(df.format(d));
}
public void finalDispose(){
if (CollectionUtils.isEmpty(needDisposeList)){
return;

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java

@ -597,7 +597,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao
buildingEntity.setNeighborHoodId(info.getNeighborHoodId());
buildingEntity.setBuildingName(info.getBuildingName());
buildingEntity.setType(null == info.getType()?NumConstant.ONE_STR:info.getType());
buildingEntity.setSort(NumConstant.ZERO);
buildingEntity.setSort(info.getSort());
buildingEntity.setTotalUnitNum(info.getTotalUnitNum());
buildingEntity.setTotalFloorNum(info.getTotalFloorNum());
buildingEntity.setTotalHouseNum(info.getTotalHouseNum());

2
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.18__edit_building_and_house_sort.sql

@ -0,0 +1,2 @@
ALTER TABLE ic_building DROP SORT;
alter table ic_building add COLUMN SORT DECIMAL(6,2) comment '排序' DEFAULT 0.00 AFTER BUILDING_LEADER_NAME;

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx

Binary file not shown.

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -108,7 +108,8 @@
</if>
AND a.DEL_FLAG = '0'
</where>
ORDER BY CAST(b.NEIGHBOR_HOOD_NAME AS SIGNED),CONVERT(b.NEIGHBOR_HOOD_NAME using gbk),
ORDER BY a.sort,
CAST(b.NEIGHBOR_HOOD_NAME AS SIGNED),CONVERT(b.NEIGHBOR_HOOD_NAME using gbk),
CAST(a.BUILDING_NAME AS SIGNED),CONVERT(a.BUILDING_NAME USING gbk)
</select>
<select id="searchAllBuilding" resultType="com.epmet.excel.IcBuildingExcel">

Loading…
Cancel
Save