diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysUserDao.xml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysUserDao.xml
index 65f3b7ae..a5eb7b01 100644
--- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysUserDao.xml
+++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysUserDao.xml
@@ -7,16 +7,19 @@
select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName from sys_user t1
where t1.del_flag = 0 and t1.super_admin = 0
- and t1.username like #{username}
+ and t1.username
+ like concat('%', #{username}, '%')
- and t1.real_name like #{realname}
+ and t1.real_name
+ like concat('%', #{realname}, '%')
- and t1.mobile like #{mobile}
+ and t1.mobile
+ like concat('%', #{mobile}, '%')
- and t1.email like #{email}
+ and t1.email like concat('%', #{email}, '%')
and t1.dept_id in
@@ -56,7 +59,8 @@
sys_user u
LEFT JOIN sys_dept d ON u.dept_id = d.id
WHERE
- u.username = #{value} AND u.del_flag = 0
+ u.username
+ like concat('%', #{value}, '%') AND u.del_flag = 0
@@ -175,7 +179,8 @@
u.scrip
from sys_user u
LEFT JOIN sys_user_dept ud ON u.id = ud.user_id AND ud.del_flag = '0'
- where u.del_flag='0' and ud.dept_id=#{gridId} and u.mobile = #{mobile}
+ where u.del_flag='0' and ud.dept_id=#{gridId} and u.mobile
+ like concat('%', #{mobile}, '%')
order by u.CREATE_DATE desc
limit 1
@@ -201,6 +206,7 @@
OPEN_ID,
scrip
from sys_user
- where del_flag='0' and scrip = #{scrip}
+ where del_flag='0' and scrip
+ like concat('%', #{scrip}, '%')
diff --git a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java
index 296e752a..12405711 100644
--- a/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java
+++ b/esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/ModuleName.java
@@ -15,7 +15,10 @@ public enum ModuleName {
ITEM_SATISFACTION("item_satisfaction","项目详情-满意度评价"),
PARTY_GROUP_TOPIC("party_group_topic","党群1+1-发个新话题"),
PARTY_GROUP_TOPIC_COMMENT("party_group_topic_comment","党群1+1-评论"),
- HELP_SIGNIN("help_signIn","初心互助-已报名活动-我要打卡");
+ HELP_SIGNIN("help_signIn","初心互助-已报名活动-我要打卡"),
+ ACT_APPLY("act_apply","初心互助-申请发单"),
+ REPORT_ISSUE("report_issue","我要举报")
+ ;
private String name;
diff --git a/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/pom.xml b/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/pom.xml
index 6ed2d0fa..134bb043 100644
--- a/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/pom.xml
@@ -179,7 +179,7 @@
test
- 11016
+ 11017
2
114.215.125.123
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueSubmitFormDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueSubmitFormDTO.java
index d8761d09..54ade58e 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueSubmitFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/form/ReportIssueSubmitFormDTO.java
@@ -97,4 +97,9 @@ public class ReportIssueSubmitFormDTO implements Serializable {
* 所有部门
*/
private String allDeptNames;
+
+ /**
+ *是否提交为内容待审核状态
+ */
+ private Boolean isConReview;
}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
index eeb053e2..a8a2489b 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml
@@ -68,6 +68,12 @@
orika-spring-boot-starter
1.8.0
+
+
+ org.apache.rocketmq
+ rocketmq-spring-boot-starter
+ 2.0.2
+
@@ -150,6 +156,12 @@
47.104.224.45
fa5bf520-09c1-410c-a876-28e98c0534d3
+
+
+ 47.104.85.99:9876;114.215.125.123:9876
+ jinshui-organizationGroup
+ jinshui-contentSecurityGroup
+
@@ -175,6 +187,11 @@
47.104.224.45:8848
47.104.224.45
fa5bf520-09c1-410c-a876-28e98c0534d3
+
+ 47.104.85.99:9876;114.215.125.123:9876
+ jinshui-organizationGroup
+ jinshui-contentSecurityGroup
+
@@ -202,6 +219,12 @@
epdc
epdc@jinshui888
+
+
+ 172.16.0.7:9876;172.16.0.8:9876
+ jinshui-organizationGroup
+ jinshui-contentSecurityGroup
+
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/dao/ArchivesDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/dao/ArchivesDao.java
index e2ddf686..a4098dc1 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/dao/ArchivesDao.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/dao/ArchivesDao.java
@@ -79,4 +79,20 @@ public interface ArchivesDao extends BaseDao {
* @return java.util.List
**/
ArchiveDetailResultDTO selectArchiveDetailInfo(String id);
+ /**
+ * @Description 查询需要修改组织机构信息事件
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String toString);
+ /**
+ * @Description 更新部门名
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/ArchivesService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/ArchivesService.java
index d15f9584..51513462 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/ArchivesService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/ArchivesService.java
@@ -28,6 +28,7 @@ import com.elink.esua.epdc.dto.result.ArchiveDetailResultDTO;
import com.elink.esua.epdc.dto.result.ArchiveResultDTO;
import com.elink.esua.epdc.modules.archives.entity.ArchivesEntity;
import com.elink.esua.epdc.modules.archives.excel.ArchivesExcel;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@@ -148,4 +149,12 @@ public interface ArchivesService extends BaseService {
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result getArchiveDetail(String id);
+ /**
+ * @Description 档案修改组织机构
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/impl/ArchivesServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/impl/ArchivesServiceImpl.java
index d2cff7f2..17640722 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/impl/ArchivesServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archives/service/impl/ArchivesServiceImpl.java
@@ -27,12 +27,12 @@ import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.config.StreamUtils;
import com.elink.esua.epdc.dto.ArchivesDTO;
import com.elink.esua.epdc.dto.EpdcArchivesErroyResultDTO;
-import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.form.ArchiveDeptFormDTO;
import com.elink.esua.epdc.dto.form.ArchiveFormDTO;
import com.elink.esua.epdc.dto.result.ArchiveDeptResultDTO;
@@ -45,6 +45,7 @@ import com.elink.esua.epdc.modules.archives.redis.ArchivesRedis;
import com.elink.esua.epdc.modules.archives.service.ArchivesService;
import com.elink.esua.epdc.modules.archivesdept.service.ArchivesDeptService;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -258,6 +259,59 @@ public class ArchivesServiceImpl extends BaseServiceImpl().ok(archiveDetailResultDTO);
}
+ @Override
+ public void modifyOrganizationInfo(OrganizationModifyDTO dto) {
+ // 查询需要修改组织机构信息事件
+ List eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != eventsList && eventsList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, eventsList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+
+ // 更新网格名称
+ baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
+ /**
+ * 组织机构信息处理
+ *
+ * @return java.util.List
+ * @params [dto, userList]
+ * @author liuchuang
+ * @since 2020/3/7 15:22
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) {
+ List entities = new ArrayList<>();
+ for (ArchivesDTO user : userList) {
+ ArchivesEntity entity = new ArchivesEntity();
+ if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(user.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(user.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
/***
* 批量添加档案
* @return java.lang.String
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/dao/ArchivesDeptDao.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/dao/ArchivesDeptDao.java
index a7b9e15d..79c3b320 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/dao/ArchivesDeptDao.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/dao/ArchivesDeptDao.java
@@ -29,5 +29,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ArchivesDeptDao extends BaseDao {
-
+ /**
+ * @Description 更新部门名
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/ArchivesDeptService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/ArchivesDeptService.java
index 812b9093..5ddf85e4 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/ArchivesDeptService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/ArchivesDeptService.java
@@ -21,6 +21,8 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.ArchivesDeptDTO;
import com.elink.esua.epdc.modules.archivesdept.entity.ArchivesDeptEntity;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
+
import java.util.List;
import java.util.Map;
@@ -101,5 +103,12 @@ public interface ArchivesDeptService extends BaseService {
* @date 2020/7/30 13:31
*/
boolean modifyArchives(Long deptId,String dept);
-
+ /**
+ * @Description 档案部门修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/impl/ArchivesDeptServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/impl/ArchivesDeptServiceImpl.java
index f43ef553..889aada4 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/impl/ArchivesDeptServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/archivesdept/service/impl/ArchivesDeptServiceImpl.java
@@ -19,16 +19,16 @@ package com.elink.esua.epdc.modules.archivesdept.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
-import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
-import com.elink.esua.epdc.modules.archivesdept.dao.ArchivesDeptDao;
import com.elink.esua.epdc.dto.ArchivesDeptDTO;
+import com.elink.esua.epdc.modules.archivesdept.dao.ArchivesDeptDao;
import com.elink.esua.epdc.modules.archivesdept.entity.ArchivesDeptEntity;
import com.elink.esua.epdc.modules.archivesdept.redis.ArchivesDeptRedis;
import com.elink.esua.epdc.modules.archivesdept.service.ArchivesDeptService;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -117,4 +117,10 @@ public class ArchivesDeptServiceImpl extends BaseServiceImpl {
* @Date 15:18 2020-05-20
**/
List selectListDeptInfoPage(Map params);
+ /**
+ * @Description 更新部门名称
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/DeptInfoService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/DeptInfoService.java
index 5b0aa2a9..35945305 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/DeptInfoService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/DeptInfoService.java
@@ -24,6 +24,7 @@ import com.elink.esua.epdc.dto.DeptInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO;
import com.elink.esua.epdc.dto.result.EpdcDeptInfoResultDTO;
import com.elink.esua.epdc.modules.dept.entity.DeptInfoEntity;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -104,4 +105,12 @@ public interface DeptInfoService extends BaseService {
* @Date 13:41 2020-05-20
**/
Result> listDeptInfo(EpdcDeptInfoFormDTO formDTO);
+ /**
+ * @Description 部门信息表修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/impl/DeptInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/impl/DeptInfoServiceImpl.java
index 47eaaad3..2fc03d3e 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/impl/DeptInfoServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/dept/service/impl/DeptInfoServiceImpl.java
@@ -22,9 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
-import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
-import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptInfoDTO;
import com.elink.esua.epdc.dto.form.EpdcDeptInfoFormDTO;
@@ -33,6 +31,7 @@ import com.elink.esua.epdc.modules.dept.dao.DeptInfoDao;
import com.elink.esua.epdc.modules.dept.entity.DeptInfoEntity;
import com.elink.esua.epdc.modules.dept.redis.DeptInfoRedis;
import com.elink.esua.epdc.modules.dept.service.DeptInfoService;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -122,4 +121,10 @@ public class DeptInfoServiceImpl extends BaseServiceImpl {
* @since 2020/10/23 16:23
*/
ReportIssueResultDTO selectOneReportIssue(String id);
-
+ /**
+ * @Description 查询需要修改组织机构信息事件
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String toString);
+ /**
+ * @Description 更新部门名
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/ReportIssueService.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/ReportIssueService.java
index 4c771650..864189f8 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/ReportIssueService.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/ReportIssueService.java
@@ -26,6 +26,7 @@ import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO;
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO;
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -137,4 +138,12 @@ public interface ReportIssueService extends BaseService {
* @since 2020/10/23 16:41
*/
Result modifyReportIssueShieldFlag(ReportIssueShieldFormDTO formDto);
+ /**
+ * @Description 我要举报修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java
index 9ded775f..7ef83a6c 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java
@@ -20,10 +20,16 @@ package com.elink.esua.epdc.modules.reportissue.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.security.content.CheckDataUtils;
+import com.elink.esua.epdc.commons.tools.security.content.ModuleName;
+import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO;
+import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO;
+import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO;
+import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
-import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.CustomImageConstant;
import com.elink.esua.epdc.dto.ReportIssueDTO;
@@ -31,15 +37,19 @@ import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO;
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO;
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO;
+import com.elink.esua.epdc.modules.feign.AdminFeignClient;
+import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.reportissue.dao.ReportIssueDao;
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity;
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.apache.commons.lang3.StringUtils;
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.Arrays;
import java.util.List;
import java.util.Map;
@@ -56,6 +66,13 @@ public class ReportIssueServiceImpl extends BaseServiceImpl page(Map params) {
// 检索条件
@@ -128,11 +145,56 @@ public class ReportIssueServiceImpl extends BaseServiceImpl textList = new ArrayList<>();
+ textList.add(formDto.getContent());
+ // 获取所有上级机构名称和ID拼接
+ ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
+ CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
+ CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages());
+ if(!isConReview &&
+ ((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
+ //组装要保存的信息
+ SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
+ formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.ISSUE_SUBMIT.getCode(), textList,
+ formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
+ contentSecurityFeign.insertViolationsRecord(record);
+ return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
+ }
+ //内容审核 - end
ReportIssueEntity entity = ConvertUtils.sourceToTarget(formDto, ReportIssueEntity.class);
if (insert(entity)) {
// 保存图片
customImgService.saveImages(formDto.getImages(), entity.getId(), CustomImageConstant.IMAGE_TYPE_YJFW_JSQF_JBWT);
}
+ //内容审核 - start
+ //接口异常,保存至待审核信息
+ if((contentResult == null || imgResult == null) && !isConReview) {
+ SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
+ formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_SUBMIT.getCode(), textList,
+ formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
+ contentSecurityFeign.insertRecords(record);
+ }
+
+ //保存待审核记录
+ if (contentResult != null && imgResult != null) {
+ CheckResultMessageDTO twoTypes = null;
+ if(isConReview){
+ twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
+ }else{
+ twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
+ }
+ if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
+ //组装要保存的信息
+ SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
+ formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_SUBMIT.getCode(), textList,
+ formDto.getImages(), entity.getId(), null, null, twoTypes, formDto.getMobile(), "0",deptDto);
+ contentSecurityFeign.insertRecords(record);
+ }
+ }
+ //内容审核 - end
+
return new Result();
}
@@ -160,5 +222,58 @@ public class ReportIssueServiceImpl extends BaseServiceImpl eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != eventsList && eventsList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, eventsList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+
+ // 更新网格名称
+ baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
+ /**
+ * 组织机构信息处理
+ *
+ * @return java.util.List
+ * @params [dto, userList]
+ * @author liuchuang
+ * @since 2020/3/7 15:22
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) {
+ List entities = new ArrayList<>();
+ for (ReportIssueDTO user : userList) {
+ ReportIssueEntity entity = new ReportIssueEntity();
+ if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(user.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(user.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
new file mode 100644
index 00000000..3b5b66f5
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
@@ -0,0 +1,63 @@
+package com.elink.esua.epdc.modules.rocketmq.consumer;
+
+import com.alibaba.fastjson.JSONObject;
+import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant;
+import com.elink.esua.epdc.modules.archives.service.ArchivesService;
+import com.elink.esua.epdc.modules.archivesdept.service.ArchivesDeptService;
+import com.elink.esua.epdc.modules.dept.service.DeptInfoService;
+import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.rocketmq.common.message.MessageExt;
+import org.apache.rocketmq.spring.annotation.MessageModel;
+import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
+import org.apache.rocketmq.spring.core.RocketMQListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ *
+ * 组织机构信息修改-监听MQ消息
+ *
+ * @Author:liuchuang
+ * @Date:2020/3/6 0:21
+ */
+@Slf4j
+@Component
+@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_ORGANIZATION, consumerGroup = "${rocketmq.consumer.group}", messageModel = MessageModel.BROADCASTING)
+public class OrganizationModifyConsumer implements RocketMQListener {
+
+ @Autowired
+ private ArchivesService archivesService;
+
+ @Autowired
+ private ArchivesDeptService archivesDeptService;
+
+ @Autowired
+ private DeptInfoService deptInfoService;
+
+ @Autowired
+ private ReportIssueService reportIssueService;
+
+ @Override
+ public void onMessage(MessageExt messageExt) {
+ log.info("EPDC-CUSTOM-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
+ try {
+ String charset = "UTF-8";
+ String body = new String(messageExt.getBody(), charset);
+ OrganizationModifyDTO dto = JSONObject.parseObject(body, OrganizationModifyDTO.class);
+ // 档案修改组织机构信息
+ archivesService.modifyOrganizationInfo(dto);
+ // 档案部门修改组织机构信息
+ archivesDeptService.modifyOrganizationInfo(dto);
+ // 部门信息表修改组织机构信息
+ deptInfoService.modifyOrganizationInfo(dto);
+ // 我要举报修改组织机构信息
+ reportIssueService.modifyOrganizationInfo(dto);
+ log.info("EPDC-CUSTOM-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body);
+ } catch (Exception e) {
+ log.info("EPDC-CUSTOM-SERVER消费消息失败:msgId:{}", messageExt.getMsgId());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/dto/OrganizationModifyDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/dto/OrganizationModifyDTO.java
new file mode 100644
index 00000000..f0f6ff6e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/dto/OrganizationModifyDTO.java
@@ -0,0 +1,37 @@
+package com.elink.esua.epdc.modules.rocketmq.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *
+ * 组织机构信息修改-接收MQ消息DTO
+ *
+ * @Author:liuchuang
+ * @Date:2020/3/6 22:34
+ */
+@Data
+public class OrganizationModifyDTO implements Serializable {
+ private static final long serialVersionUID = 6288521726874495827L;
+
+ /**
+ * 部门ID
+ */
+ private Long deptId;
+
+ /**
+ * 旧部门名称
+ */
+ private String oldDeptName;
+
+ /**
+ * 新部门名称
+ */
+ private String newDeptName;
+
+ /**
+ * 部门类型
+ */
+ private String typeKey;
+}
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml
index b309ded2..58b8154a 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/application.yml
@@ -68,3 +68,10 @@ mybatis-plus:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
+
+
+rocketmq:
+ name-server: @rocketmq.name.server@
+ consumer:
+ group: @rocketmq.consumer.group@
+
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archives/ArchivesDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archives/ArchivesDao.xml
index e8b1e0b0..064382ba 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archives/ArchivesDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archives/ArchivesDao.xml
@@ -25,6 +25,9 @@
+
+ UPDATE epdc_archives SET DEPT = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}
+
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archivesdept/ArchivesDeptDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archivesdept/ArchivesDeptDao.xml
index f285c6f7..719a00a7 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archivesdept/ArchivesDeptDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/archivesdept/ArchivesDeptDao.xml
@@ -15,6 +15,9 @@
+
+ UPDATE epdc_archives_dept SET DEPT = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/dept/DeptInfoDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/dept/DeptInfoDao.xml
index d2c7bee7..5303d48c 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/dept/DeptInfoDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/dept/DeptInfoDao.xml
@@ -16,6 +16,9 @@
+
+ UPDATE epdc_dept_info SET DEPT_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}
+
-
+
+
+ UPDATE epdc_report_issue SET DEPT_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/specialuser/SpecialUserDao.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/specialuser/SpecialUserDao.xml
index f2cf0ccb..4df8ee49 100644
--- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/specialuser/SpecialUserDao.xml
+++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/specialuser/SpecialUserDao.xml
@@ -66,7 +66,8 @@
and SU_DISABILITY_TYPE = #{suDisabilityType}
- and SU_VILLAGE = #{suVillage}
+ and SU_VILLAGE
+ like concat('%', #{suVillage}, '%')
and SU_IS_LOW = '1'
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/dao/HandleRoleDeptDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/dao/HandleRoleDeptDao.java
index c7f429aa..72970213 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/dao/HandleRoleDeptDao.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/dao/HandleRoleDeptDao.java
@@ -42,4 +42,12 @@ public interface HandleRoleDeptDao extends BaseDao {
List queryWhistleDeptIdList(String roleId);
int deleteByRoleId(String roleId);
+ /**
+ * @Description 修改处理部门名称
+ * @Author songyunpeng
+ * @Date 2020/11/24
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateDeptNameByDeptId(String newDeptName, Long deptId);
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/HandleRoleDeptService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/HandleRoleDeptService.java
index 7e540df4..1d2bbfed 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/HandleRoleDeptService.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/HandleRoleDeptService.java
@@ -25,6 +25,7 @@ import com.elink.esua.epdc.dto.handleroledept.HandleRoleDeptDTO;
import com.elink.esua.epdc.dto.handleroledept.form.HandleRoleDeptFormDTO;
import com.elink.esua.epdc.dto.handleroledept.result.HandleRoleDeptPermissionDTO;
import com.elink.esua.epdc.modules.handleroledept.entity.HandleRoleDeptEntity;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -123,4 +124,12 @@ public interface HandleRoleDeptService extends BaseService
* @Date 2019/12/26 15:01
**/
Result> listHandleRoleDeptPermission(String roleId);
+ /**
+ * @Description 修改处理部门名称
+ * @Author songyunpeng
+ * @Date 2020/11/24
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/impl/HandleRoleDeptServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/impl/HandleRoleDeptServiceImpl.java
index f7a7572c..d6aa22eb 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/impl/HandleRoleDeptServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/handleroledept/service/impl/HandleRoleDeptServiceImpl.java
@@ -21,9 +21,9 @@ import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
+import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
-import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.handleroledept.HandleRoleDeptDTO;
import com.elink.esua.epdc.dto.handleroledept.form.HandleRoleDeptFormDTO;
@@ -32,7 +32,7 @@ import com.elink.esua.epdc.modules.handleroledept.dao.HandleRoleDeptDao;
import com.elink.esua.epdc.modules.handleroledept.entity.HandleRoleDeptEntity;
import com.elink.esua.epdc.modules.handleroledept.redis.HandleRoleDeptRedis;
import com.elink.esua.epdc.modules.handleroledept.service.HandleRoleDeptService;
-import com.elink.esua.epdc.modules.rolecategory.entity.HandleRoleCategoryEntity;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -163,5 +163,10 @@ public class HandleRoleDeptServiceImpl extends BaseServiceImpl list = ConvertUtils.sourceToTarget(handleRoleDeptEntityList, HandleRoleDeptPermissionDTO.class);
return new Result>().ok(list);
}
+ @Override
+ public void modifyOrganizationInfo(OrganizationModifyDTO dto) {
+ // 更新部门名称
+ baseDao.updateDeptNameByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
index 3d6f3db5..392f5211 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
@@ -3,6 +3,7 @@ package com.elink.esua.epdc.modules.rocketmq.consumer;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
+import com.elink.esua.epdc.modules.handleroledept.service.HandleRoleDeptService;
import com.elink.esua.epdc.modules.issue.service.IssueHandleService;
import com.elink.esua.epdc.modules.issue.service.IssueService;
import com.elink.esua.epdc.modules.item.service.*;
@@ -51,6 +52,11 @@ public class OrganizationModifyConsumer implements RocketMQListener
@Autowired
private ItemInformationService itemInformationService;
+
+ @Autowired
+ private HandleRoleDeptService handleRoleDeptService;
+
+
@Override
public void onMessage(MessageExt messageExt) {
log.info("EPDC-EVENTS-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
@@ -74,6 +80,8 @@ public class OrganizationModifyConsumer implements RocketMQListener
itemHandleProcessService.modifyOrganizationInfo(dto);
//项目消息表修改处理部门
itemInformationService.modifyOrganizationInfo(dto);
+ //处理部门角色权限表处理部门
+ handleRoleDeptService.modifyOrganizationInfo(dto);
log.info("EPDC-EVENTS-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body);
} catch (Exception e) {
log.info("EPDC-EVENTS-SERVER消费消息失败:msgId:{}", messageExt.getMsgId());
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/handleroledept/HandleRoleDeptDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/handleroledept/HandleRoleDeptDao.xml
index f55c0325..7ec72143 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/handleroledept/HandleRoleDeptDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/handleroledept/HandleRoleDeptDao.xml
@@ -28,4 +28,8 @@
delete from epdc_handle_role_dept where ROLE_ID=#{roleId}
+
+ UPDATE epdc_handle_role_dept SET DEPT_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}
+
+
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
index 9023b9c7..93582db9 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
@@ -887,7 +887,7 @@
(
SELECT
'ITEM_COUNT' AS keystr,
- COUNT( * ) AS pendingHandleNum
+ COUNT( DISTINCT item.ID ) AS pendingHandleNum
FROM
epdc_item item
LEFT JOIN epdc_item_dept dept ON item.id = dept.ITEM_ID
@@ -907,7 +907,7 @@
INNER JOIN (
SELECT
'ITEM_COUNT' AS keystr,
- COUNT( * ) AS closingCaseNum
+ COUNT( DISTINCT item.ID ) AS closingCaseNum
FROM
epdc_item item
LEFT JOIN epdc_item_dept dept ON item.id = dept.ITEM_ID
@@ -926,7 +926,7 @@
INNER JOIN (
SELECT
'ITEM_COUNT' AS keystr,
- COUNT( * ) AS closedNum
+ COUNT( DISTINCT item.ID ) AS closedNum
FROM
epdc_item item
LEFT JOIN epdc_item_dept dept ON item.id = dept.ITEM_ID
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyInfoFormDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyInfoFormDTO.java
index 0d75f246..7e83cfb4 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyInfoFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActApplyInfoFormDTO.java
@@ -142,4 +142,10 @@ public class ActApplyInfoFormDTO implements Serializable {
*/
private String allDeptNames;
+
+ /**
+ *是否提交为内容待审核状态
+ */
+ private Boolean isConReview;
+
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
index 359828a1..8ec991aa 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml
@@ -175,6 +175,8 @@
47.104.85.99:9876;114.215.125.123:9876
jinshui-contentSecurityGroup
+ jinshui-organizationGroup
+
@@ -203,6 +205,8 @@
47.104.85.99:9876;114.215.125.123:9876
jinshui-contentSecurityGroup
+ jinshui-organizationGroup
+
@@ -233,6 +237,8 @@
172.16.0.7:9876;172.16.0.8:9876
jinshui-contentSecurityGroup
+ jinshui-organizationGroup
+
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActApplyInfoDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActApplyInfoDao.java
index 9832eb3b..176fc3f8 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActApplyInfoDao.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActApplyInfoDao.java
@@ -17,6 +17,7 @@
package com.elink.esua.epdc.modules.activity.dao;
+import com.elink.esua.epdc.activity.ActApplyInfoDTO;
import com.elink.esua.epdc.activity.form.ActApplyRecordFormDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
@@ -41,4 +42,22 @@ public interface ActApplyInfoDao extends BaseDao {
* @return java.util.List
**/
List selectListActApplyRecord(ActApplyRecordFormDTO actApplyRecordFormDTO);
+ /**
+ * @Description 查询需要修改组织机构信息事件
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String toString);
+ /**
+ *
+ * 更新网格名称
+ *
+ * @params [newDeptName, deptId]
+ * @return void
+ * @author liuchuang
+ * @since 2020/3/7 1:20
+ */
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActApplyInfoService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActApplyInfoService.java
index f869a204..1b77a53c 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActApplyInfoService.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActApplyInfoService.java
@@ -25,6 +25,7 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.activity.entity.ActApplyInfoEntity;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -120,4 +121,12 @@ public interface ActApplyInfoService extends BaseService {
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result> applyRecord(ActApplyRecordFormDTO actApplyRecordFormDTO);
+ /**
+ * @Description 活动申请修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java
index 388b1e2f..8a8dae29 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java
@@ -27,21 +27,27 @@ import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.security.content.CheckDataUtils;
+import com.elink.esua.epdc.commons.tools.security.content.ModuleName;
+import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO;
+import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO;
+import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO;
+import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.activity.dao.ActApplyInfoDao;
import com.elink.esua.epdc.modules.activity.entity.ActApplyInfoEntity;
import com.elink.esua.epdc.modules.activity.redis.ActApplyInfoRedis;
import com.elink.esua.epdc.modules.activity.service.ActApplyInfoService;
+import com.elink.esua.epdc.modules.feign.AdminFeignClient;
+import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 活动申请信息表
@@ -54,7 +60,10 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl page(Map params) {
IPage page = baseDao.selectPage(
@@ -128,9 +137,52 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl textList = new ArrayList<>();
+ textList.add(dto.getActContent());
+ // 获取所有上级机构名称和ID拼接
+ ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(dto.getGridId()).getData();
+ CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
+ if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
+ //组装要保存的信息
+ SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
+ dto.getNickname(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
+ ModuleName.ISSUE_COMMENT.getCode(), textList,null, null,contentResult,
+ null,null,dto.getMobile(),"0",deptDto);
+ contentSecurityFeign.insertViolationsRecord(record);
+ return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
+ }
+ //内容审核 - end
ActApplyInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActApplyInfoEntity.class);
insert(entity);
+
+ //内容审核 - 开始
+ //接口异常,保存至待审核信息
+ if(contentResult == null && !isConReview) {
+ SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
+ dto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_COMMENT.getCode(), textList,
+ null, entity.getId(),null,null, null,dto.getMobile(),"1",deptDto);
+ contentSecurityFeign.insertRecords(record);
+ }
+
+ //判断是否为待审核
+ if (contentResult != null) {
+ CheckResultMessageDTO twoTypes = null;
+ if(isConReview){
+ twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
+ }else{
+ twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
+ }
+ if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
+ //组装要保存的信息
+ SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
+ dto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_COMMENT.getCode(), textList,
+ null,entity.getId(), null,null,twoTypes,dto.getMobile(),"0",deptDto);
+ contentSecurityFeign.insertRecords(record);
+ }
+ }
+ //内容审核 - 结束
return new Result();
}
@@ -143,4 +195,58 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl>().ok(actApplyRecordResultDTOS);
}
+ @Override
+ public void modifyOrganizationInfo(OrganizationModifyDTO dto) {
+ // 查询需要修改组织机构信息事件
+ List eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != eventsList && eventsList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, eventsList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+
+ // 更新网格名称
+ baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
+ /**
+ *
+ * 组织机构信息处理
+ *
+ * @params [dto, eventsList]
+ * @return java.util.List
+ * @author liuchuang
+ * @since 2020/3/7 1:17
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List eventsList) {
+ List entities = new ArrayList<>();
+ for (ActApplyInfoDTO events: eventsList) {
+ ActApplyInfoEntity entity = new ActApplyInfoEntity();
+ if (StringUtils.isNotEmpty(events.getParentDeptIds()) && StringUtils.isNotEmpty(events.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(events.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(events.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(events.getAllDeptIds()) && StringUtils.isNotEmpty(events.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(events.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(events.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
new file mode 100644
index 00000000..25c15850
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/OrganizationModifyConsumer.java
@@ -0,0 +1,46 @@
+package com.elink.esua.epdc.modules.rocketmq.consumer;
+
+import com.alibaba.fastjson.JSONObject;
+import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant;
+import com.elink.esua.epdc.modules.activity.service.ActApplyInfoService;
+import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.rocketmq.common.message.MessageExt;
+import org.apache.rocketmq.spring.annotation.MessageModel;
+import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
+import org.apache.rocketmq.spring.core.RocketMQListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ *
+ * 组织机构信息修改-监听MQ消息
+ *
+ * @Author:liuchuang
+ * @Date:2020/3/6 0:21
+ */
+@Slf4j
+@Component
+@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_ORGANIZATION, consumerGroup = "${rocketmq.consumer.group}", messageModel = MessageModel.BROADCASTING)
+public class OrganizationModifyConsumer implements RocketMQListener {
+
+ @Autowired
+ private ActApplyInfoService actApplyInfoService;
+
+
+ @Override
+ public void onMessage(MessageExt messageExt) {
+ log.info("EPDC-HEART-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
+ try {
+ String charset = "UTF-8";
+ String body = new String(messageExt.getBody(), charset);
+ OrganizationModifyDTO dto = JSONObject.parseObject(body, OrganizationModifyDTO.class);
+ // 活动申请修改组织机构信息
+ actApplyInfoService.modifyOrganizationInfo(dto);
+ log.info("EPDC-HEART-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body);
+ } catch (Exception e) {
+ log.info("EPDC-HEART-SERVER消费消息失败:msgId:{}", messageExt.getMsgId());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java
index d48f5f35..bb2d7c6d 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/consumer/RejectCheckRecordConsumer.java
@@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
*/
@Slf4j
@Component
-@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_HEART_CONTENTSECURITY, consumerGroup = "${rocketmq.consumer.group}", messageModel = MessageModel.BROADCASTING)
+@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_HEART_CONTENTSECURITY, consumerGroup = "${rocketmq.consumer.contentSecurity-group}", messageModel = MessageModel.BROADCASTING)
public class RejectCheckRecordConsumer implements RocketMQListener {
@Autowired
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/dto/OrganizationModifyDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/dto/OrganizationModifyDTO.java
new file mode 100644
index 00000000..f0f6ff6e
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/rocketmq/dto/OrganizationModifyDTO.java
@@ -0,0 +1,37 @@
+package com.elink.esua.epdc.modules.rocketmq.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *
+ * 组织机构信息修改-接收MQ消息DTO
+ *
+ * @Author:liuchuang
+ * @Date:2020/3/6 22:34
+ */
+@Data
+public class OrganizationModifyDTO implements Serializable {
+ private static final long serialVersionUID = 6288521726874495827L;
+
+ /**
+ * 部门ID
+ */
+ private Long deptId;
+
+ /**
+ * 旧部门名称
+ */
+ private String oldDeptName;
+
+ /**
+ * 新部门名称
+ */
+ private String newDeptName;
+
+ /**
+ * 部门类型
+ */
+ private String typeKey;
+}
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/application.yml
index 1b7dee0c..2b3e99a5 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/application.yml
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/application.yml
@@ -91,4 +91,5 @@ mybatis-plus:
rocketmq:
name-server: @rocketmq.name.server@
consumer:
- group: @rocketmq.consumer.contentSecurity.group@
\ No newline at end of file
+ group: @rocketmq.consumer.group@
+ contentSecurity-group: @rocketmq.consumer.contentSecurity.group@
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActApplyInfoDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActApplyInfoDao.xml
index 03b718e5..0c9dcfe7 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActApplyInfoDao.xml
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActApplyInfoDao.xml
@@ -42,6 +42,20 @@
order by CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
-
+
+
+ UPDATE epdc_act_apply_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml
index a7988b4e..b444ddd9 100644
--- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml
+++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml
@@ -97,10 +97,10 @@
AND relation.STATUS = #{status}
- AND relation.MOBILE = trim(#{mobile})
+ AND relation.MOBILE like concat('%',trim(#{mobile}), '%')
- AND relation.REAL_NAME = trim(#{realName})
+ AND relation.REAL_NAME like concat('%',trim(#{realName}), '%')
AND relation.ACT_ID = #{actId}
@@ -173,10 +173,10 @@
AND relation.STATUS = #{status}
- AND relation.MOBILE = trim(#{mobile})
+ AND relation.MOBILE like concat('%',trim(#{mobile}), '%')
- AND relation.REAL_NAME = trim(#{realName})
+ AND relation.REAL_NAME like concat('%',trim(#{realName}), '%')
AND relation.ACT_ID = #{actId}
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyTopicSubmitFormDTO.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyTopicSubmitFormDTO.java
index 7e326411..f8e4499b 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyTopicSubmitFormDTO.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/form/PartyTopicSubmitFormDTO.java
@@ -3,6 +3,7 @@ package com.elink.esua.epdc.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -22,8 +23,8 @@ public class PartyTopicSubmitFormDTO implements Serializable {
/**
* 话题内容
*/
- @NotBlank(message = "话题内容不能为空且在2000个字以内")
- @Size(min = 1, max = 2000, message = "话题内容不能为空且在2000个字以内")
+ @NotBlank(message = "话题内容不能为空且在1000个字以内")
+ @Size(min = 1, max = 1000, message = "话题内容不能为空且在1000个字以内")
private String topicContent;
/**
@@ -41,13 +42,13 @@ public class PartyTopicSubmitFormDTO implements Serializable {
/**
* 话题位置纬度
*/
- @NotBlank(message = "话题位置纬度不能为空")
+ @NotNull(message = "话题位置纬度不能为空")
private BigDecimal topicLatitude;
/**
* 话题位置经度
*/
- @NotBlank(message = "话题位置经度不能为空")
+ @NotNull(message = "话题位置经度不能为空")
private BigDecimal topicLongitude;
/**
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml
index 63cf62b2..37057014 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/pom.xml
@@ -157,6 +157,7 @@
47.104.85.99:9876;114.215.125.123:9876
jinshui-contentSecurityGroup
+ jinshui-organizationGroup
@@ -186,6 +187,8 @@
47.104.85.99:9876;114.215.125.123:9876
jinshui-contentSecurityGroup
+ jinshui-organizationGroup
+
@@ -217,6 +220,8 @@
172.16.0.7:9876;172.16.0.8:9876
jinshui-contentSecurityGroup
+ jinshui-organizationGroup
+
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java
index 83988fb6..77ab2a49 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/AppPartyTopicController.java
@@ -17,7 +17,6 @@
package com.elink.esua.epdc.controller;
-import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
@@ -75,6 +74,7 @@ public class AppPartyTopicController {
**/
@PostMapping("submit")
public Result submit(@RequestBody PartyTopicSubmitFormDTO formDto) {
+ ValidatorUtils.validateEntity(formDto);
return partyTopicService.saveTopic(formDto);
}
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java
index 8c449e9b..a875d163 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupDao.java
@@ -74,4 +74,20 @@ public interface PartyGroupDao extends BaseDao {
* @return com.elink.esua.epdc.dto.PartyGroupDTO
**/
PartyGroupDTO getPartyGroupDTOByName(String partyGroupName);
+ /**
+ * @Description 查询需要修改组织机构信息事件
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String toString);
+ /**
+ * @Description
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java
index 78a31f7b..b1ae0f12 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyTopicDao.java
@@ -128,4 +128,20 @@ public interface PartyTopicDao extends BaseDao {
* @since 2020/9/8 13:55
*/
void updateTopicTopFlagById(@Param("formDto") PartyGroupTopicTopFormDTO formDto);
+ /**
+ * @Description 查询需要修改组织机构信息事件
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String toString);
+ /**
+ * @Description
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyUserGroupDao.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyUserGroupDao.java
index 1bedb519..17315cec 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyUserGroupDao.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyUserGroupDao.java
@@ -86,4 +86,20 @@ public interface PartyUserGroupDao extends BaseDao {
* @return void
**/
void updateInfoByUserId(PartyUserNewInfoFormDTO formDTO);
+ /**
+ * @Description 查询需要修改组织机构信息事件
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String toString);
+ /**
+ * @Description
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [newDeptName, deptId]
+ * @return void
+ **/
+ void updateGridByDeptId(String newDeptName, Long deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java
new file mode 100644
index 00000000..171216d0
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java
@@ -0,0 +1,56 @@
+package com.elink.esua.epdc.rocketmq.consumer;
+
+import com.alibaba.fastjson.JSONObject;
+import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
+import com.elink.esua.epdc.service.PartyGroupService;
+import com.elink.esua.epdc.service.PartyTopicService;
+import com.elink.esua.epdc.service.PartyUserGroupService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.rocketmq.common.message.MessageExt;
+import org.apache.rocketmq.spring.annotation.MessageModel;
+import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
+import org.apache.rocketmq.spring.core.RocketMQListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ *
+ * 组织机构信息修改-监听MQ消息
+ *
+ * @Author:liuchuang
+ * @Date:2020/3/6 0:21
+ */
+@Slf4j
+@Component
+@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_ORGANIZATION, consumerGroup = "${rocketmq.consumer.group}", messageModel = MessageModel.BROADCASTING)
+public class OrganizationModifyConsumer implements RocketMQListener {
+
+ @Autowired
+ private PartyTopicService partyTopicService;
+ @Autowired
+ private PartyGroupService partyGroupService;
+ @Autowired
+ private PartyUserGroupService partyUserGroupService;
+
+
+ @Override
+ public void onMessage(MessageExt messageExt) {
+ log.info("EPDC-HEART-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
+ try {
+ String charset = "UTF-8";
+ String body = new String(messageExt.getBody(), charset);
+ OrganizationModifyDTO dto = JSONObject.parseObject(body, OrganizationModifyDTO.class);
+ // 话题修改组织机构信息
+ partyTopicService.modifyOrganizationInfo(dto);
+ // 党群修改组织机构信息
+ partyGroupService.modifyOrganizationInfo(dto);
+ // 党群成员修改组织机构信息
+ partyUserGroupService.modifyOrganizationInfo(dto);
+ log.info("EPDC-HEART-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body);
+ } catch (Exception e) {
+ log.info("EPDC-HEART-SERVER消费消息失败:msgId:{}", messageExt.getMsgId());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/RejectCheckRecordConsumer.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/RejectCheckRecordConsumer.java
index e1198b67..435138dc 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/RejectCheckRecordConsumer.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/RejectCheckRecordConsumer.java
@@ -22,7 +22,7 @@ import org.springframework.stereotype.Component;
*/
@Slf4j
@Component
-@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_GROUP_CONTENTSECURITY, consumerGroup = "${rocketmq.consumer.group}", messageModel = MessageModel.BROADCASTING)
+@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_GROUP_CONTENTSECURITY, consumerGroup = "${rocketmq.consumer.contentSecurity-group}", messageModel = MessageModel.BROADCASTING)
public class RejectCheckRecordConsumer implements RocketMQListener {
@Autowired
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java
new file mode 100644
index 00000000..82dbee03
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java
@@ -0,0 +1,37 @@
+package com.elink.esua.epdc.rocketmq.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *
+ * 组织机构信息修改-接收MQ消息DTO
+ *
+ * @Author:liuchuang
+ * @Date:2020/3/6 22:34
+ */
+@Data
+public class OrganizationModifyDTO implements Serializable {
+ private static final long serialVersionUID = 6288521726874495827L;
+
+ /**
+ * 部门ID
+ */
+ private Long deptId;
+
+ /**
+ * 旧部门名称
+ */
+ private String oldDeptName;
+
+ /**
+ * 新部门名称
+ */
+ private String newDeptName;
+
+ /**
+ * 部门类型
+ */
+ private String typeKey;
+}
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java
index 67a632e6..e792cd1c 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java
@@ -27,6 +27,7 @@ import com.elink.esua.epdc.dto.form.PartyGroupListFormDTO;
import com.elink.esua.epdc.dto.form.PartyUserJoinGroupFormDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.entity.PartyGroupEntity;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -146,5 +147,12 @@ public interface PartyGroupService extends BaseService {
* @return com.elink.esua.epdc.dto.PartyGroupDTO
**/
PartyGroupDTO getPartyGroupDTOByName(String partyGroupName);
-
+ /**
+ * @Description 修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java
index 616d527e..6c116c76 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyTopicService.java
@@ -26,6 +26,7 @@ import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO;
import com.elink.esua.epdc.dto.result.PartyTopicResultDTO;
import com.elink.esua.epdc.entity.PartyTopicEntity;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.rocketmq.dto.RejectRecordDTO;
import java.util.List;
@@ -200,4 +201,12 @@ public interface PartyTopicService extends BaseService {
* @since 2020/9/8 9:44
*/
Result modifyTopicTopFlag(PartyGroupTopicTopFormDTO formDto);
+ /**
+ * @Description 修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyUserGroupService.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyUserGroupService.java
index e54e7bc4..42f4d21a 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyUserGroupService.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyUserGroupService.java
@@ -29,6 +29,7 @@ import com.elink.esua.epdc.dto.form.PartyUserIdentityFormDTO;
import com.elink.esua.epdc.dto.form.PartyUserNewInfoFormDTO;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.entity.PartyUserGroupEntity;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -173,4 +174,12 @@ public interface PartyUserGroupService extends BaseService
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result updateInfo(PartyUserNewInfoFormDTO formDTO);
+ /**
+ * @Description 修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java
index a469d97f..7ca30f54 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java
@@ -31,10 +31,12 @@ import com.elink.esua.epdc.dto.form.PartyGroupListFormDTO;
import com.elink.esua.epdc.dto.form.PartyUserJoinGroupFormDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.entity.PartyGroupEntity;
+import com.elink.esua.epdc.entity.PartyTopicEntity;
import com.elink.esua.epdc.entity.PartyUserGroupEntity;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.UserFeignClient;
import com.elink.esua.epdc.redis.PartyGroupRedis;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.service.PartyGroupService;
import com.elink.esua.epdc.service.PartyUserGroupService;
import org.apache.commons.lang3.StringUtils;
@@ -42,10 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 党群表
@@ -307,5 +306,59 @@ public class PartyGroupServiceImpl extends BaseServiceImpl eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != eventsList && eventsList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, eventsList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+
+ // 更新网格名称
+ baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
+ /**
+ *
+ * 组织机构信息处理
+ *
+ * @params [dto, eventsList]
+ * @return java.util.List
+ * @author liuchuang
+ * @since 2020/3/7 1:17
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List eventsList) {
+ List entities = new ArrayList<>();
+ for (PartyGroupDTO events: eventsList) {
+ PartyGroupEntity entity = new PartyGroupEntity();
+ if (StringUtils.isNotEmpty(events.getParentDeptIds()) && StringUtils.isNotEmpty(events.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(events.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(events.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(events.getAllDeptIds()) && StringUtils.isNotEmpty(events.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(events.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(events.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java
index 4fc4469c..be789b99 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java
@@ -47,6 +47,7 @@ import com.elink.esua.epdc.entity.PartyTopicEntity;
import com.elink.esua.epdc.entity.PartyTopicUserAttitudeEntity;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.ContentSecurityFeignClient;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.service.PartyTopicImgService;
import com.elink.esua.epdc.service.PartyTopicService;
@@ -339,4 +340,59 @@ public class PartyTopicServiceImpl extends BaseServiceImpl eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != eventsList && eventsList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, eventsList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+
+ // 更新网格名称
+ baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
+ /**
+ *
+ * 组织机构信息处理
+ *
+ * @params [dto, eventsList]
+ * @return java.util.List
+ * @author liuchuang
+ * @since 2020/3/7 1:17
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List eventsList) {
+ List entities = new ArrayList<>();
+ for (PartyTopicDTO events: eventsList) {
+ PartyTopicEntity entity = new PartyTopicEntity();
+ if (StringUtils.isNotEmpty(events.getParentDeptIds()) && StringUtils.isNotEmpty(events.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(events.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(events.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(events.getAllDeptIds()) && StringUtils.isNotEmpty(events.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(events.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(events.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
+
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java
index 24c9831d..bc4bcaf7 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyUserGroupServiceImpl.java
@@ -41,16 +41,14 @@ import com.elink.esua.epdc.entity.PartyUserGroupEntity;
import com.elink.esua.epdc.enums.BannedEnum;
import com.elink.esua.epdc.feign.UserFeignClient;
import com.elink.esua.epdc.redis.PartyUserGroupRedis;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.service.PartyUserGroupService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 党群成员关系表
@@ -235,6 +233,61 @@ public class PartyUserGroupServiceImpl extends BaseServiceImpl eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != eventsList && eventsList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, eventsList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+
+ // 更新网格名称
+ baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId());
+ }
+ /**
+ *
+ * 组织机构信息处理
+ *
+ * @params [dto, eventsList]
+ * @return java.util.List
+ * @author liuchuang
+ * @since 2020/3/7 1:17
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List eventsList) {
+ List entities = new ArrayList<>();
+ for (PartyUserGroupDTO events: eventsList) {
+ PartyUserGroupEntity entity = new PartyUserGroupEntity();
+ if (StringUtils.isNotEmpty(events.getParentDeptIds()) && StringUtils.isNotEmpty(events.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(events.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(events.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(events.getAllDeptIds()) && StringUtils.isNotEmpty(events.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(events.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(events.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(events.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
+
private void modifyIdentityFlag(String groupUserId, String identityFlag) {
//判断是否是指定群主操作
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/application.yml
index 7b5f06bb..3ee8d134 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/application.yml
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/application.yml
@@ -91,4 +91,5 @@ mybatis-plus:
rocketmq:
name-server: @rocketmq.name.server@
consumer:
- group: @rocketmq.consumer.contentSecurity.group@
+ group: @rocketmq.consumer.group@
+ contentSecurity-group: @rocketmq.consumer.contentSecurity.group@
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml
index 5bade5fe..78ad9ee9 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupDao.xml
@@ -109,4 +109,19 @@
+
+
+ UPDATE epdc_party_topic SET DEPT = #{newDeptName}, UPDATED_TIME = NOW() WHERE DEPT_ID = #{deptId}
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml
index 682dd618..d648e246 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml
@@ -341,7 +341,21 @@
AND pt.ID = #{formDto.topicId}
AND ug.USER_ID = #{formDto.userId}
-
+
+
+ UPDATE epdc_party_topic SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
+
UPDATE epdc_party_topic SET TOP_FLAG = #{formDto.topFlag}
diff --git a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml
index 3278d0f4..b23a77aa 100644
--- a/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml
+++ b/esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyUserGroupDao.xml
@@ -250,4 +250,19 @@
and PARTY_GROUP_ID = #{partyGroupId} and USER_ID = #{userId}
LIMIT 1
+
+
+ UPDATE epdc_party_user_group SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/logback-spring.xml b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/logback-spring.xml
index 5deef210..9a7b782c 100644
--- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/logback-spring.xml
+++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/logback-spring.xml
@@ -1,21 +1,159 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ debug
+
+
+ ${CONSOLE_LOG_PATTERN}
+
+ UTF-8
+
+
+
+
+
+
+
+ ${log.path}/debug.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+
+ ${log.path}/debug-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ debug
+ ACCEPT
+ DENY
+
+
+
+
+
+
+ ${log.path}/info.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+
+ ${log.path}/info-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ info
+ ACCEPT
+ DENY
+
+
+
+
+
+
+ ${log.path}/warn.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+ ${log.path}/warn-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ warn
+ ACCEPT
+ DENY
+
+
+
+
+
+
+ ${log.path}/error.log
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
+ UTF-8
+
+
+
+ ${log.path}/error-%d{yyyy-MM-dd}.%i.log
+
+ 100MB
+
+
+ 15
+
+
+
+ ERROR
+ ACCEPT
+ DENY
+
+
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HousingInformationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HousingInformationDao.java
index 24b32ade..6d77517e 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HousingInformationDao.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HousingInformationDao.java
@@ -77,4 +77,12 @@ public interface HousingInformationDao extends BaseDao
* @return java.util.List
**/
List getHouseInfoByHouseHeadID(String houseHeadId);
+ /**
+ * @Description 查询需要修改的组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/24
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String deptId);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java
index c6381d10..2888fcf5 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java
@@ -168,4 +168,13 @@ public interface VolunteerInfoDao extends BaseDao {
* @return void
**/
void updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto);
+
+ /**
+ * @Description 查询需要修改的组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/24
+ * @Param [toString]
+ * @return java.util.List
+ **/
+ List selectListOfOrganizationInfo(String deptId);
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java
index b8ef0d0f..af1afb8f 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java
@@ -39,6 +39,12 @@ public class OrganizationModifyConsumer implements RocketMQListener
@Autowired
private UserInvitationRecordService userInvitationRecordService;
+ @Autowired
+ private VolunteerInfoService volunteerInfoService;
+
+ @Autowired
+ private HousingInformationService housingInformationService;
+
@Override
public void onMessage(MessageExt messageExt) {
log.info("EPDC-USER-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId());
@@ -56,6 +62,11 @@ public class OrganizationModifyConsumer implements RocketMQListener
userGridRelationService.modifyOrganizationInfo(dto);
// 用户邀请记录表修改组织机构信息
userInvitationRecordService.modifyOrganizationInfo(dto);
+ //志愿者修改组织机构信息
+ volunteerInfoService.modifyOrganizationInfo(dto);
+ //房屋信息修改组织结构信息
+ housingInformationService.modifyOrganizationInfo(dto);
+
log.info("EPDC-USER-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body);
} catch (Exception e) {
log.info("EPDC-USER-SERVER消费消息失败:msgId:{}", messageExt.getMsgId());
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HousingInformationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HousingInformationService.java
index 403d1fb0..c1ae74a5 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HousingInformationService.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HousingInformationService.java
@@ -24,6 +24,7 @@ import com.elink.esua.epdc.dto.BasePopulationInformationExportDto;
import com.elink.esua.epdc.dto.BaseResidentInformationExportDto;
import com.elink.esua.epdc.dto.HousingInformationDTO;
import com.elink.esua.epdc.entity.HousingInformationEntity;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@@ -137,4 +138,12 @@ public interface HousingInformationService extends BaseService
**/
List getHouseInfoByHouseHeadID(String houseHeadId);
+ /**
+ * @Description 房屋信息修改组织结构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
index e0c2f2e9..1bb7769c 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
@@ -32,6 +32,7 @@ import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListCountResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO;
import com.elink.esua.epdc.entity.VolunteerInfoEntity;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import java.util.List;
import java.util.Map;
@@ -255,4 +256,12 @@ public interface VolunteerInfoService extends BaseService {
* @Date 14:18 2020-10-29
**/
List exportVolunteerList(Map params);
+ /**
+ * @Description 志愿者修改组织机构信息
+ * @Author songyunpeng
+ * @Date 2020/11/25
+ * @Param [dto]
+ * @return void
+ **/
+ void modifyOrganizationInfo(OrganizationModifyDTO dto);
}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HousingInformationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HousingInformationServiceImpl.java
index 0c237fee..c4af86a2 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HousingInformationServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HousingInformationServiceImpl.java
@@ -40,6 +40,7 @@ import com.elink.esua.epdc.excel.BasePopulationInformationExcel;
import com.elink.esua.epdc.excel.BaseResidentInformationExcel;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.redis.HousingInformationRedis;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.service.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Workbook;
@@ -388,6 +389,56 @@ public class HousingInformationServiceImpl extends BaseServiceImpl userList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != userList && userList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, userList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+ }
+ /**
+ * 组织机构信息处理
+ *
+ * @return java.util.List
+ * @params [dto, userList]
+ * @author liuchuang
+ * @since 2020/3/7 15:22
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) {
+ List entities = new ArrayList<>();
+ for (HousingInformationDTO user : userList) {
+ HousingInformationEntity entity = new HousingInformationEntity();
+ if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(user.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(user.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
/**
* @return void
* @Description 校验完成后插入居民信息
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
index 8e13ac09..73d3e5d2 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
@@ -765,10 +765,10 @@ public class UserServiceImpl extends BaseServiceImpl implem
if (StringUtils.isBlank(userId)) {
return new Result().error("用户Id不能为空");
}
- String idNo = baseDao.getPartyMemberIdNoByUserID(userId);
+ /*String idNo = baseDao.getPartyMemberIdNoByUserID(userId);
if (StringUtils.isBlank(idNo)) {
return new Result().error("用户身份证号为空");
- }
+ }*/
EpdcPartyMemberDetailDto dto = baseDao.partyMemberDetailByUserId(userId);
if (dto == null) {
dto = baseDao.partyMemberDetailFaild(userId);
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
index 8fe425bf..500a09c2 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
@@ -44,6 +44,7 @@ import com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO;
import com.elink.esua.epdc.entity.VolunteerInfoEntity;
import com.elink.esua.epdc.feign.AdminFeignClient;
+import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.service.UserTagRelationService;
import com.elink.esua.epdc.service.VolunteerInfoService;
import org.apache.commons.lang3.StringUtils;
@@ -51,10 +52,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 志愿者信息表
@@ -459,4 +457,56 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl userList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString());
+ if (null != userList && userList.size() > 0) {
+ // 组织机构信息处理
+ List entities = handleOrganizationInfo(dto, userList);
+ // 更新事件组织机构信息
+ updateBatchById(entities);
+ }
+ }
+ /**
+ * 组织机构信息处理
+ *
+ * @return java.util.List
+ * @params [dto, userList]
+ * @author liuchuang
+ * @since 2020/3/7 15:22
+ */
+ private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) {
+ List entities = new ArrayList<>();
+ for (VolunteerInfoDTO user : userList) {
+ VolunteerInfoEntity entity = new VolunteerInfoEntity();
+ if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) {
+ List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(","));
+ List parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-"));
+ int index = parentDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && parentDeptNames.size() > index) {
+ parentDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-"));
+ }
+ }
+
+ if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) {
+ List allDeptIds = Arrays.asList(user.getAllDeptIds().split(","));
+ List allDeptNames = Arrays.asList(user.getAllDeptNames().split("-"));
+ int index = allDeptIds.indexOf(dto.getDeptId().toString());
+ if (index >= 0 && allDeptNames.size() > index) {
+ allDeptNames.set(index, dto.getNewDeptName());
+ entity.setId(user.getId());
+ entity.setAllDeptNames(StringUtils.join(allDeptNames, "-"));
+ }
+ }
+
+ entities.add(entity);
+ }
+
+ return entities;
+ }
}
+
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml
index c9470642..7eb364b0 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml
@@ -184,6 +184,18 @@
where t.DEL_FLAG ='0' and t1.RESIDENT_ID = #{houseHeadId} and t1.IS_HOUSE_HEAD = '1'
+
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml
index f59dfbec..02fb796f 100644
--- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml
@@ -301,4 +301,16 @@
AND DEL_FLAG = '0'
+