msgList = new ArrayList<>();
+ UserMessageFormDTO msgDTO = new UserMessageFormDTO();
+ msgDTO.setCustomerId(entity.getCustomerId());
+ msgDTO.setGridId(entity.getGridId());
+ msgDTO.setApp(AppClientConstant.APP_RESI);
+ msgDTO.setTitle(UserMessageConstant.ISSUE_TITLE);
+ String messageContent = "";
+ if (IssueConstant.ISSUE_RESLOVED.equals(formDTO.getResolveType())) {
+ messageContent = String.format(UserMessageConstant.ISSUE_RESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
+ } else if (IssueConstant.ISSUE_UNRESLOVED.equals(formDTO.getResolveType())) {
+ messageContent = String.format(UserMessageConstant.ISSUE_UNRESLOVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
+ }
+ msgDTO.setMessageContent(messageContent);
+ msgDTO.setReadFlag(ReadFlagConstant.UN_READ);
+ msgDTO.setUserId(topicDTO.getCreatedBy());
+ msgList.add(msgDTO);
+ msgDTO.setUserId(entity.getCreatedBy());
+ msgList.add(msgDTO);
+ return messageFeignClient.saveUserMessageList(msgList);
+ }
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridResultDTO.java
new file mode 100644
index 0000000000..26fe8f9292
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridResultDTO.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 查询组织网格名称-接口返参
+ *
+ * @author sun
+ */
+@Data
+public class AgencyGridResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 机关组织Id
+ */
+ private String agencyId;
+ /**
+ * 机关组织名称
+ */
+ private String agencyName;
+ /**
+ * 网格Id
+ */
+ private String gridId;
+ /**
+ * 网格名称
+ */
+ private String gridName;
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
index 7200bca2a3..330185b612 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
@@ -34,4 +34,8 @@ public interface CustomerAgencyConstant {
* 区县名称不能为空
*/
String DISTRICT_EXCEPTION = "区县级机关名称不能为空";
+ /**
+ * 组织信息查询失败
+ */
+ String SELECT_EXCEPTION = "根据组织ID未查询到机构组织信息";
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
index 9de0e27f8e..ee839de020 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
@@ -27,6 +27,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.StaffOrgFormDTO;
+import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerAgencyService;
@@ -104,4 +105,16 @@ public class CustomerAgencyController {
public Result> getStaffOrgList(@RequestBody StaffOrgFormDTO staffOrgsFormDTO) {
return customerAgencyService.getStaffOrgList(staffOrgsFormDTO);
}
+
+ /**
+ * @param agencyGridResultDTO
+ * @return
+ * @Author sun
+ * @Description 根据组织Id、网格Id查询组织、网格名称
+ **/
+ @PostMapping("getagencyandgrid")
+ public Result getAgencyAndGrid(@RequestBody AgencyGridResultDTO agencyGridResultDTO) {
+ return new Result().ok(customerAgencyService.getAgencyAndGrid(agencyGridResultDTO));
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
index 62892b4576..dceb37c12e 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
@@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.StaffOrgFormDTO;
+import com.epmet.dto.result.AgencyGridResultDTO;
import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.entity.CustomerAgencyEntity;
@@ -104,4 +105,12 @@ public interface CustomerAgencyService extends BaseService
* @Date 2020/4/20 21:45
**/
Result> getStaffOrgList(StaffOrgFormDTO staffOrgsFormDTO);
+
+ /**
+ * @param agencyGridResultDTO
+ * @return
+ * @Author sun
+ * @Description 根据组织Id、网格Id查询组织、网格名称
+ **/
+ AgencyGridResultDTO getAgencyAndGrid(AgencyGridResultDTO agencyGridResultDTO);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
index 06f83a0d25..43d442b32e 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
@@ -21,19 +21,22 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerAgencyConstant;
+import com.epmet.constant.CustomerGridConstant;
import com.epmet.dao.CustomerAgencyDao;
+import com.epmet.dao.CustomerGridDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerDTO;
-import com.epmet.dto.form.*;
-import com.epmet.dto.result.*;
+import com.epmet.dto.form.CustomerFormDTO;
+import com.epmet.dto.form.StaffOrgFormDTO;
+import com.epmet.dto.result.AgencyGridResultDTO;
+import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.entity.CustomerAgencyEntity;
+import com.epmet.entity.CustomerGridEntity;
import com.epmet.feign.OperCrmFeignClient;
import com.epmet.redis.CustomerAgencyRedis;
import com.epmet.service.CustomerAgencyService;
@@ -62,6 +65,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl page(Map params) {
IPage page = baseDao.selectPage(
@@ -138,4 +143,28 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl>().ok(list);
}
+
+ /**
+ * @param agencyGridResultDTO
+ * @return
+ * @Author sun
+ * @Description 根据组织Id、网格Id查询组织、网格名称
+ **/
+ @Override
+ public AgencyGridResultDTO getAgencyAndGrid(AgencyGridResultDTO agencyGridResultDTO) {
+ //1:查询组织机关信息
+ CustomerAgencyEntity agencyEntity = baseDao.selectById(agencyGridResultDTO.getAgencyId());
+ if (null == agencyEntity) {
+ throw new RenException(CustomerAgencyConstant.SELECT_EXCEPTION);
+ }
+ agencyGridResultDTO.setAgencyName(agencyEntity.getOrganizationName());
+ //2:查询网格信
+ CustomerGridEntity gridEntity = customerGridDao.selectById(agencyGridResultDTO.getGridId());
+ if (null == gridEntity) {
+ throw new RenException(CustomerGridConstant.SELECT_EXCEPTION);
+ }
+ agencyGridResultDTO.setGridName(gridEntity.getGridName());
+ return agencyGridResultDTO;
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
index 6a86db52ff..9391a4c9d6 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
@@ -5,6 +5,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.modules.topic.service.ResiTopicService;
+import com.epmet.resi.group.dto.topic.ResiTopicDTO;
import com.epmet.resi.group.dto.topic.TopicInfoDTO;
import com.epmet.resi.group.dto.topic.form.*;
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO;
@@ -12,10 +13,7 @@ import com.epmet.resi.group.dto.topic.result.ResiTopicIncludeIssueDetailResultDT
import com.epmet.resi.group.dto.topic.result.ResiTopicIncludeIssueInfoResultDTO;
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -199,4 +197,15 @@ public class ResiTopicController {
return new Result().ok(topicService.selectDetail(topicInfo));
}
+ /**
+ * @param topicId
+ * @return
+ * @Author sun
+ * @Description 根据话题Id查询话题信息
+ **/
+ @PostMapping(value = "gettopicbyid/{topicId}")
+ public Result getTopicById(@PathVariable("topicId") String topicId){
+ return new Result().ok(topicService.getTopicById(topicId));
+ }
+
}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
index f7694dcf76..74cc6c3633 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
@@ -229,4 +229,12 @@ public interface ResiTopicService extends BaseService {
*/
TopicInfoDTO selectDetail(TopicInfoFormDTO formDTO);
+ /**
+ * @param topicId
+ * @return
+ * @Author sun
+ * @Description 根据话题Id查询话题信息
+ **/
+ ResiTopicDTO getTopicById(String topicId);
+
}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
index 920c6cfda4..f775c004d6 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
@@ -931,6 +931,12 @@ public class ResiTopicServiceImpl extends BaseServiceImpl