From 0c14dfeeca5f58b613720f3a635ad36cb563d09d Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Mar 2022 11:54:37 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=97=A7=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V0.0.12__insert_ic_party_relation.sql | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql new file mode 100644 index 0000000000..21f856a0ab --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql @@ -0,0 +1,38 @@ +INSERT INTO ic_activity_unit_relation +SELECT + UUID() AS ID, + CUSTOMER_ID, + AGENCY_ID, + PIDS, + ID AS ACTIVITY_ID, + ACT_ID, + UNIT_ID, + 1 AS SORT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME +FROM + ic_party_activity; +UPDATE ic_activity_unit_relation SET ID = REPLACE (ID, '-', ''); +INSERT INTO ic_activity_service_relation +SELECT + UUID() AS ID, + CUSTOMER_ID, + AGENCY_ID, + PIDS, + ID AS ACTIVITY_ID, + ACT_ID, + SERVICE_MATTER, + 1 AS SORT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME +FROM + ic_party_activity; +UPDATE ic_activity_service_relation SET ID = REPLACE (ID, '-', ''); \ No newline at end of file From a33160a77d9dfc121f9bcdfbcfdda598ac15a4f4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 3 Mar 2022 12:05:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=AF=BC=E5=85=A5=20=E5=BF=85=E8=A6=81=E5=88=97?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/excel/ImportCommunitySelfOrganization.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java index 2a9995be2a..e6b04d8938 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java @@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.annotation.ExcelCollection; import com.epmet.commons.tools.utils.ExcelVerifyInfo; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.util.Date; import java.util.List; @@ -17,18 +18,23 @@ import java.util.List; public class ImportCommunitySelfOrganization extends ExcelVerifyInfo { @Excel(name = "组织名称", needMerge = true) + @NotBlank(message = "不能为空") private String organizationName; @Excel(name = "组织人数", needMerge = true) + //@NotNull(message = "不能为空") private Integer organizationPersonCount; @Excel(name = "服务事项", needMerge = true) + @NotBlank(message = "不能为空") private String serviceItem; @Excel(name = "负责人", needMerge = true) + @NotBlank(message = "不能为空") private String principalName; @Excel(name = "联系电话", needMerge = true) + @NotBlank(message = "不能为空") private String principalPhone; @Excel(name = "创建时间", needMerge = true) From d039e04e8f4e771247f4987096dbfa166e9d6233 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Mar 2022 12:27:27 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=81=94=E5=BB=BA=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=97=A7=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V0.0.12__insert_ic_party_relation.sql | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql index 21f856a0ab..41aaf825dd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.12__insert_ic_party_relation.sql @@ -11,11 +11,12 @@ SELECT DEL_FLAG, REVISION, CREATED_BY, - CREATED_TIME, + NOW(), UPDATED_BY, - UPDATED_TIME + NOW() FROM - ic_party_activity; + ic_party_activity +WHERE UNIT_ID IS NOT NULL AND UNIT_ID != ''; UPDATE ic_activity_unit_relation SET ID = REPLACE (ID, '-', ''); INSERT INTO ic_activity_service_relation SELECT @@ -30,9 +31,10 @@ SELECT DEL_FLAG, REVISION, CREATED_BY, - CREATED_TIME, + NOW(), UPDATED_BY, - UPDATED_TIME + NOW() FROM - ic_party_activity; + ic_party_activity +WHERE SERVICE_MATTER IS NOT NULL AND UNIT_ID != ''; UPDATE ic_activity_service_relation SET ID = REPLACE (ID, '-', ''); \ No newline at end of file From 170ad7426fa83516c0e6fc0cd61bd9253cb47fdd Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Mar 2022 14:57:31 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/BuildingController.java | 2 +- .../src/main/java/com/epmet/controller/HouseController.java | 2 +- .../java/com/epmet/controller/IcNeighborHoodController.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java index 83165b6c4f..90b9a9353c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java @@ -219,7 +219,7 @@ public class BuildingController { ImportTaskCommonFormDTO importFormDTO = new ImportTaskCommonFormDTO(); importFormDTO.setBizType(ImportTaskConstants.BIZ_TYPE_BUILDING); importFormDTO.setOperatorId(formDTO.getUserId()); - importFormDTO.setOriginFileName(ImportErrorMsgConstants.BUILDING_ERROR_NAME); + importFormDTO.setOriginFileName(file.getOriginalFilename()); Result importTask = epmetCommonServiceOpenFeignClient.createImportTask(importFormDTO); if (!importTask.success()){ throw new EpmetException("当前存在上传任务"); 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 976032bd01..71e958364a 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 @@ -269,7 +269,7 @@ public class HouseController implements ResultDataResolver { ImportTaskCommonFormDTO importFormDTO = new ImportTaskCommonFormDTO(); importFormDTO.setBizType(ImportTaskConstants.BIZ_TYPE_HOUSE); importFormDTO.setOperatorId(formDTO.getUserId()); - importFormDTO.setOriginFileName(ImportErrorMsgConstants.HOUSE_ERROR_NAME); + importFormDTO.setOriginFileName(file.getOriginalFilename()); Result importTask = epmetCommonServiceOpenFeignClient.createImportTask(importFormDTO); if (!importTask.success()){ throw new EpmetException("当前存在上传任务"); 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 fba75d9432..4128ed84c3 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 @@ -139,7 +139,7 @@ public class IcNeighborHoodController { ImportTaskCommonFormDTO importFormDTO = new ImportTaskCommonFormDTO(); importFormDTO.setBizType(ImportTaskConstants.BIZ_TYPE_NEIGHBOR_HOOD); importFormDTO.setOperatorId(formDTO.getUserId()); - importFormDTO.setOriginFileName(ImportErrorMsgConstants.NEIGHBORHOOD_ERROR_NAME); + importFormDTO.setOriginFileName(file.getOriginalFilename()); Result importTask = epmetCommonServiceOpenFeignClient.createImportTask(importFormDTO); if (!importTask.success()){ throw new EpmetException("当前存在上传任务"); From 3256f76f3272dc692c3cc6f37e0944eaf21e7d40 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Mar 2022 15:21:50 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/resi/ResiActDetailResultDTO.java | 4 ++ .../service/impl/ActInfoServiceImpl.java | 39 +++++++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java index a232ebdf33..aa33f41e69 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java @@ -186,6 +186,8 @@ public class ResiActDetailResultDTO implements Serializable { */ private String unitId; private String unitName; + private List unitIdList; + private List unitNameList; /** * 活动目标 */ @@ -196,4 +198,6 @@ public class ResiActDetailResultDTO implements Serializable { */ private String serviceMatter; private String serviceMatterName; + private List serviceMatterList; + private List serviceMatterNameList; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index e595bdd0c6..407cb74dac 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -34,6 +33,7 @@ import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserRelationDao; import com.epmet.dao.HeartUserInfoDao; import com.epmet.dto.ActInfoDTO; +import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.resi.*; import com.epmet.dto.result.demand.OptionDTO; @@ -42,7 +42,6 @@ import com.epmet.entity.ActInfoEntity; import com.epmet.entity.ActUserRelationEntity; import com.epmet.service.*; import com.epmet.utils.CaculateDistance; -import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -77,6 +76,12 @@ public class ActInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -255,16 +260,26 @@ public class ActInfoServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); - Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - detailResultDTO.setServiceMatterName(MapUtils.isNotEmpty(categoryMap) && categoryMap.containsKey(detailResultDTO.getServiceMatter()) ? categoryMap.get(detailResultDTO.getServiceMatter()) : StrConstant.EPMETY_STR); - } - if (StringUtils.isNotBlank(detailResultDTO.getUnitId())) { - //获取单位名称 - IcPartyUnitDTO unitDTO = icPartyUnitService.get(detailResultDTO.getUnitId()); - detailResultDTO.setUnitName(null != unitDTO ? unitDTO.getUnitName() : StrConstant.EPMETY_STR); + if (ActConstant.PARTY.equals(detailResultDTO.getActType())) { + IcPartyActivityDTO dto = icPartyActivityService.getActivityByActId(formDto.getActId()); + if (null != dto) { + //获取服务事项 + List serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List services = icActivityServiceRelationService.getServiceList(dto.getId()); + List serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); + detailResultDTO.setServiceMatterList(services); + detailResultDTO.setServiceMatterNameList(serviceNames); + + //获取联建单位 + IcPartyUnitDTO unitDTO = new IcPartyUnitDTO(); + unitDTO.setAgencyId(dto.getAgencyId()); + Map option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + List unitIds = icActivityUnitRelationService.getUnitList(dto.getId()); + List unitNames = unitIds.stream().map(option::get).collect(Collectors.toList()); + detailResultDTO.setUnitIdList(unitIds); + detailResultDTO.setUnitNameList(unitNames); + } } return new Result().ok(detailResultDTO); }