();
+ FileInputStream fis = new FileInputStream(path);
+ // 防止路径乱码 如果utf-8 乱码 改GBK eclipse里创建的txt 用UTF-8,在电脑上自己创建的txt 用GBK
+ InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
+ BufferedReader br = new BufferedReader(isr);
+ String line = "";
+ String result = null;
+ while ((line = br.readLine()) != null) {
+ String key = "TvFwHe6tGA";
+ result = AuthCodeUtil.authcodeDecode(line, key);
+ System.out.println(result);
+ }
+ br.close();
+ isr.close();
+ fis.close();
+ System.out.println("==========end");
+ }
+
+ private static void getStr(){
+ String tel = "4fb1lYySlVqMUaf/LnlBEM1nDZgCKnX+Q52azUGgSLCV0hioBvLFFZoJS1Vu";
+ tel = "a1孙1增勤";
+ String result = AuthCodeUtil.authcodeDecode(tel, "TvFwHe6tGA");
+ System.out.println(result);
+ }
+
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/EasyPoiExcelExportStylerImpl.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/EasyPoiExcelExportStylerImpl.java
index b1a5606c2e..5ddff4ba71 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/EasyPoiExcelExportStylerImpl.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/EasyPoiExcelExportStylerImpl.java
@@ -50,7 +50,7 @@ public class EasyPoiExcelExportStylerImpl extends AbstractExcelExportStyler
titleStyle.setFont(font);
titleStyle.setAlignment(HorizontalAlignment.CENTER);
titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
- return null;
+ return titleStyle;
}
/**
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ColumnWidthStyleStrategy.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ColumnWidthStyleStrategy.java
new file mode 100644
index 0000000000..7e577e7c22
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ColumnWidthStyleStrategy.java
@@ -0,0 +1,96 @@
+package com.epmet.commons.tools.utils.poi.excel.handler;
+
+/**
+ * desc:设置columnWith宽度
+ *
+ * @author: LiuJanJun
+ * @date: 2022/4/28 5:05 下午
+ * @version: 1.0
+ */
+
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.Head;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.util.MapUtils;
+import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
+import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Take the width of the longest column as the width.
+ *
+ * This is not very useful at the moment, for example if you have Numbers it will cause a newline.And the length is not
+ * exactly the same as the actual length.
+ *
+ * @author Jiaju Zhuang
+ */
+public class ColumnWidthStyleStrategy extends AbstractColumnWidthStyleStrategy {
+
+ private static final int MAX_COLUMN_WIDTH = 255;
+ /**
+ * 是否 根据内容设置宽度
+ */
+ private boolean isSetContentWidth = false;
+
+ private final Map> cache = MapUtils.newHashMapWithExpectedSize(8);
+
+
+
+ @Override
+ protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List> cellDataList, Cell cell,
+ Head head,
+ Integer relativeRowIndex, Boolean isHead) {
+ boolean needSetWidth = (isHead || isSetContentWidth) && CollectionUtils.isNotEmpty(cellDataList);
+ if (!needSetWidth) {
+ return;
+ }
+ Map maxColumnWidthMap = cache.computeIfAbsent(writeSheetHolder.getSheetNo(), k -> new HashMap<>(16));
+ Integer columnWidth = dataLength(cellDataList, cell, isHead);
+ if (columnWidth < 0) {
+ return;
+ }
+ if (columnWidth > MAX_COLUMN_WIDTH) {
+ columnWidth = MAX_COLUMN_WIDTH;
+ }
+ Integer maxColumnWidth = maxColumnWidthMap.get(cell.getColumnIndex());
+ if (maxColumnWidth == null || columnWidth > maxColumnWidth) {
+ maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth);
+ writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 256);
+ }
+ }
+
+ private Integer dataLength(List> cellDataList, Cell cell, Boolean isHead) {
+ if (isHead) {
+ return cell.getStringCellValue().getBytes().length+3;
+ }
+ WriteCellData> cellData = cellDataList.get(0);
+ CellDataTypeEnum type = cellData.getType();
+ if (type == null) {
+ return -1;
+ }
+ switch (type) {
+ case STRING:
+ return cellData.getStringValue().getBytes().length;
+ case BOOLEAN:
+ return cellData.getBooleanValue().toString().getBytes().length;
+ case NUMBER:
+ return cellData.getNumberValue().toString().getBytes().length;
+ default:
+ return -1;
+ }
+ }
+
+ public ColumnWidthStyleStrategy() {
+
+ }
+
+ public ColumnWidthStyleStrategy(boolean isSetContentWidth) {
+ this.isSetContentWidth = isSetContentWidth;
+ }
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillCellMergeStrategy.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillCellMergeStrategy.java
new file mode 100644
index 0000000000..54f395bbc9
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/ExcelFillCellMergeStrategy.java
@@ -0,0 +1,121 @@
+package com.epmet.commons.tools.utils.poi.excel.handler;
+
+import com.alibaba.excel.metadata.Head;
+import com.alibaba.excel.metadata.data.WriteCellData;
+import com.alibaba.excel.write.handler.CellWriteHandler;
+import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
+import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.util.CellRangeAddress;
+
+import java.util.List;
+
+/**
+ * desc:单元格合并策略
+ *
+ * @author liujianjun
+ */
+public class ExcelFillCellMergeStrategy implements CellWriteHandler {
+
+ /**
+ * 需要合并的列 下标
+ */
+ private int[] mergeColumnIndexArr;
+ /**
+ * 从下标n行开始合并
+ */
+ private int mergeRowIndex;
+
+ public ExcelFillCellMergeStrategy() {
+ }
+
+ public ExcelFillCellMergeStrategy(int mergeRowIndex, int[] mergeColumnIndexArr) {
+ this.mergeRowIndex = mergeRowIndex;
+ this.mergeColumnIndexArr = mergeColumnIndexArr;
+ }
+
+ @Override
+ public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Head head, Integer columnIndex, Integer relativeRowIndex, Boolean isHead) {
+
+ }
+
+ @Override
+ public void afterCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {
+ // 隐藏id列
+ writeSheetHolder.getSheet().setColumnHidden(0, true);
+ }
+
+ @Override
+ public void afterCellDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, List> list, Cell cell, Head head, Integer integer, Boolean aBoolean) {
+ int curRowIndex = cell.getRowIndex();
+ int curColIndex = cell.getColumnIndex();
+ if (curRowIndex <= mergeRowIndex) {
+ return;
+ }
+ //如果不指定 合并的列则全部列进行 合并判断
+ if (mergeColumnIndexArr == null) {
+ mergeWithPrevRow(writeSheetHolder, cell, curRowIndex, curColIndex);
+ } else {
+ //合并指定的列号
+ for (int columnIndex : mergeColumnIndexArr) {
+ if (curColIndex == columnIndex) {
+ mergeWithPrevRow(writeSheetHolder, cell, curRowIndex, curColIndex);
+ }
+ }
+ }
+ }
+
+ /**
+ * 当前单元格向上合并
+ *
+ * @param writeSheetHolder
+ * @param cell 当前单元格
+ * @param curRowIndex 当前行
+ * @param curColIndex 当前列
+ */
+ private void mergeWithPrevRow(WriteSheetHolder writeSheetHolder, Cell cell, int curRowIndex, int curColIndex) {
+ // 当前行的第一个Cell
+ Cell curFirstCell = cell.getSheet().getRow(curRowIndex).getCell(0);
+ Object curFirstData = curFirstCell.getCellType() == CellType.STRING ? curFirstCell.getStringCellValue() : curFirstCell.getNumericCellValue();
+ // 上一行的第一个Cell
+ Cell preFirstCell = cell.getSheet().getRow(curRowIndex - 1).getCell(0);
+ Object preFirstData = preFirstCell.getCellType() == CellType.STRING ? preFirstCell.getStringCellValue() : preFirstCell.getNumericCellValue();
+
+ if (curFirstData.equals(preFirstData)) {
+ Object curData = cell.getCellType() == CellType.STRING ? cell.getStringCellValue() : cell.getNumericCellValue();
+ Cell preCell = cell.getSheet().getRow(curRowIndex - 1).getCell(curColIndex);
+ Object preData = preCell.getCellType() == CellType.STRING ? preCell.getStringCellValue() : preCell.getNumericCellValue();
+ // 将当前单元格数据与上一个单元格数据比较
+ Boolean dataBool = preData.equals(curData);
+ //此处需要注意:因为我是按照序号确定是否需要合并的,所以获取每一行第一列数据和上一行第一列数据进行比较,如果相等合并
+ Boolean bool = cell.getRow().getCell(0).getStringCellValue().equals(cell.getSheet().getRow(curRowIndex - 1).getCell(0).getStringCellValue());
+
+ if (!dataBool || !bool) {
+ return;
+ }
+ Sheet sheet = writeSheetHolder.getSheet();
+ List mergeRegions = sheet.getMergedRegions();
+ boolean isMerged = false;
+ for (int i = 0; i < mergeRegions.size() && !isMerged; i++) {
+ CellRangeAddress cellRangeAddr = mergeRegions.get(i);
+ // 若上一个单元格已经被合并,则先移出原有的合并单元,再重新添加合并单元
+ if (cellRangeAddr.isInRange(curRowIndex - 1, curColIndex)) {
+ sheet.removeMergedRegion(i);
+ cellRangeAddr.setLastRow(curRowIndex);
+ sheet.addMergedRegion(cellRangeAddr);
+ isMerged = true;
+ }
+ }
+ // 若上一个单元格未被合并,则新增合并单元
+ if (!isMerged) {
+ CellRangeAddress cellRangeAddress = new CellRangeAddress(curRowIndex - 1, curRowIndex, curColIndex, curColIndex);
+ sheet.addMergedRegion(cellRangeAddress);
+ }
+
+ }
+ }
+
+}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/FreezeAndFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/FreezeAndFilter.java
similarity index 95%
rename from epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/FreezeAndFilter.java
rename to epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/FreezeAndFilter.java
index 6b5d5e55c5..13ef447219 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/FreezeAndFilter.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/poi/excel/handler/FreezeAndFilter.java
@@ -1,4 +1,4 @@
-package com.epmet.commons.tools.utils.poi.excel;
+package com.epmet.commons.tools.utils.poi.excel.handler;
/**
* desc:easyExcel 冻结标题
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/group/ExportGroup.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/group/ExportGroup.java
new file mode 100644
index 0000000000..4b6f21b833
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/group/ExportGroup.java
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 2018 人人开源 All rights reserved.
+ *
+ * https://www.renren.io
+ *
+ * 版权所有,侵权必究!
+ */
+
+package com.epmet.commons.tools.validator.group;
+
+/**
+ * 导出 Group
+ *
+ * @author Mark sunlightcs@gmail.com
+ * @since 1.0.0
+ */
+public interface ExportGroup {
+
+}
diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml
index 4dd8d68d6d..68cc961d17 100644
--- a/epmet-gateway/pom.xml
+++ b/epmet-gateway/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.71
+ 0.3.76
com.epmet
epmet-cloud
@@ -233,6 +233,8 @@
lb://tduck-api
+
+ lb://pli-power-base-server
https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4
SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd
@@ -287,6 +289,7 @@
lb://epmet-demo-server
lb://oper-customize-server
+
lb://oper-crm-server
@@ -371,6 +374,8 @@
lb://epmet-openapi-adv-server
+
+ lb://pli-power-base-server
lb://tduck-api
diff --git a/epmet-module/data-aggregator/data-aggregator-server/pom.xml b/epmet-module/data-aggregator/data-aggregator-server/pom.xml
index 07e0fdd472..295e8807fd 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/pom.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/pom.xml
@@ -2,7 +2,7 @@
- 0.3.92
+ 0.3.122
data-aggregator
com.epmet
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
index 992ac08201..5dc796e562 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
@@ -98,10 +98,10 @@ public class GovOrgServiceImpl implements GovOrgService {
@Autowired
private OssFeignClient ossFeignClient;
@Autowired
- private EvaluationIndexService evaluationIndexService;
- @Autowired
private IcBuildingDao icBuildingDao;
@Autowired
+ private EvaluationIndexService evaluationIndexService;
+ @Autowired
private RedisUtils redisUtils;
@Autowired
private ExecutorService executorService;
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
index 3c4ea9f65c..ed8b7928dc 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
@@ -11,6 +11,7 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
+import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml
index bf0b867aca..b5c54347b9 100644
--- a/epmet-module/data-report/data-report-server/pom.xml
+++ b/epmet-module/data-report/data-report-server/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- 0.3.210
+ 0.3.214
data-report-server
diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml
index ae34e137d7..fe0579fe4c 100644
--- a/epmet-module/data-statistical/data-statistical-server/pom.xml
+++ b/epmet-module/data-statistical/data-statistical-server/pom.xml
@@ -2,7 +2,7 @@
- 0.3.345
+ 0.3.382
data-statistical
com.epmet
diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml
index 66254b24fa..53f153ae72 100644
--- a/epmet-module/epmet-common-service/common-service-server/pom.xml
+++ b/epmet-module/epmet-common-service/common-service-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.42
+ 0.3.46
com.epmet
epmet-common-service
diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml
index ac6e652732..e35c3b9862 100644
--- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml
+++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.0.20
+ 0.0.21
com.epmet
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
index 5c71e7bcf1..133cb6200c 100644
--- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
@@ -1,6 +1,7 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
+import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ActInfoDTO;
import com.epmet.dto.VolunteerInfoDTO;
@@ -103,4 +104,7 @@ public interface EpmetHeartOpenFeignClient {
*/
@GetMapping("/heart/serviceitem/initCustomer/{customerId}")
Result customerInit(@PathVariable(value = "customerId") String customerId);
+
+ @PostMapping("/heart/icresidemanddict/demandoption")
+ Result> getDemandOptions();
}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
index 28e1fc50b8..a0af921435 100644
--- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
@@ -1,6 +1,7 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
+import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ActInfoDTO;
@@ -102,4 +103,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli
public Result customerInit(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "customerInit", customerId);
}
+
+ @Override
+ public Result> getDemandOptions() {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getDemandOptions", null);
+ }
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
index b00759dd7d..305a91dd73 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.0.72
+ 0.0.81
com.epmet
epmet-heart
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
index 846e342657..0b5ee36509 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
@@ -67,6 +67,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.Optional;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml
index 613963e86c..39f62e7c18 100644
--- a/epmet-module/epmet-job/epmet-job-server/pom.xml
+++ b/epmet-module/epmet-job/epmet-job-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.47
+ 0.3.54
com.epmet
epmet-job
diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml
index 651c59858e..0f6851d107 100644
--- a/epmet-module/epmet-message/epmet-message-server/pom.xml
+++ b/epmet-module/epmet-message/epmet-message-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.57
+ 0.3.58
com.epmet
epmet-message
diff --git a/epmet-module/epmet-oss/epmet-oss-server/pom.xml b/epmet-module/epmet-oss/epmet-oss-server/pom.xml
index 2b30dd1932..4260920a27 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/pom.xml
+++ b/epmet-module/epmet-oss/epmet-oss-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.40
+ 0.3.42
com.epmet
epmet-oss
diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml
index fb0d932d3a..9131e80370 100644
--- a/epmet-module/epmet-point/epmet-point-server/pom.xml
+++ b/epmet-module/epmet-point/epmet-point-server/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- 0.0.63
+ 0.0.64
epmet-point
com.epmet
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/BlockChainProcessProjectFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/BlockChainProcessProjectFormDTO.java
index 4d6dfb09d0..0b2e2749cb 100644
--- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/BlockChainProcessProjectFormDTO.java
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/BlockChainProcessProjectFormDTO.java
@@ -13,6 +13,12 @@ import java.util.List;
public class BlockChainProcessProjectFormDTO implements Serializable {
private static final long serialVersionUID = -7316616101790749793L;
+
+ /**
+ * 项目基础信息
+ */
+ private BlockChainProjectFormDTO project;
+
@NotNull(message = "处理进展信息不能为空")
private BlockChainProjectProcessFormDTO process;
diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml
index 988e216ac4..b183b574cc 100644
--- a/epmet-module/epmet-third/epmet-third-server/pom.xml
+++ b/epmet-module/epmet-third/epmet-third-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.0.183
+ 0.0.185
com.epmet
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/BlockChainProjectServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/BlockChainProjectServiceImpl.java
index 36db95499d..c648097ab2 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/BlockChainProjectServiceImpl.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/BlockChainProjectServiceImpl.java
@@ -182,15 +182,20 @@ public class BlockChainProjectServiceImpl implements BlockChainProjectService, R
@Override
public void blockChainProcessProject(BlockChainProcessProjectFormDTO input) {
+ BlockChainProjectFormDTO project = input.getProject();
BlockChainProjectProcessFormDTO process = input.getProcess();
List assignedStaffs = input.getAssignedStaffs();
BlockChainProjectProcessAssignedStaffFormDTO handledStaff = input.getHandledStaff();
- fill(null, process, assignedStaffs, handledStaff);
+ fill(project, process, assignedStaffs, handledStaff);
String processString = JSON.toJSONString(process);
blockChainProducer.sendMsg(BlockChainProducer.TOPIC_PROJECT, BlockChainProducer.TAG_SEND_PROCESS, processString);
-
+
+ if (project != null) {
+ blockChainProducer.sendMsg(BlockChainProducer.TOPIC_PROJECT, BlockChainProducer.TAG_SEND_PROJECT, JSON.toJSONString(project));
+ }
+
if (assignedStaffs != null && assignedStaffs.size() > 0) {
String assignedStaffsString = JSON.toJSONString(assignedStaffs);
blockChainProducer.sendMsg(BlockChainProducer.TOPIC_PROJECT, BlockChainProducer.TAG_SEND_ASSIGNED_STAFFS, assignedStaffsString);
diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml
index 7420bdeb98..905d30c100 100644
--- a/epmet-module/gov-access/gov-access-server/pom.xml
+++ b/epmet-module/gov-access/gov-access-server/pom.xml
@@ -2,7 +2,7 @@
- 0.3.61
+ 0.3.66
gov-access
com.epmet
diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml
index 73dfaf0b75..6d5363b71c 100644
--- a/epmet-module/gov-grid/gov-grid-server/pom.xml
+++ b/epmet-module/gov-grid/gov-grid-server/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- 0.3.49
+ 0.3.50
com.epmet
gov-grid
diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml
index f9bb5ff161..0c895ffb74 100644
--- a/epmet-module/gov-issue/gov-issue-server/pom.xml
+++ b/epmet-module/gov-issue/gov-issue-server/pom.xml
@@ -2,7 +2,7 @@
- 0.3.100
+ 0.3.104
gov-issue
com.epmet
diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml
index ac966767b5..02d3a33905 100644
--- a/epmet-module/gov-mine/gov-mine-server/pom.xml
+++ b/epmet-module/gov-mine/gov-mine-server/pom.xml
@@ -2,7 +2,7 @@
- 0.3.47
+ 0.3.48
com.epmet
gov-mine
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
index 4d9aa11d17..b72e68c723 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
@@ -20,6 +20,7 @@ package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
+import java.math.BigDecimal;
import java.util.Date;
@@ -68,7 +69,7 @@ public class IcBuildingDTO implements Serializable {
/**
* 排序
*/
- private Integer sort;
+ private BigDecimal sort;
/**
* 总单元数
@@ -85,6 +86,16 @@ public class IcBuildingDTO implements Serializable {
*/
private Integer totalHouseNum;
+ /**
+ * 楼长姓名
+ */
+ private String buildingLeaderName;
+
+ /**
+ * 楼长电话
+ */
+ private String buildingLeaderMobile;
+
/**
* 中心点位:经度
*/
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java
index 2bec463b9b..f25311b2db 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java
@@ -17,9 +17,11 @@
package com.epmet.dto;
+import lombok.Data;
+
import java.io.Serializable;
+import java.math.BigDecimal;
import java.util.Date;
-import lombok.Data;
/**
@@ -47,6 +49,7 @@ public class IcHouseDTO implements Serializable {
* 小区id
*/
private String neighborHoodId;
+ private String neighborHoodName;
/**
* 片区id,neighbor_hood_part.id,可为空。
@@ -57,12 +60,12 @@ public class IcHouseDTO implements Serializable {
* 所属楼栋id
*/
private String buildingId;
-
+ private String buildingName;
/**
* 所属单元id
*/
private String buildingUnitId;
-
+ private String unitName;
/**
* 房屋名字后台插入时生成
*/
@@ -77,17 +80,17 @@ public class IcHouseDTO implements Serializable {
* 房屋类型,这里存储字典value就可以
*/
private String houseType;
-
+ private String houseTypeName;
/**
* 存储字典value
*/
private String purpose;
-
+ private String purposeName;
/**
* 1出租;0未出租
*/
private Integer rentFlag;
-
+ private String rentName;
/**
* 房主姓名
*/
@@ -103,6 +106,11 @@ public class IcHouseDTO implements Serializable {
*/
private String ownerIdCard;
+ /**
+ * 排序
+ */
+ private BigDecimal sort;
+
/**
* 删除标识 0未删除、1已删除
*/
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
index c18766b89e..e91bf8e3a3 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java
@@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
+import java.math.BigDecimal;
/**
* @Author zxc
@@ -45,6 +46,16 @@ public class ImportGeneralDTO implements Serializable {
private String buildingName;
private String buildingId;
+ /**
+ * 楼长姓名
+ */
+ private String buildingLeaderName;
+
+ /**
+ * 楼长电话
+ */
+ private String buildingLeaderMobile;
+
/**
* 房屋类型
*/
@@ -148,8 +159,18 @@ public class ImportGeneralDTO implements Serializable {
*/
private Boolean buildingExistStatus = false;
+ /**
+ * 楼栋单元数小于当前值时为true
+ */
+ private Boolean buildingUnitNumStatus = false;
+
/**
* 小区重复状态
*/
private Boolean neighborHoodExistStatus = false;
+
+ /**
+ * 排序
+ */
+ private BigDecimal sort;
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java
new file mode 100644
index 0000000000..6d3d8f433a
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java
@@ -0,0 +1,29 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author sun
+ * @dscription 【人房】房屋总数饼图-接口入参
+ */
+@Data
+public class HouseChartFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 405799151478155056L;
+
+ /**
+ * 组织、网格、小区Id
+ */
+ private String orgId;
+ /**
+ * 组织、网格、小区类型 agency grid village
+ */
+ private String orgType;
+
+ //token这信息
+ private String customerId;
+ private String userId;
+
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBuildingListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBuildingListFormDTO.java
index 249a7d4c42..18aa756a8c 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBuildingListFormDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBuildingListFormDTO.java
@@ -26,4 +26,9 @@ public class IcBuildingListFormDTO extends PageFormDTO {
* 房主电话
*/
private String ownerPhone;
+
+ /**
+ * asc:正序,desc:倒序
+ */
+ private String sortType;
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java
index e476297ec6..58655da002 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java
@@ -17,6 +17,7 @@
package com.epmet.dto.form;
+import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@@ -24,6 +25,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
+import java.math.BigDecimal;
@Data
@@ -85,7 +87,7 @@ public class IcBulidingAddFormDTO implements Serializable {
* 排序
*/
@NotNull(message = "排序不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
- private Integer sort = 0;
+ private BigDecimal sort = NumConstant.ZERO_DECIMAL;
/**
* 总单元数
@@ -123,6 +125,16 @@ public class IcBulidingAddFormDTO implements Serializable {
private String latitude;
+ /**
+ * 楼长姓名
+ */
+ private String buildingLeaderName;
+
+ /**
+ * 楼长电话
+ */
+ private String buildingLeaderMobile;
+
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java
index b05d70d8aa..440b2323bb 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseAddFormDTO.java
@@ -17,12 +17,14 @@
package com.epmet.dto.form;
+import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
+import java.math.BigDecimal;
@Data
@@ -99,4 +101,6 @@ public class IcHouseAddFormDTO implements Serializable {
*/
private String ownerIdCard;
+ private BigDecimal sort = NumConstant.ZERO_DECIMAL;
+
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java
index 7fdbf31cc5..b57f0bdadc 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseListFormDTO.java
@@ -65,5 +65,9 @@ public class IcHouseListFormDTO extends PageFormDTO {
*/
private String keyword;
+ /**
+ * asc:正序,desc:倒序
+ */
+ private String sortType;
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateSortFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateSortFormDTO.java
new file mode 100644
index 0000000000..b34d8a7176
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateSortFormDTO.java
@@ -0,0 +1,32 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/5 17:40
+ * @DESC
+ */
+@Data
+public class UpdateSortFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 2348273552712227952L;
+ public interface UpdateSortForm{}
+
+ @NotBlank(message = "id不能为空",groups = UpdateSortForm.class)
+ private String id;
+
+ @NotNull(message = "sort不能为空",groups = UpdateSortForm.class)
+ private BigDecimal sort;
+
+ /**
+ * house:房屋,building:楼栋
+ */
+ @NotBlank(message = "type不能为空",groups = UpdateSortForm.class)
+ private String type;
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java
new file mode 100644
index 0000000000..7a4e974162
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java
@@ -0,0 +1,57 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author sun
+ * @dscription 【人房】房屋总数饼图-接口返参
+ */
+@Data
+public class HouseChartResultDTO implements Serializable {
+ /**
+ * 组织、网格、小区Id
+ */
+ private String orgId;
+ /**
+ * 组织、网格、小区类型 agency grid village
+ */
+ private String orgType;
+ /**
+ * 房屋总数
+ */
+ private Integer houseTotal = 0;
+ /**
+ * 房屋自住总数
+ */
+ private Integer zzHouseTotal = 0;
+ /**
+ * 房屋自住总数占比(保留两位小数,带百分号的)
+ */
+ private Double zzHouseRatio = 0.0;
+ /**
+ * 房屋常住总数
+ */
+ private Integer czHouseTotal = 0;
+ /**
+ * 房屋常住总数占比(保留两位小数,带百分号的)
+ */
+ private Double czHouseRatio = 0.0;
+ /**
+ * 房屋闲置总数
+ */
+ private Integer xzHouseTotal = 0;
+ /**
+ * 房屋闲置总数占比(保留两位小数,带百分号的)
+ */
+ private Double xzHouseRatio = 0.0;
+
+ @JsonIgnore
+ private Integer num;
+ //1:出租 0:自住 2:闲置
+ @JsonIgnore
+ private Integer rentFlag;
+
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseListResultDTO.java
index a63f415e94..c3ae6f07e1 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseListResultDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseListResultDTO.java
@@ -18,6 +18,7 @@ public class HouseListResultDTO implements Serializable {
private static final long serialVersionUID = 2063032844842070847L;
private String houseId;
private String houseName;
+ private String rentFlag;
private List categoryList;
@NoArgsConstructor
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java
index ebaf6ca58e..1d95bd3838 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java
@@ -17,10 +17,19 @@ public class IcBuildingListResultDTO extends PageFormDTO {
private static final long serialVersionUID = -8277921228438123299L;
private String gridName;
+
+ /**
+ * 设计的房屋总数,就是这个楼上实际有几个
+ */
private Integer totalHouseNum;
+
+ /**
+ * 实际录入房屋总数
+ */
+ private Integer realTotalHouseNum;
private String latitude;
private String agencyId;
- private Integer sort;
+ private Double sort;
private String agencyName;
private String buildingId;
private String buildingName;
@@ -32,4 +41,14 @@ public class IcBuildingListResultDTO extends PageFormDTO {
private Integer totalUnitNum;
private String longitude;
private String buildingType;
+
+ /**
+ * 楼长姓名
+ */
+ private String buildingLeaderName;
+
+ /**
+ * 楼长电话
+ */
+ private String buildingLeaderMobile;
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java
index 3d12115f05..93b9b9818e 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcHouseListResultDTO.java
@@ -79,7 +79,7 @@ public class IcHouseListResultDTO implements Serializable {
*/
private String ownerIdCard;
-
+ private Double sort;
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java
new file mode 100644
index 0000000000..905dca051f
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java
@@ -0,0 +1,74 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author sun
+ * @dscription 【人房】下级人房概览列表-接口返参
+ */
+@Data
+public class SubUserHouseListResultDTO implements Serializable {
+ /**
+ * 组织、网格、小区Id
+ */
+ private String orgId;
+ /**
+ * 组织、网格、小区名称
+ */
+ private String orgName;
+ /**
+ * 组织、网格、小区类型 agency grid village
+ */
+ private String orgType;
+ /**
+ * 房屋总数
+ */
+ private Integer houseTotal = 0;
+ /**
+ * 房屋自住总数
+ */
+ private Integer zzHouseTotal = 0;
+ /**
+ * 房屋自住总数占比(保留两位小数,带百分号的)
+ */
+ private Double zzHouseRatio = 0.0;
+ /**
+ * 房屋常住总数
+ */
+ private Integer czHouseTotal = 0;
+ /**
+ * 房屋常住总数占比(保留两位小数,带百分号的)
+ */
+ private Double czHouseRatio = 0.0;
+ /**
+ * 房屋闲置总数
+ */
+ private Integer xzHouseTotal = 0;
+ /**
+ * 房屋闲置总数占比(保留两位小数,带百分号的)
+ */
+ private Double xzHouseRatio = 0.0;
+ /**
+ * 居民总数
+ */
+ private Integer userTotal = 0;
+ /**
+ * 常住人口总数
+ */
+ private Integer czUserTotal = 0;
+ /**
+ * 常住人口占比(保留两位小数,带百分号的)
+ */
+ private Double czUserRatio = 0.0;
+ /**
+ * 流动人口总数
+ */
+ private Integer ldUserTotal = 0;
+ /**
+ * 流动人口占比(保留两位小数,带百分号的)
+ */
+ private Double ldUserRatio = 0.0;
+
+}
diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml
index a41434ba6c..179ff2881b 100644
--- a/epmet-module/gov-org/gov-org-server/pom.xml
+++ b/epmet-module/gov-org/gov-org-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.3.156
+ 0.3.186
com.epmet
gov-org
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
index 49581cf63c..f9be4267e8 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
@@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletRequest;
*/
@Aspect
@Component
-@Order(0)
+@Order(1)
public class RequestLogAspect extends BaseRequestLogAspect {
@Override
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java
index 2c764b63db..0156f0e042 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java
@@ -8,6 +8,7 @@ package com.epmet.constant;
public interface ImportErrorMsgConstants {
String EXIST_ERROR = "数据已存在";
+ String UNIT_ERROR = "暂不支持单元数减小";
String DOCUMENT_EXIST_ERROR = "文件中存在重复数据";
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
index 7be2f59dac..3e625e88c2 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
@@ -19,6 +19,7 @@ package com.epmet.controller;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
@@ -31,10 +32,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.form.*;
-import com.epmet.dto.result.HouseInfoDTO;
-import com.epmet.dto.result.IcHouseListResultDTO;
-import com.epmet.dto.result.ImportTaskCommonResultDTO;
-import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.HouseService;
@@ -47,7 +45,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
/**
@@ -69,8 +70,9 @@ public class HouseController implements ResultDataResolver {
@Autowired
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient;
-
@PostMapping("houselist")
+ @MaskResponse(fieldNames = {"ownerIdCard", "ownerPhone"},
+ fieldsMaskType = { MaskResponse.MASK_TYPE_ID_CARD, MaskResponse.MASK_TYPE_MOBILE })
public Result> houseList(@LoginUser TokenDto loginUser, @RequestBody IcHouseListFormDTO formDTO) {
//效验数据
LoginUserDetailsResultDTO loginUserDetail = getLoginUserDetailsResultDTO(loginUser, "【查询房屋】查询当前staff所在组织信息失败");
@@ -269,4 +271,39 @@ public class HouseController implements ResultDataResolver {
}
return new Result().ok(houseService.getHouseInfoDTO(tokenDto.getCustomerId(), houseId));
}
+
+ /**
+ * @Author sun
+ * @Description 【人房】房屋总数饼图
+ **/
+ @PostMapping("housechart")
+ public Result houseChart(@LoginUser TokenDto tokenDto, @RequestBody HouseChartFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ return new Result().ok(houseService.houseChart(formDTO));
+ }
+
+ /**
+ * @Author sun
+ * @Description 【人房】下级人房概览列表
+ **/
+ @PostMapping("subuserhouselist")
+ public Result> subUserHouseList(@LoginUser TokenDto tokenDto, @RequestBody HouseChartFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ return new Result>().ok(houseService.subUserHouseList(formDTO));
+ }
+
+ /**
+ * Desc: 根据类型更新排序
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/6 08:50
+ */
+ @PostMapping("update-sort")
+ public Result updateSort(@RequestBody UpdateSortFormDTO formDTO){
+ houseService.updateSort(formDTO);
+ return new Result();
+ }
+
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java
index 627b5a5d8b..5100759cc6 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java
@@ -45,6 +45,7 @@ import com.epmet.service.IcNeighborHoodService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
index 5c87d4ec46..3fd205a48d 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
@@ -180,4 +180,20 @@ public interface IcBuildingDao extends BaseDao {
*/
void allUpdateHouseNum(@Param("nums") List nums);
+ /**
+ * Desc: 更新楼栋信息
+ * @param info
+ * @author zxc
+ * @date 2022/4/27 13:29
+ */
+ void updateBuilding(ImportGeneralDTO info);
+
+ /**
+ * Desc: 查询楼栋下单元数
+ * @param buildingId
+ * @author zxc
+ * @date 2022/4/27 14:41
+ */
+ Integer selectUnitCount(@Param("buildingId")String buildingId);
+
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
index 8c17130cd9..05d4c86990 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
@@ -3,10 +3,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.form.IcHouseListFormDTO;
-import com.epmet.dto.result.HouseInfoDTO;
-import com.epmet.dto.result.HousesNameResultDTO;
-import com.epmet.dto.result.IcHouseListResultDTO;
-import com.epmet.dto.result.NeighborHoodManageDelResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.entity.IcHouseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -91,4 +88,9 @@ public interface IcHouseDao extends BaseDao {
*/
void houseUpdateHouseName(@Param("buildingId")String buildingId);
+ /**
+ * @Author sun
+ * @Description 【人房】房屋总数饼图
+ **/
+ List houseChart(@Param("orgId") String orgId, @Param("orgType") String orgType);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java
index d2adb6c87f..6238d0f303 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java
@@ -18,6 +18,9 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.ImportGeneralDTO;
+import com.epmet.dto.NeighborHoodAndManagementDTO;
+import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.form.IcNeighborHoodListFormDTO;
import com.epmet.dto.result.IcNeighborHoodResultDTO;
import com.epmet.entity.IcHouseEntity;
@@ -59,4 +62,29 @@ public interface IcNeighborHoodDao extends BaseDao {
*/
List selectNeighborhoodNameByNames(@Param("names")List names,@Param("customerId") String customerId);
+ /**
+ * Desc: 更新小区详细地址和备注
+ * @param needUpdateList
+ * @author zxc
+ * @date 2022/4/27 09:59
+ */
+ void updateNeighborHood(@Param("list") List needUpdateList);
+
+ /**
+ * Desc: 更新小区关系表
+ * @param updateNeighborHoodAndManagement
+ * @author zxc
+ * @date 2022/4/27 10:33
+ */
+ void neighborHoodPropertyUpdate(@Param("list")List updateNeighborHoodAndManagement);
+
+ List selectNeighborList(@Param("gridId")String gridId);
+
+ /**
+ * Desc: 删除物业关系
+ * @param neighborHoodIds
+ * @author zxc
+ * @date 2022/4/28 09:10
+ */
+ void delProperty(@Param("neighborHoodIds")List neighborHoodIds);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java
index b4d4811caa..1b0535f803 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java
@@ -22,6 +22,8 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import java.math.BigDecimal;
+
/**
* 楼栋信息
*
@@ -63,7 +65,7 @@ public class IcBuildingEntity extends BaseEpmetEntity {
/**
* 排序
*/
- private Integer sort;
+ private BigDecimal sort;
/**
* 总单元数
@@ -80,6 +82,16 @@ public class IcBuildingEntity extends BaseEpmetEntity {
*/
private Integer totalHouseNum;
+ /**
+ * 楼长姓名
+ */
+ private String buildingLeaderName;
+
+ /**
+ * 楼长电话
+ */
+ private String buildingLeaderMobile;
+
/**
* 中心点位:经度
*/
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
index 4861c69271..817c783f47 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
@@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import java.math.BigDecimal;
import java.util.Date;
/**
@@ -103,4 +104,9 @@ public class IcHouseEntity extends BaseEpmetEntity {
*/
private String ownerIdCard;
+ /**
+ * 排序
+ */
+ private BigDecimal sort;
+
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java
index ed1afb786a..dbd7f8239b 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java
@@ -124,4 +124,10 @@ public class IcBuildingExcel extends ExcelVerifyInfo implements Serializable {
@Excel(name = "户数")
@NotNull(message = "不能为空")
private Integer totalHouseNum;
+
+ @Excel(name = "楼长姓名")
+ private String buildingLeaderName;
+
+ @Excel(name = "楼长电话")
+ private String buildingLeaderMobile;
}
\ No newline at end of file
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 dac7c09015..2339587a1f 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
@@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
+import java.math.BigDecimal;
+
/**
* @Author zxc
* @DateTime 2022/2/15 10:07 上午
@@ -36,6 +38,15 @@ public class BuildingInfoModel {
@ExcelProperty(value = "户数")
private Integer totalHouseNum;
+ @ExcelProperty(value = "楼长姓名")
+ private String buildingLeaderName;
+
+ @ExcelProperty(value = "楼长电话")
+ private String buildingLeaderMobile;
+
+ @ExcelProperty(value = "排序")
+ private BigDecimal sort;
+
@ExcelIgnore
private Integer num;
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseInfoModel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseInfoModel.java
index 740892f4cd..0e5edb21f3 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseInfoModel.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseInfoModel.java
@@ -5,6 +5,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
+import java.math.BigDecimal;
+
/**
* @Author zxc
* @DateTime 2022/2/13 1:26 下午
@@ -50,6 +52,9 @@ public class HouseInfoModel {
@ExcelProperty(value = "房主身份证")
private String ownerIdCard;
+ @ExcelProperty(value = "排序")
+ private BigDecimal sort;
+
@ExcelIgnore
private Integer num;
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 cc0bc625ca..3b13b608a8 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
@@ -24,6 +24,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -117,6 +119,11 @@ public class ImportBuildingInfoListener extends AnalysisEventListener importGeneralDTOS = groupByStatus.get(false);
if (!CollectionUtils.isEmpty(importGeneralDTOS)){
List importInfo = neighborHoodService.getImportInfo(formDTO, importGeneralDTOS);
- Map> groupByBuildingExistStatus = importInfo.stream().collect(Collectors.groupingBy(ImportGeneralDTO::getBuildingExistStatus));
- List existList = groupByBuildingExistStatus.get(true);
- if (!CollectionUtils.isEmpty(existList)){
- existList.forEach(e -> {
+ /*Map> groupByBuildingExistStatus = importInfo.stream().collect(Collectors.groupingBy(ImportGeneralDTO::getBuildingExistStatus));
+ List existList = groupByBuildingExistStatus.get(true);*/
+ Map> collect = importInfo.stream().collect(Collectors.groupingBy(ImportGeneralDTO::getBuildingUnitNumStatus));
+ List unitNumList = collect.get(true);
+ if (!CollectionUtils.isEmpty(unitNumList)){
+ unitNumList.forEach(e -> {
if (!e.getAddStatus()){
nums.add(e.getNum());
BuildingInfoModel buildingInfoModel = ConvertUtils.sourceToTarget(e, BuildingInfoModel.class);
- disposeErrorMsg(buildingInfoModel,ImportErrorMsgConstants.EXIST_ERROR);
+ disposeErrorMsg(buildingInfoModel,ImportErrorMsgConstants.UNIT_ERROR);
e.setAddStatus(true);
}
});
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
index 08eb31a9cc..dad231ed5c 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java
@@ -30,10 +30,14 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.io.IOException;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static com.epmet.constant.ImportErrorMsgConstants.*;
@@ -170,7 +174,11 @@ public class ImportHouseInfoListener extends AnalysisEventListener needDisposeList = new ArrayList<>();
List needInsertList = new ArrayList<>();
+ List needUpdateList = new ArrayList<>();
String gridName = null;
String agencyName = null;
@@ -128,7 +129,7 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener groupByAllName = needDisposeList.stream().collect(Collectors.groupingBy(
@@ -151,8 +152,11 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener> groupByStatus = needDisposeList.stream().collect(Collectors.groupingBy(ImportGeneralDTO::getExistStatus));
List importGeneralDTOS = groupByStatus.get(false);
- if (!CollectionUtils.isEmpty(importGeneralDTOS)){
- List importInfo = neighborHoodService.getImportInfo(formDTO, importGeneralDTOS);
+ if (!CollectionUtils.isEmpty(importGeneralDTOS) || !CollectionUtils.isEmpty(needUpdateList)){
+ List importInfo = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(importGeneralDTOS)){
+ importInfo = neighborHoodService.getImportInfo(formDTO, importGeneralDTOS);
+ }
Map> groupByBuildingExistStatus = importInfo.stream().collect(Collectors.groupingBy(ImportGeneralDTO::getNeighborHoodExistStatus));
List existList = groupByBuildingExistStatus.get(true);
if (!CollectionUtils.isEmpty(existList)){
@@ -165,7 +169,16 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener notExistList = groupByBuildingExistStatus.get(false);
+ List notExistList = new ArrayList<>();
+ List notExistListFalse = groupByBuildingExistStatus.get(false);
+ if (!CollectionUtils.isEmpty(notExistListFalse)){
+ notExistList.addAll(notExistListFalse);
+ }
+ if (!CollectionUtils.isEmpty(needUpdateList)){
+ notExistList.addAll(needUpdateList);
+ // 更新详细地址和备注
+ neighborHoodService.updateNeighborHood(needUpdateList);
+ }
if (!CollectionUtils.isEmpty(notExistList)){
// 物业表插入
List propertyNames = notExistList.stream().filter(n -> StringUtils.isNotBlank(n.getPropertyName())).map(m -> m.getPropertyName()).distinct().collect(Collectors.toList());
@@ -184,15 +197,26 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener neighborHoodAndManagementDTOS = ConvertUtils.sourceToTarget(notExistList, NeighborHoodAndManagementDTO.class);
+ List neighborHoodAndManagementDTOS = ConvertUtils.sourceToTarget(notExistListFalse, NeighborHoodAndManagementDTO.class);
+ List updateNeighborHoodAndManagement = ConvertUtils.sourceToTarget(needUpdateList, NeighborHoodAndManagementDTO.class);
List propertyManagementInfos = propertyManagementDao.selectIdByName(propertyNames);
- neighborHoodAndManagementDTOS.forEach(n -> propertyManagementInfos.stream().filter(p -> p.getName().equals(n.getPropertyName()))
- .forEach(p -> {
- n.setPropertyId(p.getId());
- n.setNeighborHoodId(n.getNeighborHoodId());
- }));
+ if (!CollectionUtils.isEmpty(neighborHoodAndManagementDTOS)){
+ neighborHoodAndManagementDTOS.forEach(n -> propertyManagementInfos.stream().filter(p -> p.getName().equals(n.getPropertyName()))
+ .forEach(p -> {
+ n.setPropertyId(p.getId());
+ n.setNeighborHoodId(n.getNeighborHoodId());
+ }));
+ }
+ if (!CollectionUtils.isEmpty(updateNeighborHoodAndManagement)){
+ updateNeighborHoodAndManagement.forEach(n -> propertyManagementInfos.stream().filter(p -> p.getName().equals(n.getPropertyName()))
+ .forEach(p -> {
+ n.setPropertyId(p.getId());
+ n.setNeighborHoodId(n.getNeighborHoodId());
+ }));
+ }
List icNeighborHoodPropertyEntities = ConvertUtils.sourceToTarget(neighborHoodAndManagementDTOS, IcNeighborHoodPropertyEntity.class);
neighborHoodService.neighborHoodPropertyInsert(icNeighborHoodPropertyEntities);
+ neighborHoodService.neighborHoodPropertyUpdate(updateNeighborHoodAndManagement);
}
}
}
@@ -200,6 +224,7 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener();
needInsertList = new ArrayList<>();
+ needUpdateList = new ArrayList<>();
gridName = null;
agencyName = null;
gridInfos = null;
@@ -297,9 +322,13 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener subUserHouseList(HouseChartFormDTO formDTO);
+
+ /**
+ * Desc: 根据类型更新排序
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/6 08:50
+ */
+ void updateSort(UpdateSortFormDTO formDTO);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java
index b7279e59ad..0822d4805b 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java
@@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcBuildingDTO;
+import com.epmet.dto.ImportGeneralDTO;
import com.epmet.entity.IcBuildingEntity;
import java.util.List;
@@ -113,4 +114,12 @@ public interface IcBuildingService extends BaseService {
* @Date 2022/2/14 15:19
*/
IcBuildingDTO getBuildingInfo(String neighborHoodId, String buildingName);
+
+ /**
+ * Desc: 更新楼栋信息
+ * @param info
+ * @author zxc
+ * @date 2022/4/27 13:29
+ */
+ void updateBuilding(ImportGeneralDTO info);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java
index fb97d3add3..087ab03441 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java
@@ -23,6 +23,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.ImportGeneralDTO;
+import com.epmet.dto.NeighborHoodAndManagementDTO;
import com.epmet.dto.form.IcNeighborHoodAddFormDTO;
import com.epmet.dto.form.ImportInfoFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
@@ -155,4 +156,20 @@ public interface IcNeighborHoodService extends BaseService
* @return
*/
PageData openPage(IcNeighborHoodAddFormDTO params);
+
+ /**
+ * Desc: 更新小区
+ * @param needUpdateList
+ * @author zxc
+ * @date 2022/4/27 09:59
+ */
+ void updateNeighborHood(List needUpdateList);
+
+ /**
+ * Desc: 更新小区关系表
+ * @param updateNeighborHoodAndManagement
+ * @author zxc
+ * @date 2022/4/27 10:33
+ */
+ void neighborHoodPropertyUpdate(List updateNeighborHoodAndManagement);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
index 3866a9c6ad..ceab6ed43d 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
@@ -157,7 +157,10 @@ public class BuildingServiceImpl implements BuildingService {
//2.获取组织所在网格
List agencyIdList = customerAgencyList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList());
// agencyIdList.add(customerAgency.getId());
- List customerGridList = customerGridDao.selectList(new QueryWrapper().lambda().in(CustomerGridEntity::getPid, agencyIdList));
+ LambdaQueryWrapper gridWrapper = new LambdaQueryWrapper<>();
+ gridWrapper.in(CustomerGridEntity::getPid, agencyIdList);
+ gridWrapper.last("ORDER BY CAST(GRID_NAME AS SIGNED),CONVERT(GRID_NAME using gbk)");
+ List customerGridList = customerGridDao.selectList(gridWrapper);
if (CollectionUtils.isEmpty(customerGridList)) {
return covertToTree(customerAgency, agencyList);
@@ -182,7 +185,7 @@ public class BuildingServiceImpl implements BuildingService {
List gridIdList = customerGridList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper queryWrapper = new QueryWrapper().lambda()
.in(IcNeighborHoodEntity::getGridId, gridIdList)
- .orderByAsc(IcNeighborHoodEntity::getCreatedTime);
+ .last("ORDER BY CAST(NEIGHBOR_HOOD_NAME AS SIGNED),CONVERT(NEIGHBOR_HOOD_NAME using gbk)");
List icNeighborHoodList = icNeighborHoodDao.selectList(queryWrapper);
if (CollectionUtils.isEmpty(icNeighborHoodList)) {
agencyList.addAll(gridList);
@@ -206,7 +209,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)
- .orderByAsc(IcBuildingEntity::getCreatedTime, IcBuildingEntity::getBuildingName);
+ .last("ORDER BY SORT, CAST(BUILDING_NAME AS SIGNED),CONVERT(BUILDING_NAME USING gbk)");
List icBuildingList = icBuildingDao.selectList(buildingQueryWrapper);
if (CollectionUtils.isEmpty(neighborHoodIdList)) {
@@ -430,14 +433,11 @@ public class BuildingServiceImpl implements BuildingService {
if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(), EpmetErrorCode.BUILDING_NAME_EXITED.getMsg());
}
-
IcBuildingDTO icBuilding = icBuildingService.get(formDTO.getBuildingId());
-
if (!icBuilding.getNeighborHoodId().equals(formDTO.getNeighborHoodId())) {
//更新对应房屋小区id
List icHouseEntities = icHouseDao.selectList(new QueryWrapper().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId()));
if (!CollectionUtils.isEmpty(icHouseEntities)) {
- //
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(), "楼栋单元下存在房屋,无法更新");
}
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
index 75efdc6e38..2c2101e5b3 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
@@ -6,6 +6,7 @@ import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
+import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
@@ -13,24 +14,16 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
+import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
import com.epmet.constants.ImportTaskConstants;
-import com.epmet.dao.IcBuildingDao;
-import com.epmet.dao.IcBuildingUnitDao;
-import com.epmet.dao.IcHouseDao;
-import com.epmet.dao.IcNeighborHoodDao;
-import com.epmet.dto.CustomerAgencyDTO;
-import com.epmet.dto.IcBuildingDTO;
-import com.epmet.dto.IcBuildingUnitDTO;
-import com.epmet.dto.IcHouseDTO;
+import com.epmet.dao.*;
+import com.epmet.dto.*;
import com.epmet.dto.form.*;
-import com.epmet.dto.result.HouseInfoDTO;
-import com.epmet.dto.result.IcHouseListResultDTO;
-import com.epmet.dto.result.ImportTaskCommonResultDTO;
-import com.epmet.dto.result.NeighborHoodManageDelResultDTO;
+import com.epmet.dto.result.*;
import com.epmet.entity.IcHouseEntity;
import com.epmet.enums.HousePurposeEnums;
import com.epmet.enums.HouseTypeEnums;
@@ -54,8 +47,10 @@ import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
+import java.text.NumberFormat;
import java.util.*;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@Slf4j
@@ -90,9 +85,12 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient;
@Autowired
private ExecutorService executorService;
-
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+ @Autowired
+ private CustomerAgencyDao customerAgencyDao;
+ @Autowired
+ private CustomerGridDao customerGridDao;
@Override
@@ -139,6 +137,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
//设置
icHouseDTO.setHouseName(getHouseName(formDTO));
icHouseService.update(icHouseDTO);
+ //删除房屋缓存
+ icHouseRedis.delHouseInfo(formDTO.getHouseId(),customerId);
}
@Override
@@ -356,4 +356,177 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
}
return houseInfo;
}
+
+ /**
+ * @Author sun
+ * @Description 【人房】房屋总数饼图
+ **/
+ @Override
+ public HouseChartResultDTO houseChart(HouseChartFormDTO formDTO) {
+ HouseChartResultDTO resultDTO = new HouseChartResultDTO();
+ //计算百分比使用,保留小数点后两位
+ NumberFormat numberFormat = NumberFormat.getInstance();
+ numberFormat.setMaximumFractionDigits(NumConstant.TWO);
+ //1.判断入参是否有值,没有值则赋值当前工作人员缓存中所属组织信息
+ if (StringUtils.isEmpty(formDTO.getOrgId())) {
+ //2.获取工作人员缓存信息
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
+ if (null == staffInfo) {
+ throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
+ }
+ formDTO.setOrgId(staffInfo.getAgencyId());
+ formDTO.setOrgType("agency");
+ }
+ //2.根据入参值查询对应的房屋统计数据
+ List list = icHouseDao.houseChart(formDTO.getOrgId(), formDTO.getOrgType());
+ //3.汇总数据
+ AtomicInteger houseTotal = new AtomicInteger();
+ list.forEach(l -> {
+ houseTotal.addAndGet(l.getNum());
+ if (l.getRentFlag() == 0) {
+ resultDTO.setZzHouseTotal(l.getNum());
+ } else if (l.getRentFlag() == 1) {
+ resultDTO.setCzHouseTotal(l.getNum());
+ } else {
+ resultDTO.setXzHouseTotal(l.getNum());
+ }
+ });
+ resultDTO.setHouseTotal(houseTotal.get());
+ 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;
+ }
+
+ /**
+ * @Author sun
+ * @Description 【人房】下级人房概览列表
+ **/
+ @Override
+ public List subUserHouseList(HouseChartFormDTO formDTO) {
+ List resultList = new ArrayList<>();
+ //1.判断入参没值的赋值当前工作人员缓存所属组织信息
+ if (StringUtils.isEmpty(formDTO.getOrgId())) {
+ //获取工作人员缓存信息
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
+ if (null == staffInfo) {
+ throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
+ }
+ formDTO.setOrgId(staffInfo.getAgencyId());
+ formDTO.setOrgType("agency");
+ }
+ if ("village".equals(formDTO.getOrgType())) {
+ return new ArrayList<>();
+ }
+ //2.根据入参值查询直属下级列表(组织、网格、小区列表)
+ List idList = new ArrayList<>();
+ Map map = new HashMap<>();
+ String orgType = "";
+ if ("agency".equals(formDTO.getOrgType())) {
+ //获取组织缓存,判断组织级别
+ AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(formDTO.getOrgId());
+ if (null == agencyInfo) {
+ throw new RenException(String.format("查询组织信息失败%s", formDTO.getOrgId()));
+ }
+ //直属下级网格列表
+ if ("community".equals(agencyInfo.getLevel())) {
+ orgType = "grid";
+ List list = customerGridDao.selectGridList(formDTO.getOrgId());
+ idList = list.stream().map(GridListResultDTO::getGridId).collect(Collectors.toList());
+ map = list.stream().collect(Collectors.toMap(GridListResultDTO::getGridId, GridListResultDTO::getGridName, (k1, k2) -> k1));
+ } else {
+ //直属下级组织列表
+ orgType = "agency";
+ List list = customerAgencyDao.selectAgencyList(formDTO.getOrgId());
+ idList = list.stream().map(AgencyListResultDTO::getAgencyId).collect(Collectors.toList());
+ map = list.stream().collect(Collectors.toMap(AgencyListResultDTO::getAgencyId, AgencyListResultDTO::getAgencyName, (k1, k2) -> k1));
+ }
+ } else if ("grid".equals(formDTO.getOrgType())) {
+ //网格直属小区列表
+ orgType = "village";
+ List list = icNeighborHoodDao.selectNeighborList(formDTO.getOrgId());
+ idList = list.stream().map(IcNeighborHoodDTO::getId).collect(Collectors.toList());
+ map = list.stream().collect(Collectors.toMap(IcNeighborHoodDTO::getId, IcNeighborHoodDTO::getNeighborHoodName, (k1, k2) -> k1));
+ }
+
+ //3.分别查询直属下级列表的房屋、居民统计数据
+ resultList = houseUserChartList(idList, map, orgType);
+
+ return resultList;
+ }
+
+ /**
+ * Desc: 根据类型更新排序
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/6 08:50
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void updateSort(UpdateSortFormDTO formDTO) {
+ if (formDTO.getType().equals(CustomerGridConstant.HOUSE)){
+ IcHouseDTO icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class);
+ icHouseService.update(icHouseDTO);
+ }else if(formDTO.getType().equals(CustomerGridConstant.BUILDING)){
+ IcBuildingDTO icBuildingDTO = ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class);
+ icBuildingService.update(icBuildingDTO);
+ }
+ }
+
+ /**
+ * @Author sun
+ * @Description 【人房】房屋、居民统计列表数据
+ **/
+ private List houseUserChartList(List idList, Map map, String orgType) {
+ List list = new ArrayList<>();
+ //1.直属下级列表的房屋数据
+ List houseList = new ArrayList<>();
+ HouseChartFormDTO houseDTO = new HouseChartFormDTO();
+ houseDTO.setOrgType(orgType);
+ for (String id : idList) {
+ houseDTO.setOrgId(id);
+ houseList.add(houseChart(houseDTO));
+ }
+ //2.直属下级列表的居民数据
+ UserChartFormDTO userDTO = new UserChartFormDTO();
+ userDTO.setOrgType(orgType);
+ userDTO.setIdList(idList);
+ Result> userResult = epmetUserOpenFeignClient.userChartList(userDTO);
+ if (!userResult.success()) {
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取居民人房统计数据失败" + userResult.getInternalMsg(), userResult.getMsg());
+ }
+ //3.汇总封装数据
+ SubUserHouseListResultDTO dto = null;
+ for (String id : idList) {
+ dto = new SubUserHouseListResultDTO();
+ dto.setOrgId(id);
+ dto.setOrgName(map.get(id));
+ dto.setOrgType(orgType);
+ for (HouseChartResultDTO h : houseList) {
+ if (h.getOrgId().equals(id)) {
+ dto.setHouseTotal(h.getHouseTotal());
+ dto.setZzHouseTotal(h.getZzHouseTotal());
+ dto.setZzHouseRatio(h.getZzHouseRatio());
+ dto.setCzHouseTotal(h.getCzHouseTotal());
+ dto.setCzHouseRatio(h.getCzHouseRatio());
+ dto.setXzHouseTotal(h.getXzHouseTotal());
+ dto.setXzHouseRatio(h.getXzHouseRatio());
+ }
+ }
+ for (UserChartResultDTO u : userResult.getData()) {
+ if (u.getOrgId().equals(id)) {
+ dto.setUserTotal(u.getUserTotal());
+ dto.setCzUserTotal(u.getCzUserTotal());
+ dto.setCzUserRatio(u.getCzUserRatio());
+ dto.setLdUserTotal(u.getLdUserTotal());
+ dto.setLdUserRatio(u.getLdUserRatio());
+ }
+ }
+ list.add(dto);
+ }
+ return list;
+ }
+
}
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 122e9755a0..351fc95306 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
@@ -27,6 +27,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcBuildingDao;
import com.epmet.dto.IcBuildingDTO;
+import com.epmet.dto.ImportGeneralDTO;
import com.epmet.entity.IcBuildingEntity;
import com.epmet.service.IcBuildingService;
import lombok.extern.slf4j.Slf4j;
@@ -153,4 +154,16 @@ public class IcBuildingServiceImpl extends BaseServiceImpl categories = new ArrayList<>();
if (null != countMap && CollectionUtils.isNotEmpty(categoryList)) {
for (IcResiCategoryStatsConfigDTO category : categoryList) {
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
index 67a21aca56..0696512e41 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java
@@ -26,6 +26,7 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
@@ -74,6 +75,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.http.entity.ContentType;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@@ -234,8 +236,9 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl importTask) {
- executorService.submit(() -> {
+// executorService.submit(() -> {
// importNeighbor(formDTO,file,importTask);
log.info("neighborhoodImport thread start=====");
ExcelReader excelReader = null;
@@ -260,7 +263,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl();
}
@@ -496,10 +499,12 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl entities){
- List> partition = ListUtils.partition(entities, NumConstant.ONE_HUNDRED);
- partition.forEach(p -> {
- neighborHoodPropertyService.insertBatch(p);
- });
+ if (CollectionUtils.isNotEmpty(entities)){
+ List> partition = ListUtils.partition(entities, NumConstant.ONE_HUNDRED);
+ partition.forEach(p -> {
+ neighborHoodPropertyService.insertBatch(p);
+ });
+ }
}
/**
@@ -521,7 +526,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl units = icBuildingUnitService.getUnitOptions(building.getId());
+ Map unitMap = units.stream().collect(Collectors.toMap(OptionResultDTO::getCode, OptionResultDTO::getLabel));
+ List unitList = new ArrayList<>();
+ for (int i = 1; i <= info.getTotalUnitNum(); i++) {
+ String unitNum = String.valueOf(i);
+ if (!unitMap.containsKey(unitNum)) {
+ IcBuildingUnitEntity icBuildingUnit = new IcBuildingUnitEntity();
+ icBuildingUnit.setId(IdWorker.getIdStr());
+ icBuildingUnit.setBuildingId(building.getId());
+ icBuildingUnit.setCustomerId(customerId);
+ icBuildingUnit.setUnitName(unitNum + "单元");
+ icBuildingUnit.setUnitNum(unitNum);
+ unitList.add(icBuildingUnit);
+ }
+ }
+ icBuildingUnitService.insertBatch(unitList, NumConstant.ONE_HUNDRED);
+ }
return building.getId();
}
IcBuildingEntity buildingEntity = new IcBuildingEntity();
@@ -597,10 +625,12 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl NumConstant.ZERO) {
//设置楼宇单元
@@ -708,4 +738,37 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl needUpdateList) {
+ if (CollectionUtils.isNotEmpty(needUpdateList)){
+ baseDao.updateNeighborHood(needUpdateList);
+ }
+ }
+
+ /**
+ * Desc: 更新小区关系表
+ * @param updateNeighborHoodAndManagement
+ * @author zxc
+ * @date 2022/4/27 10:33
+ */
+ @Override
+ @Transactional
+ public void neighborHoodPropertyUpdate(List updateNeighborHoodAndManagement) {
+ if (CollectionUtils.isNotEmpty(updateNeighborHoodAndManagement)){
+ baseDao.delProperty(updateNeighborHoodAndManagement.stream().map(m -> m.getNeighborHoodId()).collect(Collectors.toList()));
+ List entities = ConvertUtils.sourceToTarget(updateNeighborHoodAndManagement, IcNeighborHoodPropertyEntity.class);
+ List collect = entities.stream().filter(e -> StringUtils.isNotBlank(e.getPropertyId())).collect(Collectors.toList());
+ if (CollectionUtils.isNotEmpty(collect)){
+ neighborHoodPropertyService.insertBatch(collect);
+ }
+ }
+ }
+
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.17__edit_building_and_house.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.17__edit_building_and_house.sql
new file mode 100644
index 0000000000..1117c368b7
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.17__edit_building_and_house.sql
@@ -0,0 +1,2 @@
+alter table ic_building add COLUMN BUILDING_LEADER_NAME VARCHAR(11) comment '楼长姓名' AFTER TOTAL_HOUSE_NUM;
+alter table ic_building add COLUMN BUILDING_LEADER_MOBILE VARCHAR(11) comment '楼长电话' AFTER BUILDING_LEADER_NAME;
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.18__edit_building_and_house_sort.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.18__edit_building_and_house_sort.sql
new file mode 100644
index 0000000000..801f0f0c54
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.18__edit_building_and_house_sort.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ic_building DROP SORT;
+alter table ic_building add COLUMN SORT DECIMAL(6,2) comment '排序' DEFAULT 0.00 AFTER BUILDING_LEADER_NAME;
+alter table ic_house add COLUMN SORT DECIMAL(6,2) comment '排序' DEFAULT 0.00 AFTER OWNER_ID_CARD;
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_export.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_export.xlsx
index 226101af0a..5a178ed9bb 100644
Binary files a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_export.xlsx and b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_export.xlsx differ
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx
index cffd4abd69..0be5175435 100644
Binary files a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx and b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx differ
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx
index cf5681e1f4..9af88daba0 100644
Binary files a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx and b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx differ
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
index 1e8792cab6..d8314ee8b5 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
@@ -709,15 +709,6 @@
agency.DEL_FLAG = '0'
AND agency.ID = #{agencyId}
-
+
+
+
+
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
index 2f3d335708..b8c3a2c51d 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
@@ -25,6 +25,59 @@
+
+
+ update ic_neighbor_hood
+
+
+
+ when id = #{l.neighborHoodId} then #{l.address}
+
+
+
+
+ when id = #{l.neighborHoodId} then #{l.remark}
+
+
+ UPDATED_TIME = NOW()
+
+ WHERE DEL_FLAG = '0'
+ AND ID IN (
+
+ #{l.neighborHoodId}
+
+ )
+
+
+
+
+ update ic_neighbor_hood_property
+
+
+
+ when NEIGHBOR_HOOD_ID = #{l.neighborHoodId} then #{l.propertyId}
+
+
+ UPDATED_TIME = NOW()
+
+ WHERE DEL_FLAG = '0'
+ AND NEIGHBOR_HOOD_ID IN (
+
+ #{l.neighborHoodId}
+
+ )
+
+
+
+
+ DELETE FROM ic_neighbor_hood_property
+ WHERE NEIGHBOR_HOOD_ID IN (
+
+ #{n}
+
+ )
+
+
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
index 054839bf02..1645f09bdf 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
@@ -73,6 +73,23 @@
and ${subCondition.tableName}.${subCondition.columnName} between #{subCondition.columnValue[0]} and #{subCondition.columnValue[1]}
+
+
+
+ and ${subCondition.tableName}.${subCondition.columnName} is not null
+ and ${subCondition.tableName}.${subCondition.columnName} !=''
+
+
+ and (${subCondition.tableName}.${subCondition.columnName} is null
+ or ${subCondition.tableName}.${subCondition.columnName} ='')
+
+
+
+
+
+ ${subCondition.tableName}.${subCondition.columnName} like concat('%',#{colValue},'%')
+
+
@@ -101,6 +118,17 @@
and ${subCondition.tableName}.${subCondition.columnName} between #{subCondition.columnValue[0]} and #{subCondition.columnValue[1]}
+
+
+
+ and ${subCondition.tableName}.${subCondition.columnName} is not null
+ and ${subCondition.tableName}.${subCondition.columnName} !=''
+
+
+ and (${subCondition.tableName}.${subCondition.columnName} is null
+ or ${subCondition.tableName}.${subCondition.columnName} ='')
+
+
@@ -132,7 +160,18 @@
group by IC_RESI_USER.id
- order by ic_resi_user.CREATED_TIME desc
+
+
+ ${groupTableName}.ID
+
+
+ ORDER BY
+ IC_RESI_USER.GRID_ID ASC,
+ IC_RESI_USER.VILLAGE_ID ASC,
+ IC_RESI_USER.BUILD_ID ASC,
+ IC_RESI_USER.UNIT_ID ASC,
+ IC_RESI_USER.HOME_ID ASC,
+ IC_RESI_USER.ID ASC
@@ -143,9 +182,16 @@
update ${subTalbeName} set del_flag='1' where IC_RESI_USER=#{icResiUserId}
-
+
select
- ${resultTableName}.*
+
+
+
+ ${column.tableName}.${column.columnName}
+
+
+ ${resultTableName}.*
+
FROM
ic_resi_user
@@ -158,7 +204,17 @@
group by IC_RESI_USER.id
- order by ic_resi_user.CREATED_TIME desc
+
+
+ ${groupTableName}.ID
+
+
+ order by IC_RESI_USER.GRID_ID ASC,
+ IC_RESI_USER.VILLAGE_ID ASC,
+ IC_RESI_USER.BUILD_ID ASC,
+ IC_RESI_USER.UNIT_ID ASC,
+ IC_RESI_USER.HOME_ID ASC,
+ IC_RESI_USER.ID ASC
@@ -208,7 +264,20 @@
IFNULL(REMARKS,'') AS REMARKS
FROM ic_resi_user
WHERE DEL_FLAG = '0'
- AND (AGENCY_ID = #{agencyId} OR PIDS LIKE CONCAT('%',#{agencyId},'%'))
+
+
+ AND (AGENCY_ID = #{id} OR PIDS LIKE CONCAT('%',#{id},'%'))
+
+
+ AND GRID_ID = #{id}
+
+
+ AND VILLAGE_ID = #{id}
+
+
+ AND BUILD_ID = #{id}
+
+
AND `NAME` LIKE CONCAT('%',#{name},'%')
@@ -317,7 +386,6 @@
ic_resi_user
WHERE
del_flag = '0'
- AND customer_id = #{customerId}
AND id_card = #{idCard}
@@ -743,6 +811,7 @@
AND a.ID_CARD LIKE concat( '%', #{idCard}, '%' )
+ ORDER BY GRID_ID,VILLAGE_ID,BUILD_ID,UNIT_ID,HOME_ID, convert(NAME using gbk)
) t
WHERE
1=1
@@ -752,7 +821,7 @@
AND natCount = #{natCount}
- ORDER BY `NAME`
+
SELECT * FROM
@@ -832,4 +901,27 @@
SELECT ID,NAME,ID_CARD,DEL_FLAG FROM ic_resi_user WHERE ID = #{icResiUserId}
+
+
+ SELECT
+ COUNT(id) num,
+ is_floating isFloating
+ FROM
+ ic_resi_user
+ WHERE
+ del_flag = '0'
+
+
+ AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%'))
+
+
+ AND grid_id = #{orgId}
+
+
+ AND village_id = #{orgId}
+
+
+ GROUP BY is_floating
+
+
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml
index 4e2dae8afa..24e607f3c7 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml
@@ -153,11 +153,16 @@
select
BUILD_ID as buildingId,
+ UNIT_ID,
+ HOME_ID,
+ MOBILE,
+ ID_CARD,
name as residentName,
ID AS userId
from ic_resi_user
where DEL_FLAG = '0'
and CUSTOMER_ID = #{customerId}
+ AND `STATUS` = '0'
and ${columnName} = '1'
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml
index 0ccd2c31d8..15a413748b 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml
@@ -56,6 +56,9 @@
AND ARRIVE_DATE #{endDate}
+
+ AND r.id=#{id}
+
ORDER BY
r.ARRIVE_DATE DESC