Browse Source

Merge branch 'dev_resi_export' into develop

dev
sunyuchao 3 years ago
parent
commit
0fe466210b
  1. 7
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java
  2. 24
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java
  3. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  4. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcCustomExportResultDTO.java
  5. 4
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java
  6. 18
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java
  7. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java
  8. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

7
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java

@ -1,6 +1,5 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
@ -31,7 +30,7 @@ public class HouseChartResultDTO implements Serializable {
/**
* 房屋自住总数占比保留两位小数带百分号的
*/
private String zzHouseRatio = "0%";
private Double zzHouseRatio = 0.0;
/**
* 房屋常住总数
*/
@ -39,7 +38,7 @@ public class HouseChartResultDTO implements Serializable {
/**
* 房屋常住总数占比保留两位小数带百分号的
*/
private String czHouseRatio = "0%";
private Double czHouseRatio = 0.0;
/**
* 房屋闲置总数
*/
@ -47,7 +46,7 @@ public class HouseChartResultDTO implements Serializable {
/**
* 房屋闲置总数占比保留两位小数带百分号的
*/
private String xzHouseRatio = "0%";
private Double xzHouseRatio = 0.0;
@JsonIgnore
private Integer num;

24
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java

@ -25,50 +25,50 @@ public class SubUserHouseListResultDTO implements Serializable {
/**
* 房屋总数
*/
private Integer houseTotal;
private Integer houseTotal = 0;
/**
* 房屋自住总数
*/
private Integer zzHouseTotal;
private Integer zzHouseTotal = 0;
/**
* 房屋自住总数占比保留两位小数带百分号的
*/
private String zzHouseRatio;
private Double zzHouseRatio = 0.0;
/**
* 房屋常住总数
*/
private Integer czHouseTotal;
private Integer czHouseTotal = 0;
/**
* 房屋常住总数占比保留两位小数带百分号的
*/
private String czHouseRatio;
private Double czHouseRatio = 0.0;
/**
* 房屋闲置总数
*/
private Integer xzHouseTotal;
private Integer xzHouseTotal = 0;
/**
* 房屋闲置总数占比保留两位小数带百分号的
*/
private String xzHouseRatio;
private Double xzHouseRatio = 0.0;
/**
* 居民总数
*/
private Integer userTotal;
private Integer userTotal = 0;
/**
* 常住人口总数
*/
private Integer czUserTotal;
private Integer czUserTotal = 0;
/**
* 常住人口占比保留两位小数带百分号的
*/
private String czUserRatio;
private Double czUserRatio = 0.0;
/**
* 流动人口总数
*/
private Integer ldUserTotal;
private Integer ldUserTotal = 0;
/**
* 流动人口占比保留两位小数带百分号的
*/
private String ldUserRatio;
private Double ldUserRatio = 0.0;
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -385,9 +385,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
}
});
resultDTO.setHouseTotal(houseTotal.get());
resultDTO.setZzHouseRatio((resultDTO.getHouseTotal() == 0 || resultDTO.getZzHouseTotal() > resultDTO.getHouseTotal()) ? "0%" : numberFormat.format(((float) resultDTO.getZzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100) + "%");
resultDTO.setCzHouseRatio((resultDTO.getHouseTotal() == 0 || resultDTO.getCzHouseTotal() > resultDTO.getHouseTotal()) ? "0%" : numberFormat.format(((float) resultDTO.getCzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100) + "%");
resultDTO.setXzHouseRatio((resultDTO.getHouseTotal() == 0 || resultDTO.getXzHouseTotal() > resultDTO.getHouseTotal()) ? "0%" : numberFormat.format(((float) resultDTO.getXzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100) + "%");
resultDTO.setZzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getZzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getZzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100)));
resultDTO.setCzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getCzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100)));
resultDTO.setXzHouseRatio(Double.valueOf((resultDTO.getHouseTotal() == 0 || resultDTO.getXzHouseTotal() > resultDTO.getHouseTotal()) ? "0" : numberFormat.format(((float) resultDTO.getXzHouseTotal() / (float) resultDTO.getHouseTotal()) * 100)));
resultDTO.setOrgId(formDTO.getOrgId());
resultDTO.setOrgType(formDTO.getOrgType());
return resultDTO;

2
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcCustomExportResultDTO.java

@ -2,6 +2,7 @@ package com.epmet.dto.result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.ArrayList;
@ -35,6 +36,7 @@ public class IcCustomExportResultDTO implements Serializable {
*/
private List<SqlColumn> hiddenSqlColumns;
@NoArgsConstructor
@AllArgsConstructor
@Data
public static class SqlColumn {

4
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java

@ -25,8 +25,8 @@ import java.util.Set;
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:16
*/
// @FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallbackFactory = OperCustomizeOpenFeignClientFallbackFactory.class,url = "http://localhost:8089")
@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallbackFactory = OperCustomizeOpenFeignClientFallbackFactory.class)
@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallbackFactory = OperCustomizeOpenFeignClientFallbackFactory.class,url = "http://localhost:8089")
//@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallbackFactory = OperCustomizeOpenFeignClientFallbackFactory.class)
public interface OperCustomizeOpenFeignClient {
@PostMapping(value = "/oper/customize/customerfootbar/customerfootbars", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)

18
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java

@ -103,14 +103,12 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat
//todo 删除多余的方法
// List<ConditionResultDTO> remoteItemList = icFormItemDao.getConditionRemoteItems(param.getCustomerId(), param.getFormCode());
Map<String, List<IcExportTemplateForExportResultDTO>> resultTemp = list.stream().collect(Collectors.groupingBy(IcExportTemplateForExportResultDTO::getPid, LinkedHashMap::new, Collectors.toList()));
List<List<String>> headerMap = new ArrayList<>();
List<List<String>> headerList = new ArrayList<>();
List<IcCustomExportResultDTO.SqlColumn> showSqlColumns = new ArrayList<>();
List<IcCustomExportResultDTO.SqlColumn> hiddenSqlColumns = new ArrayList<>();
Set<String> hasExistColumnSet = new HashSet<>();
resultTemp.get(NumConstant.ZERO_STR).forEach(root -> {
List<String> headerGroupList = new ArrayList<>();
digui(resultTemp, root, headerGroupList, showSqlColumns, hiddenSqlColumns, hasExistColumnSet);
headerMap.add(headerGroupList);
digui(resultTemp, root, headerList, showSqlColumns, hiddenSqlColumns, hasExistColumnSet);
});
//组织 关联item项的
if (hasExistColumnSet.size() > NumConstant.ZERO) {
@ -129,14 +127,16 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat
}
IcCustomExportResultDTO result = new IcCustomExportResultDTO();
result.setHeaders(headerMap);
result.setHeaders(headerList);
result.setShowSqlColumns(showSqlColumns);
result.setHiddenSqlColumns(hiddenSqlColumns);
return result;
}
private void digui(Map<String, List<IcExportTemplateForExportResultDTO>> resultTemp, IcExportTemplateForExportResultDTO root, List<String> headerList, List<IcCustomExportResultDTO.SqlColumn> showSqlColumns, List<IcCustomExportResultDTO.SqlColumn> hiddenSqlColumns, Set<String> hasExistColumnSet) {
headerList.add(root.getLabel());
private void digui(Map<String, List<IcExportTemplateForExportResultDTO>> resultTemp, IcExportTemplateForExportResultDTO root, List<List<String>> headerList, List<IcCustomExportResultDTO.SqlColumn> showSqlColumns, List<IcCustomExportResultDTO.SqlColumn> hiddenSqlColumns, Set<String> hasExistColumnSet) {
if (StringUtils.isNotBlank(root.getColumnName())) {
showSqlColumns.add(new IcCustomExportResultDTO.SqlColumn(root.getTableName(), root.getColumnName()));
if (StringUtils.isNotBlank(root.getOptionSourceValue())) {
@ -150,6 +150,10 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat
return;
}
children.forEach(o -> {
List<String> headerGroupList = new ArrayList<>();
headerGroupList.add(root.getLabel());
headerGroupList.add(o.getLabel());
headerList.add(headerGroupList);
digui(resultTemp, o, headerList, showSqlColumns, hiddenSqlColumns, hasExistColumnSet);
});
}

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java

@ -30,7 +30,7 @@ public class UserChartResultDTO implements Serializable {
/**
* 常住人口占比保留两位小数带百分号的
*/
private String czUserRatio = "0%";
private Double czUserRatio = 0.0;
/**
* 流动人口总数
*/
@ -38,7 +38,7 @@ public class UserChartResultDTO implements Serializable {
/**
* 流动人口占比保留两位小数带百分号的
*/
private String ldUserRatio = "0%";
private Double ldUserRatio = 0.0;
@JsonIgnore
private Integer num;

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -1631,8 +1631,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
}
});
resultDTO.setUserTotal(userTotal.get());
resultDTO.setCzUserRatio((resultDTO.getUserTotal() == 0 || resultDTO.getCzUserTotal() > resultDTO.getUserTotal()) ? "0%" : numberFormat.format(((float) resultDTO.getCzUserTotal() / (float) resultDTO.getUserTotal()) * 100) + "%");
resultDTO.setLdUserRatio((resultDTO.getUserTotal() == 0 || resultDTO.getLdUserTotal() > resultDTO.getUserTotal()) ? "0%" : numberFormat.format(((float) resultDTO.getLdUserTotal() / (float) resultDTO.getUserTotal()) * 100) + "%");
resultDTO.setCzUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getCzUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getCzUserTotal() / (float) resultDTO.getUserTotal()) * 100)));
resultDTO.setLdUserRatio(Double.valueOf((resultDTO.getUserTotal() == 0 || resultDTO.getLdUserTotal() > resultDTO.getUserTotal()) ? "0" : numberFormat.format(((float) resultDTO.getLdUserTotal() / (float) resultDTO.getUserTotal()) * 100)));
resultDTO.setOrgId(formDTO.getOrgId());
resultDTO.setOrgType(formDTO.getOrgType());

Loading…
Cancel
Save