diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java index 2d12ab77ce..7b08e851d5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java @@ -54,4 +54,12 @@ public interface AppClientConstant { * app类型-工作端 */ String APP_WORK = "work"; + /** + * 来源类型-话题:topic + */ + String TOPIC = "topic"; + /** + * 来源类型-议题:issue + */ + String ISSUE = "issue"; } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index dfde963dc3..15da7173b4 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -88,6 +88,12 @@ public enum RequirePermissionEnum { WORK_GRASSROOTS_ISSUE_REJECTED_LIST("work_grassroots_issue_rejected_list","基层治理:议题管理:已驳回","已驳回议题申请列表"), WORK_GRASSROOTS_ISSUE_AUDIT("work_grassroots_issue_audit","基层治理:议题管理:议题审核","审核(通过或驳回)议题"), + /** + * 徽章 + */ + WORK_GRASSROOTS_BADGE_AUDIT("work_grassroots_badge_audit","基层治理:徽章审核:徽章审核","徽章审核"), + WORK_GRASSROOTS_BADGE_AUDITING_LIST("work_grassroots_badge_auditing_list","基层治理:徽章审核:待审核列表","待审核徽章列表"), + /** * 工作-项目跟踪 */ @@ -142,7 +148,15 @@ public enum RequirePermissionEnum { * 爱心互助-自定义配置 */ MORE_HEART_CUSTOMIZED_VIEW("more_heart_customized_view","更多:爱心互助:自定义配置:查看","更多-爱心互助-自定义配置-查看"), - MORE_HEART_CUSTOMIZED_SAVE("more_heart_customized_save","更多:爱心互助:自定义配置:保存修改","更多-爱心互助-自定义配置-保存修改"); + MORE_HEART_CUSTOMIZED_SAVE("more_heart_customized_save","更多:爱心互助:自定义配置:保存修改","更多-爱心互助-自定义配置-保存修改"), + + /** + * 徽章管理 + */ + MORE_BADGE_MANAGE_LIST("more_badge_manage_list","更多:徽章:徽章管理:列表","徽章列表"), + MORE_BADGE_MANAGE_CREATE("more_badge_manage_create","更多:徽章:徽章管理:添加","添加徽章"), + MORE_BADGE_MANAGE_EDIT("more_badge_manage_edit","更多:徽章:徽章管理:编辑","编辑徽章"), + MORE_BADGE_MANAGE_DELETE("more_badge_manage_delete","更多:徽章:徽章管理:删除","删除徽章"); private String key; private String name; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index aca412e6df..7b1d8d53cb 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -41,6 +41,7 @@ public enum EpmetErrorCode { MOBILE_GET_CODE_ERROR(8104,"获取验证码失败"), MESSAGE_SMS_SEND_ERROR(8105, "短信发送失败"), NOT_DEL_GRID(8106,"该网格存在工作人员,不允许删除"), + THE_MOBILE_HAS_BEEN_USED(8207, "该手机号已注册,请更换手机号"), ORG_IS_NOT_NULL(8107,"党组织关系不能为空"), CANNOT_DELETE_PARTY_BRANCH(8108,"当前支部存在党员,不允许删除"), @@ -95,6 +96,10 @@ public enum EpmetErrorCode { SIGN_IN_TIME_NO(8513, "签到时间还未到~"), SIGN_IN_TIME_END(8514, "签到时间已结束~"), + //徽章管理 + DUPLICATE_BADGE_NAME(8515, "徽章名已存在"), + DUPLICATE_PARTY_BADGE_NAME(8516, "不可删除党员徽章"), + // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"), @@ -110,6 +115,8 @@ public enum EpmetErrorCode { OPER_CUSTOMER_FOOTBAR_EXISTS(8712, "footbar已存在"), OPER_CUSTOMER_FOOTBAR_NOT_FOUND(8713, "footbar不存在"), OPER_EXT_APP_SECRET_RESET_FAIL(8714, "秘钥更新失败"), + OPER_UPLOAD_IMG_TYPE_ERROR(8715, "请上传PNG格式的图片"), + OPER_UPLOAD_IMG_SIZE_ERROR(8716, "请上传200*200的图片"), USER_LIST_ROLES_BY_KEY_FAIL(8715, "根据角色key查询角色列表失败"), // 党建声音 前端提示 88段 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java index 27a081dacc..af891dc817 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java @@ -9,16 +9,23 @@ package com.epmet.commons.tools.redis; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import org.apache.poi.ss.formula.functions.T; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.*; import org.springframework.data.redis.support.atomic.RedisAtomicLong; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; import java.util.Collection; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; /** * Redis工具类 @@ -159,6 +166,14 @@ public class RedisUtils { redisTemplate.opsForHash().delete(key, fields); } + public void rightPush(String key, Object value, long expire){ + redisTemplate.opsForList().rightPush(key, value); + + if (expire != NOT_EXPIRE) { + expire(key, expire); + } + } + public void leftPush(String key, Object value) { leftPush(key, value, DEFAULT_EXPIRE); } @@ -171,10 +186,40 @@ public class RedisUtils { } } - public Object lindex(String key,Long index){ - return redisTemplate.opsForList().index(key,index); + public Object lindex(String key,Long index){ return redisTemplate.opsForList().index(key,index); } + public List lrange(String key,long start,long end,Class clazz){ + List content = redisTemplate.opsForList().range(key,start,end); + if(CollectionUtils.isEmpty(content)) return null; + return content.stream().map( o -> { + try { + T target = clazz.newInstance(); + BeanUtils.copyProperties(o, target); + return target; + }catch (Exception e){throw new RenException("convert error");} + }).collect(Collectors.toList()); + } + + /** + * @Description Redis lrem : + * 根据参数 count 的值,移除列表中与参数 value 相等的元素 + * COUNT 的值可以是以下几种 : + * count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count + * count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值 + * count = 0 : 移除表中所有与 value 相等的值 + * 返回值 : + * 被移除元素的数量 + * 列表不存在时返回 0 + * @param key + * @param count + * @param o 这里的Object需要重写equals(FIXME 注意序列化) + * @return long + * @author wangc + * @date 2020.11.05 10:22 + */ + public long lrem(String key,long count,Object o){ return redisTemplate.opsForList().remove(key,count,o);} + public Object rightPop(String key) { return redisTemplate.opsForList().rightPop(key); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java index 2fe90dbce7..3a2f5cfebb 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java @@ -63,6 +63,7 @@ public class FactIndexController { * @Description 按月查询各项指标数据 * @author sun */ + @PostMapping("index/ablitylist") public Result> ablityList(@RequestBody AblityListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AblityListFormDTO.AddUserInternalGroup.class); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 37d715980c..a22a573819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -740,13 +740,4 @@ public class DemoController { log.info("影响行数="+updateNum); return new Result(); } - - @Autowired - private ScreenGrassrootsGovernDataAbsorptionService wc; - - @PostMapping("wc") - public Result wc(@RequestBody ScreenCentralZoneDataFormDTO param){ - wc.difficultyDataHub(param); - return new Result(); - } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml index f099678400..b2e0b7a9da 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml @@ -173,6 +173,13 @@ + + + + + + + diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 65cf6b2d2d..ff52e99ce4 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -10,6 +10,7 @@ package com.epmet.controller; import com.epmet.cloud.CloudStorageConfig; import com.epmet.cloud.OssFactory; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -39,6 +40,9 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.IOException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -223,6 +227,36 @@ public class OssController { return ossService.uploadImg(file); } + + @PostMapping("uploadimg/badgeicon") + public Result badgeIcon(@RequestParam("file") MultipartFile file) throws IOException { + + // 校验文件类型 + if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType())) { + log.error("uploadArticleImg file type:{} is not support 2 upload", file.getContentType()); + throw new RenException(EpmetErrorCode.OPER_UPLOAD_IMG_TYPE_ERROR.getCode() + , EpmetErrorCode.OPER_UPLOAD_IMG_TYPE_ERROR.getMsg()); + } + + // 校验文件体积,不超过2m + long maxSize = 2 * 1024 * 1024; + long size = file.getSize(); + if (size > maxSize) { + throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode() + , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); + } + + BufferedImage bufferedImage = ImageIO.read(file.getInputStream()); + int width = bufferedImage.getWidth(); + int height = bufferedImage.getHeight(); + if (width != 200 || height != 200) { + throw new RenException(EpmetErrorCode.OPER_UPLOAD_IMG_SIZE_ERROR.getCode() + , EpmetErrorCode.OPER_UPLOAD_IMG_SIZE_ERROR.getMsg()); + + } + return ossService.uploadImg(file); + } + /** * @param byteFile fileName * @Description 外挂-文件上传 diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index c822e7e308..40572386e5 100644 --- a/epmet-module/gov-grid/gov-grid-server/pom.xml +++ b/epmet-module/gov-grid/gov-grid-server/pom.xml @@ -63,6 +63,12 @@ 2.0.0 compile + + com.epmet + epmet-user-client + 2.0.0 + compile + diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java index 1e52667fff..772990f98d 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java @@ -26,5 +26,12 @@ public class WorkGrassRootsFunctionConstant { * 议题管理 */ public static final String WORK_GRASSROOTS_ISSUE="work_grassroots_issue"; + + /** + * 徽章审核 + */ + public static final String WORK_GRASSROOTS_BADGE="work_grassroots_badge"; + + } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java index e7cfdcbd6c..fa007c0cd5 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java @@ -1,19 +1,16 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; -import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.WorkGrassRootsFunctionConstant; import com.epmet.controller.TestFormDTO1; import com.epmet.controller.TestResultDTO1; import com.epmet.dto.form.RedDotFormDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; +import com.epmet.dto.result.GridAuditingBadgeCountResultDTO; import com.epmet.dto.result.GridProcessingCountResultDTO; import com.epmet.dto.result.RedDotResultDTO; -import com.epmet.feign.GovIssueFeignClient; -import com.epmet.feign.GovOrgFeignClient; -import com.epmet.feign.ResiGroupFeignClient; -import com.epmet.feign.ResiPartymemberFeignClient; +import com.epmet.feign.*; import com.epmet.service.RemindService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -44,6 +41,9 @@ public class RemindServiceImpl implements RemindService { @Autowired private GovIssueFeignClient govIssueFeignClient; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Override public RedDotResultDTO queryGridRedDot(RedDotFormDTO formDTO) { RedDotResultDTO redDotResultDTO = new RedDotResultDTO(); @@ -88,10 +88,14 @@ public class RemindServiceImpl implements RemindService { if (this.getWorkGrassRootsIssue(gridIdList)) { functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE); } + if(this.getWorkGrassRootsBadge(gridIdList)){ + functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE); + } return functionList; } + //群组管理: work_grassroots_group public Boolean getWorkGrassRootsGroup(List gridIdList) { Result> groupProcessingCountResult = resiGroupFeignClient.queryGroupProcessingCount(gridIdList); @@ -104,8 +108,7 @@ public class RemindServiceImpl implements RemindService { } } }else{ - logger.error(String.format("调用%s服务,查询网格%s待审核小组数失败code%s,msg:", ServiceConstant.RESI_GROUP_SERVER, gridIdList.get(0), groupProcessingCountResult.getCode(), - groupProcessingCountResult.getMsg())); + logger.error(String.format("查询群组管理待办事项数失败,%s",groupProcessingCountResult.getMsg())); } return false; } @@ -123,8 +126,7 @@ public class RemindServiceImpl implements RemindService { } } } else { - logger.error(String.format("调用%s服务,查询网格%s待审核热心居民数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), resiGroupProcessingCountResult.getCode(), - resiGroupProcessingCountResult.getMsg())); + logger.error(String.format("查询网格内待审核热心居民数失败,%s",resiGroupProcessingCountResult.getMsg())); } return false; } @@ -142,8 +144,7 @@ public class RemindServiceImpl implements RemindService { } } }else{ - logger.error(String.format("调用%s服务,查询网格%s待审核党员数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), partyMemberProcessingCountResult.getCode(), - partyMemberProcessingCountResult.getMsg())); + logger.error(String.format("查询网格内待审核党员总数失败,%s",partyMemberProcessingCountResult.getMsg())); } return false; } @@ -161,12 +162,27 @@ public class RemindServiceImpl implements RemindService { } } }else{ - logger.error(String.format("调用%s服务,查询网格%s表决中议题总数失败code%s,msg:", ServiceConstant.GOV_ISSUE_SERVER, gridIdList.get(0), issueResult.getCode(), - issueResult.getMsg())); + logger.error("查询网格表决中议题总数失败,%s",issueResult.getMsg()); } return false; } + //徽章审核 + private boolean getWorkGrassRootsBadge(List gridIdList) { + Result> badgeResult = epmetUserOpenFeignClient.queryGridAuditingBadgeCount(gridIdList); + if (badgeResult.success()) { + for (String gridId : gridIdList) { + for (GridAuditingBadgeCountResultDTO gridAuditingBadgeCountResultDTO : badgeResult.getData()) { + if (gridId.equals(gridAuditingBadgeCountResultDTO.getGridId()) && gridAuditingBadgeCountResultDTO.getCount() > 0) { + return true; + } + } + } + }else{ + logger.error(String.format("查询网格待审核徽章申请失败,%s",badgeResult.getMsg())); + } + return false; + } @Override public TestResultDTO1 test(TestFormDTO1 testFormDTO1) { Result resultDTO1Result = resiGroupFeignClient.test(testFormDTO1); diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java index 23dbd83fe9..a51eebbed6 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiTopicServiceImpl.java @@ -79,6 +79,7 @@ public class ResiTopicServiceImpl implements ResiTopicService { govTopic.setTopicRealseTime(top.getReleaseTime()); govTopic.setTopicFirstPhoto(top.getFirstPhoto()); govTopic.setTopicState(top.getStatus()); + govTopic.setBadgeList(top.getBadgeList()); topicsResult.add(govTopic); }); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueOpenConstant.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueOpenConstant.java new file mode 100644 index 0000000000..48a9cfc1f0 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueOpenConstant.java @@ -0,0 +1,35 @@ +package com.epmet.constant; + +/** + * 议题相关常亮,其它服务可用 + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/11 14:10 + */ +public interface IssueOpenConstant { + /** + * 议题状态-表决中 + */ + String ISSUE_VOTING = "voting"; + /** + * 议题状态-已转项目 + */ + String ISSUE_SHIFT_PROJECT = "shift_project"; + /** + * 议题状态-已关闭 + */ + String ISSUE_CLOSED = "closed"; + /** + * 议题解决类型-已解决 + */ + String ISSUE_RESOLVED = "resolved"; + /** + * 议题解决类型-未解决 + */ + String ISSUE_UNRESOLVED = "unresolved"; + + /** + * 议题来源类型 eg:resi_topic + */ + String SOURCE_TYPE_RT="resi_topic"; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java index 457a165fd6..0da96662ee 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -143,4 +144,18 @@ public class IssueDTO implements Serializable { */ private Date updatedTime; + /** + * 转项目日期 (服务间调用日期一致性) 戳 + */ + private Long shiftedTimeStamp; + + /** + * 关闭日期 戳 + */ + private Long closedTimeStamp; + + /** + * 议题转项目后-对应的项目id + */ + private String projectId; } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailFormDTO.java new file mode 100644 index 0000000000..3cc1942473 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:10 上午 + */ +@Data +public class ApplicationDetailFormDTO implements Serializable { + + private static final long serialVersionUID = -1123940740606412101L; + + public interface ApplicationDetail{} + + /** + * 申请详情,在列表接口返参里有 + */ + @NotBlank(message = "issueApplicationId不能为空",groups = {ApplicationDetail.class}) + private String issueApplicationId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryFormDTO.java new file mode 100644 index 0000000000..bfdf5bdced --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:10 上午 + */ +@Data +public class ApplicationHistoryFormDTO implements Serializable { + + private static final long serialVersionUID = -1123940740606412101L; + + public interface ApplicationHistory{} + + /** + * 申请详情,在列表接口返参里有 + */ + @NotBlank(message = "issueApplicationId不能为空",groups = {ApplicationHistory.class}) + private String issueApplicationId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationListFormDTO.java new file mode 100644 index 0000000000..e26b2645b7 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationListFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:26 上午 + */ +@Data +public class ApplicationListFormDTO implements Serializable { + + private static final long serialVersionUID = -7535577263406351310L; + + public interface ApplicationList{} + + /** + * 小组id + */ + @NotBlank(message = "小组id不能为空",groups = {ApplicationList.class}) + private String groupId; + + /** + * under_auditing:审核中,rejected:驳回 + */ + @NotBlank(message = "审核状态不能为空",groups = {ApplicationList.class}) + private String applyStatus; + + /** + * 页码 + */ + @NotNull(message = "页码不能为空",groups = {ApplicationList.class}) + private Integer pageNo; + + /** + * 每页数量 + */ + @NotNull(message = "每页数量不能为空",groups = {ApplicationList.class}) + private Integer pageSize; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPartIssuesFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPartIssuesFormDTO.java new file mode 100644 index 0000000000..249e3e62a2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPartIssuesFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/10 10:04 上午 + */ +@Data +public class MyPartIssuesFormDTO implements Serializable { + + private static final long serialVersionUID = 265005061427415836L; + + public interface MyPartIssues{} + + /** + * 用户ID + */ + @NotBlank(message = "userId不能为空",groups = MyPartIssues.class) + private String userId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPubIssuesAuditingFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPubIssuesAuditingFormDTO.java new file mode 100644 index 0000000000..0ede11f11d --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPubIssuesAuditingFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/11 9:06 上午 + */ +@Data +public class MyPubIssuesAuditingFormDTO implements Serializable { + + private static final long serialVersionUID = 8417818340366917358L; + + public interface MyPubIssuesAuditing{} + + @NotNull(message = "页码不能为空",groups = MyPubIssuesAuditing.class) + private Integer pageNo; + + @NotNull(message = "每页数量不能为空",groups = MyPubIssuesAuditing.class) + private Integer pageSize; + + /** + * 拓展参数:前端不传值,内部传输用 + */ + private String userId; + + /** + * 拓展参数:前端不传值,内部传输用 + */ + private String issueStatus; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyShiftIssueTopicsFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyShiftIssueTopicsFormDTO.java new file mode 100644 index 0000000000..3340fc7d91 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyShiftIssueTopicsFormDTO.java @@ -0,0 +1,38 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/13 3:30 下午 + */ +@Data +public class MyShiftIssueTopicsFormDTO implements Serializable { + + private static final long serialVersionUID = -3943178729586797400L; + + public interface MyShiftIssueTopics{} + + /** + * 页码 + */ + @NotNull(message = "页码不能为空",groups = {MyShiftIssueTopics.class}) + private Integer pageNo; + + /** + * 每页数量 + */ + @NotNull(message = "每页数量不能为空",groups = {MyShiftIssueTopics.class}) + private Integer pageSize; + + + @NotBlank(message = "客户ID不能为空",groups = {MyShiftIssueTopics.class}) + private String customerId; + + private String userId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailResultDTO.java new file mode 100644 index 0000000000..ef84d338e0 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:12 上午 + */ +@Data +public class ApplicationDetailResultDTO implements Serializable { + + private static final long serialVersionUID = 1121268898544759693L; + + /** + * 申请ID + */ + private String issueApplicationId; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 所属网格名称 + */ + private String gridName; + + /** + * 议题发起人 + */ + private String issuePublisher; + + /** + * 话题相关信息 + */ + private TopicInfoResultDTO topicInfo; + + private String gridId; + + private String topicId; + + private String userId; + + public ApplicationDetailResultDTO() { + this.issueTitle = ""; + this.gridName = ""; + this.issuePublisher = ""; + this.topicInfo = new TopicInfoResultDTO(); + } +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryResultDTO.java new file mode 100644 index 0000000000..b61c75415f --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:21 上午 + */ +@Data +public class ApplicationHistoryResultDTO implements Serializable { + + private static final long serialVersionUID = 3235513565728092491L; + + /** + * 审核历史表id + */ + private String historyId; + + /** + * under_auditing:待审核; approved:已通过, rejected:已驳回 + */ + private String actionType; + + /** + * 操作时间戳 + */ + private Long operateTime; + + /** + * 驳回理由或者审核通过理由 + */ + private String reason; + + /** + * 工作人员姓名;居民端不展示此列 + */ + private String staffName; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationListResultDTO.java new file mode 100644 index 0000000000..12bec714dd --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationListResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:31 上午 + */ +@Data +public class ApplicationListResultDTO implements Serializable { + + private static final long serialVersionUID = -4042091778432048631L; + + /** + * 申请id + */ + private String issueApplicationId; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 建议 + */ + private String suggestion; + + /** + * 对应issue_application.UPDATED_TIME 对应的秒级时间戳 + */ + private Long time; + + /** + * 审核状态。under_auditing:审核中,approved:通过,rejected:驳回 + */ + private String applyStatus; + + public ApplicationListResultDTO() { + this.issueTitle = ""; + this.suggestion = ""; + this.time = NumConstant.ZERO_L; + this.applyStatus = ""; + } +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java index bcad9ff776..44afcedae1 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectResultDTO.java @@ -1,6 +1,7 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @@ -26,6 +27,7 @@ public class IssueProjectResultDTO implements Serializable { /** * 议题转项目时间(项目表创建时间) */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date shiftedTime; } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPartIssuesResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPartIssuesResultDTO.java new file mode 100644 index 0000000000..fdce22e8f2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPartIssuesResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/10 9:50 上午 + */ +@Data +public class MyPartIssuesResultDTO implements Serializable { + + private static final long serialVersionUID = 2081387920547808112L; + + private String issueId; + + /** + * 建议 + */ + private String suggestion; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 转议题时间 + */ + private Long shiftIssueTime; + + /** + * 发表网格名称 + */ + private String topicReleaseGridName; + + @JsonIgnore + private String gridId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java new file mode 100644 index 0000000000..4af11fb3f2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/11 9:17 上午 + */ +@Data +public class MyPubIssuesAuditingResultDTO implements Serializable { + + private static final long serialVersionUID = -659855213089511649L; + + /** + * 议题id + */ + private String issueId; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 议题建议 + */ + private String suggestion; + + /** + * 转议题时间 + */ + private Long shiftIssueTime; + + /** + * 议题来源的小组名 + */ + private String topicReleaseGroupName; + + /** + * 议题来源的网格名 + */ + private String topicReleaseGridName; + + @JsonIgnore + private String gridId; + + @JsonIgnore + private String topicId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyShiftIssueTopicsResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyShiftIssueTopicsResultDTO.java new file mode 100644 index 0000000000..6595c75f86 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyShiftIssueTopicsResultDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/13 3:31 下午 + */ +@Data +public class MyShiftIssueTopicsResultDTO implements Serializable { + + private static final long serialVersionUID = -703102629653169023L; + + /** + * 话题ID + */ + private String topicId; + + /** + * 转议题时间 + */ + private Long shiftIssueTime; + + /** + * 建议 + */ + private String suggestion; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 话题发表网格名称 + */ + private String releaseGridName; + + /** + * 议题ID + */ + private String issueId; + + @JsonIgnore + private String gridId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoResultDTO.java new file mode 100644 index 0000000000..574d654891 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoResultDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:14 上午 + */ +@Data +public class TopicInfoResultDTO implements Serializable { + + private static final long serialVersionUID = -3445869627210569553L; + + /** + * 话题id + */ + private String topicId; + + /** + * 话题发表人昵称 + */ + private String publishedUser; + + /** + * 话题发表时间戳 + */ + private Long publishedTime; + + /** + * 话题内容 + */ + private String topicContent; + + /** + * 话题图片集合 + */ + private List topicImgs; + + public TopicInfoResultDTO() { + this.publishedUser = ""; + this.publishedTime = NumConstant.ZERO_L; + this.topicContent = ""; + this.topicImgs = new ArrayList<>(); + } +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 00b4b64796..7a77bc665c 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -1,7 +1,22 @@ package com.epmet.feign; +import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; +import org.springframework.cloud.openfeign.FeignClient; + import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IssueDTO; +import com.epmet.dto.form.MyPartIssuesFormDTO; +import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; +import com.epmet.dto.result.MyPartIssuesResultDTO; +import com.epmet.dto.result.MyPubIssuesAuditingResultDTO; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IssueApplicationDTO; import com.epmet.dto.IssueApplicationHistoryDTO; import com.epmet.dto.IssueSuggestionDTO; @@ -10,6 +25,18 @@ import com.epmet.dto.form.IssueApplicationIdFormDTO; import com.epmet.dto.form.UserIssueSuggestionFormDTO; import com.epmet.dto.result.SaveIssueSuggestionResultDTO; import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; +import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; +import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; @@ -28,7 +55,75 @@ import java.util.List; * @date 2020/6/4 13:37 */ @FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class) +// @FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class,url = "localhost:8101") public interface GovIssueOpenFeignClient { + + /** + * @Description 待审核||已驳回 申请详情 + * @Param applicationDetailFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + @PostMapping("/gov/issue/issueapplication/applicationdetail") + Result applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO); + + /** + * @Description 话题转议题申请详情- 审核历史查询 + * @Param applicationHistoryFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + @PostMapping("/gov/issue/issueapplication/applicationhistory") + Result applicationHistory(@RequestBody ApplicationHistoryFormDTO applicationHistoryFormDTO); + + /** + * @Description 待审核||已驳回 申请列表 + * @Param applicationListFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + @PostMapping("/gov/issue/issueapplication/applicationlist") + Result> applicationList(@RequestBody ApplicationListFormDTO applicationListFormDTO); + + + + /** + * @Description 个人中心-我参与的议题列表 + * @Param myPartIssuesFormDTO + * @author zxc + * @date 2020/11/10 10:01 上午 + */ + @PostMapping("/gov/issue/issuevotestatistical/mypartissues") + Result> myPartIssues(@RequestBody MyPartIssuesFormDTO myPartIssuesFormDTO); + + /** + * @Description 个人中心-我发起的议题列表-表决中 + * @Param tokenDto + * @Param myPubIssuesAuditingFormDTO + * @author zxc + * @date 2020/11/11 9:24 上午 + */ + @PostMapping("/gov/issue/issue/mypubissuesauditing") + Result> myPubIssuesAuditing(@RequestBody MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO); + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param formDTO + * @author yinzuomei + * @description 查询我发起的议题(可根据状态查询) + * @Date 2020/11/11 14:13 + **/ + @PostMapping(value = "/gov/issue/issue/getmypubissues", consumes = MediaType.APPLICATION_JSON_VALUE) + Result> getMyPubIssues(@RequestBody MyPubIssuesAuditingFormDTO formDTO); + + /** + * @Description 个人中心-我发表的话题列表-已转议题列表 + * @Param myShiftIssueTopicsFormDTO + * @author zxc + * @date 2020/11/13 4:58 下午 + */ + @PostMapping("/gov/issue/issue/shiftissuetopic") + Result> myShiftIssueTopics(@RequestBody MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO); /** * 小组表决中议题 * @author zhaoqifeng diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 499d8cb1bf..cfca536da4 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -1,5 +1,16 @@ package com.epmet.feign.fallback; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.IssueDTO; +import com.epmet.dto.form.MyPartIssuesFormDTO; +import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; +import com.epmet.dto.result.MyPartIssuesResultDTO; +import com.epmet.dto.result.MyPubIssuesAuditingResultDTO; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; @@ -11,6 +22,14 @@ import com.epmet.dto.form.IssueApplicationIdFormDTO; import com.epmet.dto.form.UserIssueSuggestionFormDTO; import com.epmet.dto.result.SaveIssueSuggestionResultDTO; import com.epmet.feign.GovIssueOpenFeignClient; +import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; +import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; +import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; @@ -27,6 +46,39 @@ import java.util.List; */ @Component public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient { + @Override + public Result applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"applicationDetail",applicationDetailFormDTO); + } + + @Override + public Result applicationHistory(ApplicationHistoryFormDTO applicationHistoryFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"applicationHistory",applicationHistoryFormDTO); + } + + @Override + public Result> applicationList(ApplicationListFormDTO applicationListFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"applicationList",applicationListFormDTO); + } + @Override + public Result> myPartIssues(MyPartIssuesFormDTO myPartIssuesFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myPartIssues",myPartIssuesFormDTO); + } + + @Override + public Result> myPubIssuesAuditing(MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myPubIssuesAuditing",myPubIssuesAuditingFormDTO); + } + + @Override + public Result> getMyPubIssues(MyPubIssuesAuditingFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"getMyPubIssues",formDTO); + } + + @Override + public Result> myShiftIssueTopics(MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myShiftIssueTopics",myShiftIssueTopicsFormDTO); + } /** * 小组表决中议题 * diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java index 1f8ae5abb9..42090ef7ff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/IssueConstant.java @@ -93,4 +93,6 @@ public interface IssueConstant { String BEIJING_TIME_ZONE = "+8"; String REVIEW_ISSUE = "议题评论失败,评论内容为:%s"; + + String GRID = "grid"; } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java index 25bca35f9a..dffa1dd82d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java @@ -26,6 +26,12 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueApplicationDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; import com.epmet.service.IssueApplicationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -83,6 +89,39 @@ public class IssueApplicationController { return new Result(); } + /** + * @Description 待审核||已驳回 申请详情 + * @Param applicationDetailFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + @PostMapping("applicationdetail") + public Result applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO){ + return new Result().ok(issueApplicationService.applicationDetail(applicationDetailFormDTO)); + } + + /** + * @Description 话题转议题申请详情- 审核历史查询 + * @Param applicationHistoryFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + @PostMapping("applicationhistory") + public Result applicationHistory(@RequestBody ApplicationHistoryFormDTO applicationHistoryFormDTO){ + return new Result().ok(issueApplicationService.applicationHistory(applicationHistoryFormDTO)); + } + + /** + * @Description 待审核||已驳回 申请列表 + * @Param applicationListFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + @PostMapping("applicationlist") + public Result> applicationList(@RequestBody ApplicationListFormDTO applicationListFormDTO){ + return new Result>().ok(issueApplicationService.applicationList(applicationListFormDTO)); + } + /** * @return com.epmet.commons.tools.utils.Result> * @param formDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 4af9a1095e..7c159b6e3d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -1,16 +1,9 @@ package com.epmet.controller; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.form.*; -import com.epmet.commons.tools.validator.AssertUtils; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.excel.IssueExcel; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; @@ -20,12 +13,12 @@ import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import com.epmet.service.IssueService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** * @Description 居民端党群议事 @@ -156,6 +149,42 @@ public class IssueController { return new Result().ok(issueService.checkTopicShiftIssue(formDTO)); } + /** + * @Description 个人中心-我发起的议题列表-表决中 + * @Param myPubIssuesAuditingFormDTO + * @author zxc + * @date 2020/11/11 9:24 上午 + */ + @PostMapping("mypubissuesauditing") + public Result> myPubIssuesAuditing(@RequestBody MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO){ + return new Result>().ok(issueService.myPubIssuesAuditing(myPubIssuesAuditingFormDTO)); + } + + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param formDTO + * @author yinzuomei + * @description 查询我发起的议题(可根据状态查询) + * @Date 2020/11/11 14:49 + **/ + @PostMapping("getmypubissues") + public Result> getMyPubIssues(@RequestBody MyPubIssuesAuditingFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(issueService.getMyPubIssues(formDTO)); + } + + /** + * @Description 个人中心-我发表的话题列表-已转议题列表 + * @Param myShiftIssueTopicsFormDTO + * @author zxc + * @date 2020/11/13 4:58 下午 + */ + @PostMapping("shiftissuetopic") + public Result> myShiftIssueTopics(@RequestBody MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO){ + ValidatorUtils.validateEntity(myShiftIssueTopicsFormDTO, MyShiftIssueTopicsFormDTO.MyShiftIssueTopics.class); + return new Result>().ok(issueService.myShiftIssueTopics(myShiftIssueTopicsFormDTO)); + } /** * 小组表决中议题 * @author zhaoqifeng diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java index 3c86c0c45a..7a7c4530f1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueVoteStatisticalController.java @@ -29,6 +29,8 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IssueVoteStatisticalDTO; import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.form.MyPartIssuesFormDTO; +import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.dto.result.VoteResultDTO; import com.epmet.dto.result.VotingTrendResultDTO; import com.epmet.excel.IssueVoteStatisticalExcel; @@ -145,4 +147,16 @@ public class IssueVoteStatisticalController { return new Result(); } + /** + * @Description 个人中心-我参与的议题列表 + * @Param myPartIssuesFormDTO + * @author zxc + * @date 2020/11/10 10:01 上午 + */ + @PostMapping("mypartissues") + public Result> myPartIssues(@RequestBody MyPartIssuesFormDTO myPartIssuesFormDTO){ + ValidatorUtils.validateEntity(myPartIssuesFormDTO, MyPartIssuesFormDTO.MyPartIssues.class); + return new Result>().ok(issueVoteStatisticalService.myPartIssues(myPartIssuesFormDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java index c45efec552..3dfa42b4b2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java @@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueApplicationDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.entity.IssueApplicationEntity; +import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -34,6 +36,15 @@ import java.util.List; @Mapper public interface IssueApplicationDao extends BaseDao { + /** + * @Description 待审核||已驳回 申请详情 + * @Param applicationDetailFormDTO + * @author zxc + * @date 2020/11/17 10:45 上午 + */ + ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO); + + /** * @param formDTO * @author yinzuomei diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 235c70e696..4071e7fb30 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -148,6 +148,38 @@ public interface IssueDao extends BaseDao { */ Integer checkTopicShiftIssue(TopicInfoFormDTO formDTO); + /** + * @Description 个人中心-我发起的议题列表-表决中 + * @Param myPubIssuesAuditingFormDTO + * @author zxc + * @date 2020/11/11 9:24 上午 + */ + List myPubIssuesAuditing(@Param("userId")String userId); + + /** + * @return java.util.List + * @param pageNo + * @param pageSize + * @param userId 当前用户 + * @param issueStatus :议题状态 表决中:voting 已转项目:shift_project 已关闭:closed + * @author yinzuomei + * @description 查询我发起的议题(可根据状态查询) + * @Date 2020/11/11 15:11 + **/ + List selectMyPubIssues(@Param("pageNo") Integer pageNo, + @Param("pageSize") Integer pageSize, + @Param("userId") String userId, + @Param("issueStatus") String issueStatus); + + /** + * @Description 个人中心-我发表的话题列表-已转议题列表 + * @Param tokenDto + * @Param myShiftIssueTopicsResultDTO + * @author zxc + * @date 2020/11/13 3:42 下午 + */ + List myShiftIssueTopics(@Param("topicIds") List topicIds,@Param("customerId") String customerId); + /** * 根据话题ID查找表决中议题列表 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java index 4b8643a2c5..015eda6a35 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueVoteDetailDTO; import com.epmet.dto.form.VoteFormDTO; import com.epmet.dto.result.IssueAttitudeCountResultDTO; +import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.entity.IssueVoteDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -75,6 +76,14 @@ public interface IssueVoteDetailDao extends BaseDao { List getVotingSummaryList(@Param("ids")Set ids); + /** + * @Description 个人中心-我参与的议题列表 + * @Param myPartIssuesFormDTO + * @author zxc + * @date 2020/11/10 10:01 上午 + */ + List myPartIssues(@Param("userId")String userId); + /** * @return com.epmet.dto.IssueVoteDetailDTO * @param userId diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java index ca1c383c2c..de018bdf59 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java @@ -22,6 +22,12 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueApplicationDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.entity.IssueApplicationEntity; +import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; import java.util.List; import java.util.Map; @@ -94,6 +100,30 @@ public interface IssueApplicationService extends BaseService applicationList(ApplicationListFormDTO applicationListFormDTO); + /** * @return java.util.List * @param formDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 889350f1ea..0ef84a2f41 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -2,23 +2,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IssueDTO; -import com.epmet.dto.form.CloseIssueFormDTO; -import com.epmet.dto.form.DepartmentStaffListFormDTO; -import com.epmet.dto.form.IssueDetailFormDTO; -import com.epmet.dto.form.IssueIdFormDTO; -import com.epmet.dto.result.DepartmentStaffListResultDTO; -import com.epmet.dto.result.GridIdResultDTO; -import com.epmet.dto.result.GridVotingIssueCountResultDTO; -import com.epmet.dto.result.IssueResultDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.form.CloseIssueFormDTO; -import com.epmet.dto.form.DepartmentStaffListFormDTO; import com.epmet.dto.form.CommonIssueListFormDTO; -import com.epmet.dto.form.IssueDetailFormDTO; -import com.epmet.dto.result.*; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.entity.IssueEntity; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; @@ -26,7 +13,6 @@ import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -237,6 +223,33 @@ public interface IssueService extends BaseService { */ Integer checkTopicShiftIssue(TopicInfoFormDTO formDTO); + /** + * @Description 个人中心-我发起的议题列表-表决中 + * @Param myPubIssuesAuditingFormDTO + * @author zxc + * @date 2020/11/11 9:24 上午 + */ + List myPubIssuesAuditing(MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description 查询我发起的议题(可根据状态查询) + * @Date 2020/11/11 14:57 + **/ + List getMyPubIssues(MyPubIssuesAuditingFormDTO formDTO); + + /** + * @Description 个人中心-我发表的话题列表-已转议题列表 + * @Param tokenDto + * @Param myShiftIssueTopicsResultDTO + * @author zxc + * @date 2020/11/13 3:42 下午 + */ + List myShiftIssueTopics(MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO); + + /** * 小组表决中议题 * @author zhaoqifeng diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java index c6334dd86e..1a0f3a3cf8 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java @@ -23,7 +23,9 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IssueVoteStatisticalDTO; import com.epmet.dto.form.EvaluationListFormDTO; import com.epmet.dto.form.IssueIdFormDTO; +import com.epmet.dto.form.MyPartIssuesFormDTO; import com.epmet.dto.result.EvaluationListResultDTO; +import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.dto.result.VoteResultDTO; import com.epmet.dto.result.VotingTrendResultDTO; import com.epmet.entity.IssueVoteStatisticalEntity; @@ -159,4 +161,12 @@ public interface IssueVoteStatisticalService extends BaseService myPartIssues(MyPartIssuesFormDTO myPartIssuesFormDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java index b65cc575eb..4f66688834 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java @@ -27,6 +27,12 @@ import com.epmet.dao.IssueApplicationDao; import com.epmet.dto.IssueApplicationDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.entity.IssueApplicationEntity; +import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; +import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; import com.epmet.service.IssueApplicationService; import com.github.pagehelper.PageHelper; import org.apache.commons.lang3.StringUtils; @@ -111,4 +117,38 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl applicationList(ApplicationListFormDTO applicationListFormDTO) { + return null; + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index d3685e65cf..610219ff2c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -17,6 +17,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.IssueConstant; +import com.epmet.constant.OrgInfoConstant; import com.epmet.constant.ReadFlagConstant; import com.epmet.constant.UserMessageConstant; import com.epmet.dao.IssueDao; @@ -34,19 +35,25 @@ import com.epmet.entity.IssueProjectRelationEntity; import com.epmet.feign.*; import com.epmet.redis.GovIssueRedis; import com.epmet.redis.IssueVoteDetailRedis; +import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO; +import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; +import com.epmet.resi.group.dto.topic.form.TopicIdListFormDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import com.epmet.resi.group.dto.topic.result.GovTopicIssueInfoResultDTO; +import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.IssueProcessService; import com.epmet.service.IssueProjectRelationService; import com.epmet.service.IssueService; import com.epmet.service.IssueVoteStatisticalService; import com.epmet.utils.ModuleConstants; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,6 +61,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.*; import java.util.stream.Collectors; @@ -83,6 +91,10 @@ public class IssueServiceImpl extends BaseServiceImpl imp private IssueProjectRelationDao issueProjectRelationDao; @Autowired private IssueVoteDetailRedis issueVoteDetailRedis; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private ResiGroupOpenFeignClient resiGroupOpenFeignClient; protected static final Logger logger = LoggerFactory.getLogger(IssueServiceImpl.class); @@ -846,6 +858,80 @@ public class IssueServiceImpl extends BaseServiceImpl imp return baseDao.checkTopicShiftIssue(formDTO); } + /** + * @Description 个人中心-我发起的议题列表-表决中 + * @Param myPubIssuesAuditingFormDTO + * @author zxc + * @date 2020/11/11 9:24 上午 + */ + @Override + public List myPubIssuesAuditing(MyPubIssuesAuditingFormDTO form) { + List list = new ArrayList<>(); + PageInfo result = PageHelper.startPage(form.getPageNo(),form.getPageSize()).doSelectPageInfo(() -> baseDao.myPubIssuesAuditing(form.getUserId())); + if (!CollectionUtils.isEmpty(result.getList())){ + list = result.getList(); + Result> gridNameList = govOrgOpenFeignClient.getGridListByGridIds(list.stream().map(m -> m.getGridId()).collect(Collectors.toList())); + if (!gridNameList.success()){ + throw new RenException("查询议题来源网格名称失败......"); + } + list.forEach(l -> gridNameList.getData().stream().filter(o -> l.getGridId().equals(o.getGridId())).forEach(o -> l.setTopicReleaseGridName(o.getGridName()))); + Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(list.stream().map(m -> m.getTopicId()).collect(Collectors.toList()))); + if (!groupNameList.success()){ + throw new RenException("查询议题来源小组名称失败......"); + } + list.forEach(l -> groupNameList.getData().stream().filter(g -> l.getTopicId().equals(g.getTopicId())).forEach(g -> l.setTopicReleaseGroupName(g.getTopicGroupName()))); + } + return list; + } + + /** + * @param formDTO + * @return java.util.List + * @author yinzuomei + * @description 查询我发起的议题(可根据状态查询) + * @Date 2020/11/11 14:57 + **/ + @Override + public List getMyPubIssues(MyPubIssuesAuditingFormDTO formDTO) { + formDTO.setPageNo(null == formDTO.getPageNo() ? NumConstant.ZERO : + (formDTO.getPageNo() - NumConstant.ONE)*formDTO.getPageSize() + ); + return baseDao.selectMyPubIssues(formDTO.getPageNo(),formDTO.getPageSize(),formDTO.getUserId(),formDTO.getIssueStatus()); + } + + /** + * @Description 个人中心-我发表的话题列表-已转议题列表 + * @Param tokenDto + * @Param myShiftIssueTopicsResultDTO + * @author zxc + * @date 2020/11/13 3:42 下午 + */ + @Override + public List myShiftIssueTopics(MyShiftIssueTopicsFormDTO form) { + TopicIdListFormDTO formDTO = new TopicIdListFormDTO(); + formDTO.setUserId(form.getUserId()); + Result> listResult = resiGroupOpenFeignClient.selectMyCreateTopic(formDTO); + if (!listResult.success()){ + throw new RenException("查询我创建的话题失败......"); + } + if(CollectionUtils.isEmpty(listResult.getData())){ + logger.debug("查询我创建的话题集合为空"); + return new ArrayList<>(); + } + List topicIds = listResult.getData(); + PageInfo resultPage = PageHelper.startPage(form.getPageNo(), form.getPageSize()).doSelectPageInfo(() -> baseDao.myShiftIssueTopics(topicIds, form.getCustomerId())); + if (CollectionUtils.isEmpty(resultPage.getList())){ + return new ArrayList<>(); + } + List result = resultPage.getList(); + Result> gridListByGridIds = govOrgOpenFeignClient.getGridListByGridIds(result.stream().map(m -> m.getGridId()).collect(Collectors.toList())); + if (!gridListByGridIds.success()){ + throw new RenException("查询话题所属网格名称失败......"); + } + result.forEach(r -> gridListByGridIds.getData().stream().filter(f -> r.getGridId().equals(f.getGridId())).forEach(f -> r.setReleaseGridName(f.getGridName()))); + return result; + } + /** * 小组表决中议题 * diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index 60b0aabbc3..7f678ba465 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.IssueEntity; import com.epmet.entity.IssueVoteStatisticalEntity; import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.ResiGroupFeignClient; import com.epmet.redis.IssueVoteDetailRedis; import com.epmet.redis.IssueVoteStatisticalRedis; @@ -51,6 +52,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.time.LocalDate; import java.time.LocalDateTime; @@ -86,6 +88,8 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl page(Map params) { @@ -532,4 +536,25 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl myPartIssues(MyPartIssuesFormDTO myPartIssuesFormDTO) { + List myPartIssuesResult = issueVoteDetailDao.myPartIssues(myPartIssuesFormDTO.getUserId()); + if (CollectionUtils.isEmpty(myPartIssuesResult)){ + return new ArrayList<>(); + } + List orgIds = myPartIssuesResult.stream().map(m -> m.getGridId()).collect(Collectors.toList()); + Result> listResult = govOrgOpenFeignClient.getGridListByGridIds(orgIds); + if (!listResult.success()){ + throw new RenException("查询议题来源网格名称失败......"); + } + myPartIssuesResult.forEach(m -> listResult.getData().stream().filter(l -> m.getGridId().equals(l.getGridId())).forEach(l -> m.setTopicReleaseGridName(l.getGridName()))); + return myPartIssuesResult; + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml index 7ef4d70dbc..ade9c2dcc3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml @@ -139,7 +139,7 @@ - + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml index 3ffa8f5f97..35123773a5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml @@ -3,6 +3,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml index 2477347ac0..08249e8651 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml @@ -72,6 +72,22 @@ attitude + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index 422984c415..d121ad399f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -490,4 +490,55 @@ AND g.DEL_FLAG = '0' AND sg.USER_ID = #{staffId} + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/pom.xml b/epmet-module/gov-project/gov-project-client/pom.xml index 4533eba408..6bf188e6e8 100644 --- a/epmet-module/gov-project/gov-project-client/pom.xml +++ b/epmet-module/gov-project/gov-project-client/pom.xml @@ -17,5 +17,11 @@ epmet-commons-tools 2.0.0 + + com.epmet + resi-mine-client + 2.0.0 + compile + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java index ef8c8f0d11..1d75e9adfe 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java @@ -17,9 +17,11 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; +import java.util.List; /** @@ -113,4 +115,8 @@ public class ProjectDTO implements Serializable { */ private Date updatedTime; + /** + * 当前处理部门名称列表 + */ + private List currentDepartmentNameList; } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectRelatedPersonnelDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectRelatedPersonnelDTO.java index d01a0bc70d..4ac72f72cc 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectRelatedPersonnelDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectRelatedPersonnelDTO.java @@ -58,6 +58,16 @@ public class ProjectRelatedPersonnelDTO implements Serializable { */ private String userId; + /** + * 来源类型(话题:topic 议题:issue) + */ + private String sourceType; + + /** + * 来源Id(话题或议题Id) + */ + private String sourceId; + /** * 删除标识 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectByCreateTopicUserFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectByCreateTopicUserFormDTO.java new file mode 100644 index 0000000000..24364b8142 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectByCreateTopicUserFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class ProjectByCreateTopicUserFormDTO { + + public interface ListByUserGroup {} + + @NotBlank(message = "客户ID不能为空", groups = { ListByUserGroup.class }) + private String customerId; + + @NotBlank(message = "用户ID不能为空", groups = { ListByUserGroup.class }) + private String userId; + private Integer pageNo = 1; + private Integer pageSize = 10; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPartProjectsResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPartProjectsResultDTO.java new file mode 100644 index 0000000000..b5e41d64a5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPartProjectsResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 个人中心-我参与的项目列表-接口返参 + * @Auth sun + */ +@Data +public class MyPartProjectsResultDTO implements Serializable { + + private static final long serialVersionUID = 2081387920547808112L; + + /** + * 项目id + */ + private String projectId; + + /** + * 话题发表于哪个网格 + */ + private String topicReleaseGridName; + + /** + * 项目标题 + */ + private String projectTitle; + + /** + * 当前处理部门 + */ + private List departmentNameList; + + /** + * 转项目时间。时间戳 + */ + private Long shiftProjectTime; + + /** + * 议题Id,用户数据整合使用(项目出自哪个网格"组织-网格") + */ + //@JsonIgnore + private String issueId; + /** + * 项目状态(待处理 pending,结案closed)用于查询当前处理部门信息 + */ + //@JsonIgnore + private String status; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java new file mode 100644 index 0000000000..46c2c9ff02 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 个人中心-我发起的议题列表-已关闭返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/11 13:39 + */ +@Data +public class MyPubIssuesClosedResultDTO implements Serializable { + private static final long serialVersionUID = -265465326846671555L; + /** + * 议题id + */ + private String issueId; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 建议 + */ + private String suggestion; + + /** + * 议题关闭时间。时间戳 + */ + private Long closedTime; + + /** + * 话题发表于哪个组 + */ + private String topicReleaseGroupName; + + /** + * 话题发表于哪个网格 + */ + private String topicReleaseGridName; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java new file mode 100644 index 0000000000..8397d64b69 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 个人中心-我发起的议题列表-已转项目 返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/11/11 12:18 + */ +@Data +public class MyPubIssuesShiftProjectResultDTO implements Serializable { + private static final long serialVersionUID = -7183751225506622772L; + /** + * 项目id + */ + private String projectId; + + /** + * 话题发表网格id + */ + private String topicReleaseGridName; + + /** + * 当前处理部门名称列表 + */ + private List departmentNameList; + + /** + * 项目标题 + */ + private String projectTitle; + + /** + * 转项目时间。时间戳 + */ + private Long shiftProjectTime; + + /** + * 话题发表于哪个组 + */ + private String topicReleaseGroupName; + + private String issueId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectOfCreateTopicUserResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectOfCreateTopicUserResultDTO.java new file mode 100644 index 0000000000..be6362471c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectOfCreateTopicUserResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.util.List; + +@Data +public class ProjectOfCreateTopicUserResultDTO { + + private String topicId; + private String projectId; + private String issueId; + private String gridId; + private Long shiftProjectTime; + private List departmentNameList; + private String projectTitle; + private String releaseGridId; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index 17bd06d5df..2cd5f5f5fb 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -1,16 +1,18 @@ package com.epmet.feign; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.ProjectDTO; +import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; +import com.epmet.dto.result.MyPartProjectsResultDTO; import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProcesslistResultDTO; -import org.springframework.cloud.openfeign.FeignClient; - -import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; +import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -22,6 +24,7 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:32 */ +// @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class,url = "localhost:8102") @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class) public interface GovProjectOpenFeignClient { /** @@ -46,4 +49,30 @@ public interface GovProjectOpenFeignClient { @PostMapping("gov/project/trace/processlistnotrule") Result getProcessList(@RequestBody ProcessListFormDTO fromDTO); + + /** + * @Description 根据议题Id集合查询对应的项目信息 + * @author sun + */ + @PostMapping("gov/project/project/issuetoprojectlist") + Result> issueToProjectList(MyPartProjectsFormDTO formDTO); + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param projectIds 项目id数组 + * @author yinzuomei + * @description 根据项目id查询项目基本信息 + * @Date 2020/11/11 17:40 + **/ + @PostMapping("gov/project/project/queryprojectinfobyids") + Result> queryProjectInfoByIds(@RequestBody List projectIds); + + /** + * @Description 根据话题创建人查询项目列表 + * @return + * @author wxz + * @date 2020.11.13 11:09 + */ + @PostMapping("gov/project/project/list-by-createtopic-userid") + Result> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index b0bb14a9eb..fd478f1245 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -5,11 +5,14 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; +import com.epmet.dto.result.MyPartProjectsResultDTO; import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; -import com.epmet.dto.result.ProcesslistResultDTO; +import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; import com.epmet.feign.GovProjectOpenFeignClient; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.stereotype.Component; import java.util.List; @@ -44,4 +47,26 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result getProcessList(ProcessListFormDTO fromDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProcessList", fromDTO); } + + @Override + public Result> issueToProjectList(MyPartProjectsFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "issueToProjectList", formDTO); + } + + /** + * @param projectIds 项目id数组 + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @description 根据项目id查询项目基本信息 + * @Date 2020/11/11 17:40 + **/ + @Override + public Result> queryProjectInfoByIds(List projectIds) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByIds", projectIds); + } + + @Override + public Result> listProjectsByCreateTopicUserId(ProjectByCreateTopicUserFormDTO form) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "listProjectsByCreateTopicUserId", form); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 345fb495a3..3c3641dac5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -18,8 +18,6 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.annotation.RequirePermission; -import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -27,18 +25,13 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ProjectDTO; -import com.epmet.dto.form.LatestListFormDTO; -import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.form.ShiftProjectFormDTO; -import com.epmet.dto.form.ShiftProjectsFromDTO; -import com.epmet.dto.result.IssueProjectResultDTO; -import com.epmet.dto.result.LatestListResultDTO; -import com.epmet.dto.result.PendProjectListResultDTO; -import com.epmet.dto.result.ShiftProjectResultDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.*; import com.epmet.excel.ProjectExcel; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.service.ProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -183,4 +176,32 @@ public class ProjectController { projectService.projectProcessCostTimeDataCompensation(); return new Result(); } + + /** + * @param formDTO + * @Author sun + * @Description 根据议题Id集合查询对应的项目信息 + **/ + @PostMapping("issuetoprojectlist") + public Result> issueToProjectList(@RequestBody MyPartProjectsFormDTO formDTO) { + return new Result>().ok(projectService.issueToProjectList(formDTO)); + } + + @PostMapping("queryprojectinfobyids") + public Result> queryProjectInfoByIds(@RequestBody List projectIds){ + return new Result>().ok(projectService.queryProjectInfoByIds(projectIds)); + } + + /** + * @Description + * @return + * @author wxz + * @date 2020.11.13 09:49 + */ + @PostMapping("list-by-createtopic-userid") + public Result> listProjectsByCreateTopicUserId(@RequestBody ProjectByCreateTopicUserFormDTO form) { + ValidatorUtils.validateEntity(form, ProjectByCreateTopicUserFormDTO.ListByUserGroup.class); + List projects = projectService.listProjectsByCreateTopicUserId(form.getUserId(), form.getCustomerId(), form.getPageNo(), form.getPageSize()); + return new Result().ok(projects); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index 0584789909..e4dfd04800 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -24,7 +24,9 @@ import com.epmet.dto.form.LatestListFormDTO; import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; import com.epmet.dto.result.LatestListResultDTO; +import com.epmet.dto.result.MyPartProjectsResultDTO; import com.epmet.dto.result.ProjectDetailResultDTO; +import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; import com.epmet.entity.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -130,4 +132,20 @@ public interface ProjectDao extends BaseDao { * @date 2020.10.26 11:20 */ List selectAllCustomerIds(); + + /** + * @Author sun + * @Description 根据议题ID集合查询对应的项目基本信息 + **/ + List selectIssueProjectList(@Param("customerId") String customerId, @Param("issueList") List issueList, + @Param("pageIndex") int pageIndex, @Param("pageSize") Integer pageSize); + + /** + * @Description 根据话题创建人查询项目列表 + * @return + * @author wxz + * @date 2020.11.13 09:38 + */ + List listProjectsByCreateTopicUserId(@Param("userId") String userId, + @Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectRelatedPersonnelEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectRelatedPersonnelEntity.java index b2ed014ced..6b99f72f4a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectRelatedPersonnelEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectRelatedPersonnelEntity.java @@ -58,4 +58,14 @@ public class ProjectRelatedPersonnelEntity extends BaseEpmetEntity { */ private String userId; + /** + * 来源类型(话题:topic 议题:issue) + */ + private String sourceType; + + /** + * 来源Id(话题或议题Id) + */ + private String sourceId; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectRelatedPersonnelExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectRelatedPersonnelExcel.java index 8cfb220d77..081bb9182d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectRelatedPersonnelExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectRelatedPersonnelExcel.java @@ -46,6 +46,12 @@ public class ProjectRelatedPersonnelExcel { @Excel(name = "用户ID") private String userId; + @Excel(name = "来源类型") + private String sourceType; + + @Excel(name = "来源ID") + private String sourceId; + @Excel(name = "删除标识") private String delFlag; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 2050b5921e..03bb5fc584 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -19,11 +19,11 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import java.util.List; import java.util.Map; @@ -216,4 +216,21 @@ public interface ProjectService extends BaseService { * @date 2020.10.26 10:54 */ void projectProcessCostTimeDataCompensation(); + + /** + * @param formDTO + * @Author sun + * @Description 根据议题Id集合查询对应的项目信息 + **/ + List issueToProjectList(MyPartProjectsFormDTO formDTO); + + List queryProjectInfoByIds(List projectIds); + + /** + * @Description 查询用户的项目列表 + * @return + * @author wxz + * @date 2020.11.13 09:12 + */ + List listProjectsByCreateTopicUserId(String userId, String customerId, Integer pageNo, Integer pageSize); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 7808c44d57..7334c73c39 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -42,7 +42,9 @@ import com.epmet.dto.result.*; import com.epmet.entity.*; import com.epmet.feign.*; import com.epmet.redis.ProjectRedis; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.service.*; +import com.github.pagehelper.PageHelper; import org.apache.commons.collections4.CollectionUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; @@ -687,6 +689,18 @@ public class ProjectServiceImpl extends BaseServiceImpl getClosedProjectList(LatestListFormDTO formDTO) { + + return baseDao.selectClosedProjectList(formDTO); + } + /** * @param formDTO * @return @@ -803,7 +817,7 @@ public class ProjectServiceImpl extends BaseServiceImpl projectStaffIds = entityList.stream().map(ProjectStaffEntity::getId).distinct().collect(Collectors.toList()); if(!CollectionUtils.isEmpty(projectStaffIds)){ List container = new LinkedList<>(); @@ -826,8 +840,12 @@ public class ProjectServiceImpl extends BaseServiceImpl getClosedProjectList(LatestListFormDTO formDTO) { - - return baseDao.selectClosedProjectList(formDTO); - } - @Override public void response(ProjectResponseFormDTO formDTO) { //公开回复内容审核 @@ -1362,4 +1368,58 @@ public class ProjectServiceImpl extends BaseServiceImpl issueToProjectList(MyPartProjectsFormDTO formDTO) { + //1.根据议题ID集合查询对应的项目基本信息 + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + List list = baseDao.selectIssueProjectList(formDTO.getCustomerId(), formDTO.getIssueList(), pageIndex, formDTO.getPageSize()); + //2.使用已有方法查询项目当前处理部门信息 + list.forEach(l -> { + if (ProjectConstant.CLOSED.equals(l.getStatus())) { + l.setDepartmentNameList(new ArrayList()); + } else { + ProjectDTO dto = new ProjectDTO(); + dto.setId(l.getProjectId()); + l.setDepartmentNameList(baseDao.selectDepartmentNameList(dto)); + } + }); + + return list; + } + + @Override + public List queryProjectInfoByIds(List projectIds) { + List entityList=baseDao.selectBatchIds(projectIds); + List projectDTOList=ConvertUtils.sourceToTarget(entityList, ProjectDTO.class); + //2.使用已有方法查询项目当前处理部门信息 + projectDTOList.forEach(l -> { + if (ProjectConstant.CLOSED.equals(l.getStatus())) { + l.setCurrentDepartmentNameList(new ArrayList()); + } else { + ProjectDTO dto = new ProjectDTO(); + dto.setId(l.getId()); + l.setCurrentDepartmentNameList(baseDao.selectDepartmentNameList(dto)); + } + }); + return projectDTOList; + } + + @Override + public List listProjectsByCreateTopicUserId(String userId, String customerId, Integer pageNo, Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List projects = baseDao.listProjectsByCreateTopicUserId(userId, customerId); + projects.stream().forEach(p -> { + ProjectDTO dto = new ProjectDTO(); + dto.setId(p.getProjectId()); + List depts = baseDao.selectDepartmentNameList(dto); + p.setDepartmentNameList(depts); + }); + return projects; + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.4__alter_project_related_personnel.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.4__alter_project_related_personnel.sql new file mode 100644 index 0000000000..ceedfd85bb --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.4__alter_project_related_personnel.sql @@ -0,0 +1,14 @@ +ALTER TABLE `project_related_personnel` ADD COLUMN `SOURCE_TYPE` VARCHAR (32) CHARACTER +SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源类型(话题:topic 议题:issue)' AFTER `GRID_ID`, + ADD COLUMN `SOURCE_ID` VARCHAR (64) CHARACTER +SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源Id(话题或议题Id)' AFTER `SOURCE_TYPE`; + +-- 更改项目库的字符集 +alter table customer_project_parameter convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project_org_relation convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project_process convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project_related_personnel convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project_satisfaction_detail convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project_satisfaction_statistics convert to character set utf8mb4 collate utf8mb4_general_ci; +alter table project_staff convert to character set utf8mb4 collate utf8mb4_general_ci; \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index baf33ff218..a3747fe72e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -206,4 +206,44 @@ DEL_FLAG = '0' + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectRelatedPersonnelDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectRelatedPersonnelDao.xml index 18257b67f4..419b8eae35 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectRelatedPersonnelDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectRelatedPersonnelDao.xml @@ -8,6 +8,8 @@ + + diff --git a/epmet-module/resi-group/resi-group-client/pom.xml b/epmet-module/resi-group/resi-group-client/pom.xml index 47b577fe72..f61f543fd3 100644 --- a/epmet-module/resi-group/resi-group-client/pom.xml +++ b/epmet-module/resi-group/resi-group-client/pom.xml @@ -26,6 +26,12 @@ io.springfox springfox-swagger-ui + + com.epmet + resi-mine-client + 2.0.0 + compile + diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GroupInfoFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GroupInfoFormDTO.java new file mode 100644 index 0000000000..68278e3104 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GroupInfoFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.resi.group.dto.group.form; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/11/11 1:30 下午 + */ +@Data +@AllArgsConstructor +public class GroupInfoFormDTO implements Serializable { + + private static final long serialVersionUID = -7940077760343241658L; + + private List topicIds; + + public GroupInfoFormDTO() { + } +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java new file mode 100644 index 0000000000..e9fc655bff --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/17 10:12 上午 + */ +@Data +public class ApplicationDetailCopyResultDTO implements Serializable { + + private static final long serialVersionUID = 1121268898544759693L; + + /** + * 申请ID + */ + private String issueApplicationId; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 所属网格名称 + */ + private String gridName; + + /** + * 议题发起人 + */ + private String issuePublisher; + + /** + * 话题相关信息 + */ + private TopicInfoResultDTO topicInfo; + + public ApplicationDetailCopyResultDTO() { + this.issueApplicationId = ""; + this.issueTitle = ""; + this.gridName = ""; + this.issuePublisher = ""; + this.topicInfo = new TopicInfoResultDTO(); + } +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java index d29b9acc6c..29e1c71302 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.resi.group.dto.group.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -38,7 +39,14 @@ public class ApplicationDetailResultDTO implements Serializable { */ private TopicInfoResultDTO topicInfo; + private String gridId; + + private String topicId; + + private String userId; + public ApplicationDetailResultDTO() { + this.issueApplicationId = ""; this.issueTitle = ""; this.gridName = ""; this.issuePublisher = ""; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupInfoResultDTO.java new file mode 100644 index 0000000000..44b7924beb --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupInfoResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.resi.group.dto.group.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/11/11 1:31 下午 + */ +@Data +public class GroupInfoResultDTO implements Serializable { + + private static final long serialVersionUID = 5508197256307317314L; + + private String topicId; + + private String topicGroupName; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java index 52d65c722f..f348482143 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java @@ -1,6 +1,7 @@ package com.epmet.resi.group.dto.group.result; import com.epmet.commons.tools.constant.NumConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -41,7 +42,11 @@ public class TopicInfoResultDTO implements Serializable { */ private List topicImgs; + @JsonIgnore + private String topicUserId; + public TopicInfoResultDTO() { + this.topicId = ""; this.publishedUser = ""; this.publishedTime = NumConstant.ZERO_L; this.topicContent = ""; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/ApplyingMemberResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/ApplyingMemberResultDTO.java index 881333be54..6374a9314b 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/ApplyingMemberResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/ApplyingMemberResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.resi.group.dto.member.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @Description @@ -45,4 +46,9 @@ public class ApplyingMemberResultDTO implements Serializable { * 入群被拒 - rejected 、 */ private String status; + + /** + * 用户徽章Url列表 + */ + private List badgeList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/GroupMemberListResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/GroupMemberListResultDTO.java index a5f69fc7c3..b6aaf3b8db 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/GroupMemberListResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/result/GroupMemberListResultDTO.java @@ -4,6 +4,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.List; /** * @Description @@ -43,4 +44,9 @@ public class GroupMemberListResultDTO implements Serializable { * 审核通过 - approved、 已禁言 - silent */ private String status; + + /** + * 用户徽章列表 + */ + private List badgeList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/MyCreateTopicsFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/MyCreateTopicsFormDTO.java new file mode 100644 index 0000000000..ea90db4413 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/MyCreateTopicsFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.resi.group.dto.topic; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class MyCreateTopicsFormDTO { + + @NotBlank(message = "客户id不能为空") + private String customerId; + + @NotBlank(message = "用户id不能为空") + private String userId; + + private Integer pageSize = 10; + + private Integer pageNo = 1; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CustomerPageFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CustomerPageFormDTO.java new file mode 100644 index 0000000000..5c824b35ff --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CustomerPageFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 客户Id 用户Id 分页 + * @ClassName CustomerPageFormDTO + * @Auth wangc + * @Date 2020-11-11 23:15 + */ +@Data +public class CustomerPageFormDTO implements Serializable { + private static final long serialVersionUID = 8678047078015445193L; + + @NotBlank(message = "客户Id不能为空") + private String customerId; + + @NotBlank(message = "用户Id不能为空") + private String userId; + + @Min(1) + private Integer pageNo; + + @Min(1) + private Integer pageSize; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicIdListFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicIdListFormDTO.java new file mode 100644 index 0000000000..9ee2ddce8c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/TopicIdListFormDTO.java @@ -0,0 +1,14 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +/** + * @Author zxc + * @DateTime 2020/11/13 4:27 下午 + */ +@Data +public class TopicIdListFormDTO{ + + private String userId; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovHiddenTopicInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovHiddenTopicInfoResultDTO.java index 6008f6c0eb..073a984545 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovHiddenTopicInfoResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovHiddenTopicInfoResultDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** * @Description @@ -51,4 +52,9 @@ public class GovHiddenTopicInfoResultDTO implements Serializable { * 话题的第一张图片地址 * */ private String topicFirstPhoto; + + /** + * 徽章Url集合 + */ + private List badgeList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovTopicInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovTopicInfoResultDTO.java index d60a24382d..84a1e2f5aa 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovTopicInfoResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GovTopicInfoResultDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** @@ -57,4 +58,9 @@ public class GovTopicInfoResultDTO implements Serializable { * 话题的状态 * */ private String topicState; + + /** + * 徽章Url集合 + */ + private List badgeList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/IssueGridResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/IssueGridResultDTO.java new file mode 100644 index 0000000000..5be2656812 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/IssueGridResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.topic.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * @Description 话题对应的议题及所属网格数据 + * @Auth sun + */ +@Data +public class IssueGridResultDTO implements Serializable { + private static final long serialVersionUID = -3495808492616727671L; + + /** + * 网格Id + * */ + private String gridId; + + /** + * 议题Id + * */ + private String issueId; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyCreateTopicsResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyCreateTopicsResultDTO.java new file mode 100644 index 0000000000..d5dc12d887 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/MyCreateTopicsResultDTO.java @@ -0,0 +1,16 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +@Data +public class MyCreateTopicsResultDTO { + + private String topicId; + private String groupId; + private Long releaseTime; + private String topicContent; + private String releaseGroupName; + private String releaseGridId; + private String releaseGridName; + +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ParticipatedTopicUnitResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ParticipatedTopicUnitResultDTO.java new file mode 100644 index 0000000000..2011d24943 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ParticipatedTopicUnitResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 个人中心 参与过的话题返参DTO + * @ClassName ParticipatedTopicUnitResultDTO + * @Auth wangc + * @Date 2020-11-11 23:00 + */ +@Data +public class ParticipatedTopicUnitResultDTO implements Serializable { + private static final long serialVersionUID = 1392205563783715932L; + + private String topicId; + + private String groupId; + + private String topicReleaseGridName; + + private String topicContent; + + private Long releaseTime; + + private String topicReleaseGroupName; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicDetailResultDTO.java index 1a41c1afd0..cce7d050fb 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicDetailResultDTO.java @@ -56,4 +56,9 @@ public class ResiTopicDetailResultDTO implements Serializable { * */ private List topicImgs; + /** + * 徽章Url集合 + */ + private List badgeList; + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueDetailResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueDetailResultDTO.java index 988d319ad8..97c0a12faf 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueDetailResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueDetailResultDTO.java @@ -70,4 +70,11 @@ public class ResiTopicIncludeIssueDetailResultDTO implements Serializable { * 关闭详情 如果没有关闭 对象里的字符串属性为String * */ private ResiTopicClosingMsgResultDTO closeDetail; + + /** + * 徽章Url列表 + */ + private List badgeList; + + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueInfoResultDTO.java index 55fe66f286..e2822a9189 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueInfoResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicIncludeIssueInfoResultDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** * @Description 话题信息返回DTO(包含议题Id和是否转为议题Flag) @@ -71,4 +72,9 @@ public class ResiTopicIncludeIssueInfoResultDTO implements Serializable { * 议题Id,当shiftIssueFlag为false时返回"" * */ private String issueId; + + /** + * 用户徽章 当releaseUserFlag为"me"时为空 + */ + private List badgeList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicInfoResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicInfoResultDTO.java index 613b506acf..be2f5452e9 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicInfoResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicInfoResultDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** * @Description 查看历史话题返回对象 @@ -62,4 +63,9 @@ public class ResiTopicInfoResultDTO implements Serializable{ * 第一张图片 * */ private String firstPhoto; + + /** + * 用户勋章Url集合 + */ + private List badgeList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java index 58ff87be1e..ba705a5893 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java @@ -1,9 +1,22 @@ package com.epmet.resi.group.feign; -import org.springframework.cloud.openfeign.FeignClient; - import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO; +import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO; +import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO; +import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO; +import com.epmet.resi.group.dto.topic.form.TopicIdListFormDTO; +import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; +import com.epmet.resi.group.dto.topic.result.MyCreateTopicsResultDTO; +import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO; import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -12,5 +25,50 @@ import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback; * @date 2020/6/4 13:16 */ @FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class) +//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095") public interface ResiGroupOpenFeignClient { + + /** + * @Description 查询用户参与的且不是自己发表的话题对应的议题Id集合 + * @author sun + */ + @PostMapping(value = "/resi/group/comment/topictoissuelist") + Result> topicToIssueList(MyPartProjectsFormDTO formDTO); + + /** + * @Description 查询话题所属小组名 + * @Param groupInfoFormDTO + * @author zxc + * @date 2020/11/11 1:36 下午 + */ + @PostMapping("resi/group/group/groupinfo") + Result> selectGroupInfo(@RequestBody GroupInfoFormDTO groupInfoFormDTO); + + /** + * @Description 个人中心-我参与过的话题 + * @param param + * @return java.util.List + * @author wangc + * @date 2020.11.11 23:20 + */ + @PostMapping("resi/group/topic/my-part-topics") + Result> myPartTopics(@RequestBody CustomerPageFormDTO param); + + /** + * @Description 我创建的话题列表 + * @return + * @author wxz + * @date 2020.11.10 14:58 + */ + @PostMapping("resi/group/topic/my-create-topics") + Result> listMyCreateTopics(@RequestBody MyCreateTopicsFormDTO formDTO); + + /** + * @Description 查询我创建的话题 + * @Param topicIdListFormDTO + * @author zxc + * @date 2020/11/13 4:32 下午 + */ + @PostMapping("resi/group/topic/select-my-create-topic") + Result> selectMyCreateTopic(@RequestBody TopicIdListFormDTO topicIdListFormDTO); } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java index df1c7bebf2..636acafb0e 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java @@ -1,8 +1,21 @@ package com.epmet.resi.group.feign.fallback; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO; +import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO; +import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO; +import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO; +import com.epmet.resi.group.dto.topic.form.TopicIdListFormDTO; +import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; +import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.stereotype.Component; +import java.util.List; + /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 * @@ -11,4 +24,29 @@ import org.springframework.stereotype.Component; */ @Component public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClient { + + @Override + public Result> topicToIssueList(MyPartProjectsFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "topicToIssueList", formDTO); + } + + @Override + public Result> selectGroupInfo(GroupInfoFormDTO groupInfoFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectGroupInfo", groupInfoFormDTO); + } + + @Override + public Result> myPartTopics(CustomerPageFormDTO param) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "myPartTopics", param); + } + + @Override + public Result listMyCreateTopics(MyCreateTopicsFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "listMyTopics", formDTO); + } + + @Override + public Result> selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectMyCreateTopic", topicIdListFormDTO); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/controller/ResiCommentController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/controller/ResiCommentController.java index 3c214ff828..8685514486 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/controller/ResiCommentController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/controller/ResiCommentController.java @@ -8,6 +8,8 @@ import com.epmet.modules.topic.service.ResiTopicCommentService; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.topic.form.ResiPublishCommentFormDTO; +import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -70,4 +72,13 @@ public class ResiCommentController { ValidatorUtils.validateEntity(queryCommentFormDTO); return commentService.getCommentListGov(queryCommentFormDTO); } + + /** + * @Description 查询用户参与的且不是自己发表的话题对应的议题Id集合 + * @author sun + */ + @PostMapping("topictoissuelist") + public Result> topicToIssueList(@RequestBody MyPartProjectsFormDTO formDTO) { + return new Result>().ok(commentService.topicToIssueList(formDTO)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java index 86da4ae08d..242363c794 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java @@ -7,6 +7,10 @@ import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; import com.epmet.resi.group.dto.group.result.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -36,9 +40,9 @@ public class GroupIssueController { * @date 2020/11/17 10:45 上午 */ @PostMapping("applicationdetail") - public Result applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO){ + public Result applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO){ ValidatorUtils.validateEntity(applicationDetailFormDTO, ApplicationDetailFormDTO.ApplicationDetail.class); - return new Result().ok(groupIssueService.applicationDetail(applicationDetailFormDTO)); + return new Result().ok(groupIssueService.applicationDetail(applicationDetailFormDTO)); } /** @@ -64,11 +68,11 @@ public class GroupIssueController { ValidatorUtils.validateEntity(applicationListFormDTO, ApplicationListFormDTO.ApplicationList.class); return new Result>().ok(groupIssueService.applicationList(applicationListFormDTO)); } - + /** * 表决中列表 * @author zhaoqifeng - * @date 2020/11/17 13:52 + * @date 2020/11/17 13:52 * @param formDTO * @return com.epmet.commons.tools.utils.Result> */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index afdce31da0..e73d12fc0e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -359,4 +359,15 @@ public class ResiGroupController { resiGroupStatisticalService.updateWhenAuditedResiRole(resiIdentityFormDTO); return new Result(); } + + /** + * @Description 查询话题所属小组名 + * @Param groupInfoFormDTO + * @author zxc + * @date 2020/11/11 1:36 下午 + */ + @PostMapping("groupinfo") + public Result> selectGroupInfo(@RequestBody GroupInfoFormDTO groupInfoFormDTO){ + return new Result>().ok(resiGroupService.selectGroupInfo(groupInfoFormDTO)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java index 867a3d11ba..fc7ec20e09 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java @@ -188,4 +188,20 @@ public interface ResiGroupDao extends BaseDao { * @date 2020.05.22 09:54 **/ List selectGroupListByGridIds(@Param("gridIds") List gridIds); + + /** + * @Description 查询话题信息 + * @Param topicId + * @author zxc + * @date 2020/11/17 2:10 下午 + */ + TopicInfoResultDTO selectTopicInfo(@Param("topicId") String topicId); + + /** + * @Description 查询话题所属小组名 + * @Param groupInfoFormDTO + * @author zxc + * @date 2020/11/11 1:36 下午 + */ + List selectGroupInfo(@Param("topicIds")List userIds); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java index aa86a03a27..5e9aee62ae 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java @@ -4,6 +4,10 @@ import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO; +import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; import com.epmet.resi.group.dto.group.result.*; import java.util.List; @@ -21,7 +25,7 @@ public interface GroupIssueService { * @author zxc * @date 2020/11/17 10:45 上午 */ - ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO); + ApplicationDetailCopyResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO); /** * @Description 话题转议题申请详情- 审核历史查询 diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java index d410b4f391..0c05c0ac76 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ResiGroupService.java @@ -293,4 +293,12 @@ public interface ResiGroupService extends BaseService { * @return java.util.List */ List recommendedList(RecommendedListFormDTO formDTO); + + /** + * @Description 查询话题所属小组名 + * @Param groupInfoFormDTO + * @author zxc + * @date 2020/11/11 1:36 下午 + */ + List selectGroupInfo(GroupInfoFormDTO groupInfoFormDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java index 27e84d72db..a72c40cb4b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java @@ -1,5 +1,14 @@ package com.epmet.modules.group.service.impl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.AllGridsByUserIdResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovIssueOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.modules.group.dao.ResiGroupDao; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -17,6 +26,8 @@ import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO; import com.epmet.resi.group.dto.group.result.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -32,11 +43,21 @@ import java.util.List; @Service public class GroupIssueServiceImpl implements GroupIssueService { - @Autowired - private ResiTopicService resiTopicService; @Autowired private GovIssueOpenFeignClient govIssueOpenFeignClient; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + + @Autowired + private ResiGroupDao resiGroupDao; + + @Autowired + private ResiTopicService resiTopicService; + /** * @Description 待审核||已驳回 申请详情 * @Param applicationDetailFormDTO @@ -44,8 +65,68 @@ public class GroupIssueServiceImpl implements GroupIssueService { * @date 2020/11/17 10:45 上午 */ @Override - public ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) { - return null; + public ApplicationDetailCopyResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) { + Result result = govIssueOpenFeignClient.applicationDetail(applicationDetailFormDTO); + if (!result.success()){ + throw new RenException("查询待审核||已驳回申请详情失败......"); + } + if (null==result.getData()){ + return new ApplicationDetailCopyResultDTO(); + } + List userIds = new ArrayList<>(); + ApplicationDetailResultDTO data = result.getData(); + userIds.add(data.getUserId()); + TopicInfoResultDTO topicInfoResultDTO = resiGroupDao.selectTopicInfo(data.getTopicId()); + userIds.add(topicInfoResultDTO.getTopicUserId()); + Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + if (!listResult.success()){ + throw new RenException("查询话题创建者,议题创建者失败......"); + } + listResult.getData().forEach(user -> { + if (user.getUserId().equals(data.getUserId())){ + data.setIssuePublisher(user.getDistrict().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender()))); + } + if (user.getUserId().equals(topicInfoResultDTO.getTopicUserId())){ + topicInfoResultDTO.setPublishedUser(user.getDistrict().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender()))); + } + }); + List gridIds = new ArrayList<>(); + gridIds.add(data.getGridId()); + Result> gridListByGridIds = govOrgOpenFeignClient.getGridListByGridIds(gridIds); + if (!gridListByGridIds.success()){ + throw new RenException("查询议题所属网格名称失败......"); + } + gridListByGridIds.getData().forEach(grid -> { + if (grid.getGridId().equals(data.getGridId())){ + data.setGridName(grid.getGridName()); + } + }); + data.setTopicInfo(topicInfoResultDTO); + return ConvertUtils.sourceToTarget(data,ApplicationDetailCopyResultDTO.class); + } + + /** + * @Description 获取 先生/女士 + * @Param gender + * @author zxc + * @date 2020/11/17 2:40 下午 + */ + public String getMrOrMs(String gender){ + if (StringUtils.isEmpty(gender)){ + return "先生/女士"; + } + String result; + switch (gender){ + case "1": + result = "先生"; + case "2": + result = "女士"; + case "0": + result = "先生/女士"; + default: + result = "先生/女士"; + } + return result; } /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 14e71c03bc..60eefa77ce 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -1016,4 +1016,15 @@ public class ResiGroupServiceImpl extends BaseServiceImpl selectGroupInfo(GroupInfoFormDTO groupInfoFormDTO) { + return baseDao.selectGroupInfo(groupInfoFormDTO.getTopicIds()); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java index 318989299c..6c3b9ff19c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java @@ -31,12 +31,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.ReadFlagConstant; -import com.epmet.dto.form.UserMessageFormDTO; -import com.epmet.dto.form.UserResiInfoFormDTO; -import com.epmet.dto.form.UserResiInfoListFormDTO; -import com.epmet.dto.form.WxSubscribeMessageFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.constant.GroupMemberConstant; import com.epmet.modules.constant.UserMessageConstant; import com.epmet.modules.feign.EpmetUserFeignClient; @@ -65,6 +63,7 @@ import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO; import com.epmet.resi.group.dto.member.form.*; +import com.epmet.resi.group.dto.member.form.CommonGridIdListFormDTO; import com.epmet.resi.group.dto.member.result.ApplyingMemberResultDTO; import com.epmet.resi.group.dto.member.result.GridVotableCountResultDTO; import com.epmet.resi.group.dto.member.result.GroupMemberListResultDTO; @@ -75,10 +74,12 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; /** * 群组成员关系表 @@ -118,6 +119,8 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl page(Map params) { @@ -329,6 +332,24 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl>> badgeR + = userOpenFeignClient.userShowBadge(new UserGroupFormDTO(group.getCustomerId(), userIdList)); + if(null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()){ + Map> map = badgeR.getData(); + list.forEach(member -> { + member.setBadgeList( + CollectionUtils.isEmpty(map.get(member.getUserId())) ? + Collections.EMPTY_LIST: + map.get(member.getUserId()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList()) ); + }); + }else{ + list.forEach(member -> member.setBadgeList(Collections.EMPTY_LIST)); + } + } + return list; } @@ -368,6 +389,26 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl>> badgeR + = userOpenFeignClient.userShowBadge(new UserGroupFormDTO(group.getCustomerId(), userIdList)); + if(null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()){ + Map> map = badgeR.getData(); + list.forEach(member -> { + member.setBadgeList( + CollectionUtils.isEmpty(map.get(member.getApplyUserId())) ? + Collections.EMPTY_LIST: + map.get(member.getApplyUserId()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList()) ); + }); + }else{ + list.forEach(member -> member.setBadgeList(Collections.EMPTY_LIST)); + } + } + return list; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index bae7b455c8..4c7d08ba93 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -4,13 +4,12 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.form.VoteFormDTO; import com.epmet.modules.topic.service.ResiTopicService; +import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.TopicInfoDTO; import com.epmet.resi.group.dto.topic.form.*; import com.epmet.resi.group.dto.topic.result.*; -import oracle.jdbc.proxy.annotation.Post; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -259,4 +258,43 @@ public class ResiTopicController { ValidatorUtils.validateEntity(formDTO); return new Result().ok(topicService.checkTopicPublisher(formDTO)); } + + /** + * @Description 我创建的话题列表 + * @return + * @author wxz + * @date 2020.11.10 14:58 + */ + @PostMapping("my-create-topics") + public Result> listMyCreateTopics(@RequestBody MyCreateTopicsFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + List myTopics = topicService.listMyCreateTopics(formDTO.getCustomerId(), formDTO.getUserId(), formDTO.getPageNo(), formDTO.getPageSize()); + return new Result().ok(myTopics); + } + + /** + * @Description 个人中心-我参与过的话题 + * @param param + * @return java.util.List + * @author wangc + * @date 2020.11.11 23:20 + */ + @PostMapping("my-part-topics") + public Result> myPartTopics(@RequestBody CustomerPageFormDTO param){ + ValidatorUtils.validateEntity(param); + return new Result>().ok(topicService.getParticipatedTopics(param)); + } + + /** + * @Description 查询我创建的话题 + * @Param topicIdListFormDTO + * @author zxc + * @date 2020/11/13 4:32 下午 + */ + @PostMapping("select-my-create-topic") + public Result> selectMyCreateTopic(@RequestBody TopicIdListFormDTO topicIdListFormDTO){ + return new Result>().ok(topicService.selectMyCreateTopic(topicIdListFormDTO)); + } + + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java index 76ecd5dafd..fd96ebed32 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java @@ -22,7 +22,9 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.comment.entity.ResiTopicCommentEntity; import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -52,4 +54,10 @@ public interface ResiTopicCommentDao extends BaseDao { * @Date 2020.04.01 17:15 **/ List getCommentList(ResiQueryCommentFormDTO queryCommentFormDTO); + + /** + * @Description 查询用户参与的且不是自己发表的话题对应的议题Id集合 + * @author sun + */ + List selectTopicList(@Param("userId") String userId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java index 1d65bba527..3c06ced85b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java @@ -24,6 +24,7 @@ import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.TopicInfoDTO; import com.epmet.resi.group.dto.topic.form.CheckTopicPublisherFormDTO; import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; +import com.epmet.resi.group.dto.topic.form.TopicIdListFormDTO; import com.epmet.resi.group.dto.topic.result.*; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import org.apache.ibatis.annotations.Mapper; @@ -153,6 +154,31 @@ public interface ResiTopicDao extends BaseDao { */ CheckTopicPublisherResultDTO checkTopicPublisher(CheckTopicPublisherFormDTO formDTO); + List listMyCreateTopics(@Param("userId") String userId, @Param("customerId") String customerId); + + /** + * @Description 根据话题Id集合查询对应的已转成议题的议题Id集合 + * @author sun + */ + List selectIssueList(@Param("topicList") List topicList); + + /** + * @Description 查询我参与过的话题 + * @param customerId + * @param userId + * @return java.util.List + * @author wangc + * @date 2020.11.11 23:08 + */ + List selectParticipatedTopics(@Param("customerId") String customerId,@Param("userId") String userId); + + /** + * @Description 查询我创建的话题 + * @Param topicIdListFormDTO + * @author zxc + * @date 2020/11/13 4:32 下午 + */ + List selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO); /** * 获取小组内话题ID * @author zhaoqifeng diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java index 107fffcc73..6aa26dbe80 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java @@ -26,6 +26,8 @@ import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicCommentDTO; import com.epmet.resi.group.dto.topic.form.ResiPublishCommentFormDTO; +import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import java.util.List; @@ -128,4 +130,9 @@ public interface ResiTopicCommentService extends BaseService> getCommentListGov(ResiQueryCommentFormDTO commentFormDTO); + /** + * @Description 查询用户参与的且不是自己发表的话题对应的议题Id集合 + * @author sun + */ + List topicToIssueList(MyPartProjectsFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java index 93d62b582e..c907cd80c4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -30,7 +30,6 @@ import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.TopicInfoDTO; import com.epmet.resi.group.dto.topic.form.*; import com.epmet.resi.group.dto.topic.result.*; -import org.springframework.web.bind.annotation.RequestBody; import java.util.List; @@ -264,6 +263,30 @@ public interface ResiTopicService extends BaseService { */ CheckTopicPublisherResultDTO checkTopicPublisher(CheckTopicPublisherFormDTO formDTO); + /** + * @Description 我发表的话题列表 + * @return + * @author wxz + * @date 2020.11.10 15:03 + */ + List listMyCreateTopics(String customerId, String userId, Integer pageNo, Integer pageSize); + + /** + * @Description 个人中心-我参与过的话题 + * @param param + * @return java.util.List + * @author wangc + * @date 2020.11.11 23:20 + */ + List getParticipatedTopics(CustomerPageFormDTO param); + + /** + * @Description 查询我创建的话题 + * @Param topicIdListFormDTO + * @author zxc + * @date 2020/11/13 4:32 下午 + */ + List selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO); /** * 获取小组内话题ID * @author zhaoqifeng diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java index ae74578dcd..a4e0365d2a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java @@ -43,6 +43,7 @@ import com.epmet.modules.member.dao.ResiGroupMemberDao; import com.epmet.modules.member.redis.ResiGroupMemberRedis; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.modules.topic.dao.ResiTopicCommentDao; +import com.epmet.modules.topic.dao.ResiTopicDao; import com.epmet.modules.topic.service.ResiTopicCommentService; import com.epmet.modules.topic.service.ResiTopicService; import com.epmet.modules.utils.ModuleConstant; @@ -56,7 +57,9 @@ import com.epmet.resi.group.dto.member.result.ResiGroupMemberInfoRedisResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicCommentDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.form.ResiPublishCommentFormDTO; +import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -94,6 +97,9 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl topicToIssueList(MyPartProjectsFormDTO formDTO) { + List list = new ArrayList<>(); + //1.查询用户评论过的切不是自己发起的话题列表 + List topicList = baseDao.selectTopicList(formDTO.getUserId()); + if (topicList.size() < NumConstant.ONE) { + return list; + } + //2.查询话题Id集合对应的已转成议题的议题Id集合 + return resiTopicdDao.selectIssueList(topicList); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 1dfff6faa7..b2edfcbd19 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -36,11 +36,12 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.constant.OrgInfoConstant; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.CommonDataFilterResultDTO; -import com.epmet.dto.result.IssueInitiatorResultDTO; -import com.epmet.dto.result.UserResiInfoResultDTO; +import com.epmet.dto.result.*; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.constant.GroupMemberConstant; import com.epmet.modules.constant.ResiGroupRedisKeys; import com.epmet.modules.feign.EpmetUserFeignClient; @@ -78,6 +79,10 @@ import com.epmet.resi.group.dto.topic.form.CheckTopicPublisherFormDTO; import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; import com.epmet.resi.group.dto.topic.form.*; import com.epmet.resi.group.dto.topic.result.*; +import com.epmet.resi.group.dto.topic.result.CheckTopicPublisherResultDTO; +import com.epmet.resi.group.dto.topic.result.GovTopicIssueInfoResultDTO; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -86,6 +91,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.text.SimpleDateFormat; import java.util.*; @@ -137,9 +143,15 @@ public class ResiTopicServiceImpl extends BaseServiceImpl>> badgeR + = userOpenFeignClient.userShowBadge( + new UserGroupFormDTO(group.getCustomerId(), + latestTenTopics.stream() + .filter(top -> StringUtils.equals("other",top.getReleaseUserFlag())) + .map(ResiTopicIncludeIssueInfoResultDTO::getUserId) + .distinct().collect(Collectors.toList()))); + if(null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()){ + Map> badgeM = badgeR.getData(); + latestTenTopics.forEach(top -> { + if(StringUtils.equals("other",top.getReleaseUserFlag())){ + top.setBadgeList( + CollectionUtils.isEmpty(badgeM.get(top.getUserId())) ? + Collections.EMPTY_LIST : + badgeM.get(top.getUserId()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList()) + ); + }else top.setBadgeList(Collections.EMPTY_LIST); + }); + + }else latestTenTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + + } + + + } return new Result>().ok(latestTenTopics); } @@ -384,7 +425,38 @@ public class ResiTopicServiceImpl extends BaseServiceImpl>> badgeR + = userOpenFeignClient.userShowBadge( + new UserGroupFormDTO(group.getCustomerId(), + pastTopics.stream() + .filter(top -> StringUtils.equals("other",top.getReleaseUserFlag())) + .map(ResiTopicIncludeIssueInfoResultDTO::getUserId) + .distinct().collect(Collectors.toList()))); + if(null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()){ + Map> badgeM = badgeR.getData(); + pastTopics.forEach(top -> { + if(StringUtils.equals("other",top.getReleaseUserFlag())){ + top.setBadgeList( + CollectionUtils.isEmpty(badgeM.get(top.getUserId())) ? + Collections.EMPTY_LIST : + badgeM.get(top.getUserId()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList()) + ); + }else top.setBadgeList(Collections.EMPTY_LIST); + }); + + }else pastTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + + } + + } + + return new Result>().ok(pastTopics); } @@ -577,10 +649,10 @@ public class ResiTopicServiceImpl extends BaseServiceImpl userId = new LinkedList<>();userId.add(topicDetail.getCreatedBy()); + String customerId; + ResiGroupInfoRedisDTO groupCache = resiGroupRedis.get(topicDetail.getGroupId()); + if(null == groupCache || StringUtils.isBlank(groupCache.getCustomerId())){ + ResiGroupEntity groupEntity = resiGroupDao.selectById(topicDetail.getGroupId()); + if(null == groupEntity || StringUtils.isBlank(groupEntity.getCustomerId())){ + log.error("com.epmet.modules.topic.service.impl.ResiTopicServiceImpl.getTopicDetail,获取不到组信息,话题Id:{}小组Id:{}",topicId,topicDetail.getGroupId()); + throw new RenException(ModuleConstant.NO_SUCH_GROUP); + }else customerId = groupEntity.getCustomerId(); + }else customerId = groupCache.getCustomerId(); + + Result>> badgeR + = userOpenFeignClient.userShowBadge(new UserGroupFormDTO(customerId, userId)); + + if(null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()){ + resultDTO.setBadgeList( + CollectionUtils.isEmpty(badgeR.getData().get(topicDetail.getCreatedBy())) ? + Collections.EMPTY_LIST: + badgeR.getData().get(topicDetail.getCreatedBy()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList()) + ); + }else resultDTO.setBadgeList(Collections.EMPTY_LIST); return new Result().ok(resultDTO); } @@ -639,6 +734,36 @@ public class ResiTopicServiceImpl extends BaseServiceImpl 0) { setCacheUserInfo(topicPageFormDTO.getGroupId(), hiddenTopics); + + + //3.用户徽章 + //3.1首先需要拿到客户Id + ResiGroupEntity group = resiGroupDao.selectById(topicPageFormDTO.getGroupId()); + if(null != group && StringUtils.isNotBlank(group.getCustomerId())){ + Result>> badgeR + = userOpenFeignClient.userShowBadge( + new UserGroupFormDTO(group.getCustomerId(), + hiddenTopics.stream() + .filter(top -> StringUtils.equals("other",top.getReleaseUserFlag())) + .map(ResiTopicInfoResultDTO::getUserId) + .distinct().collect(Collectors.toList()))); + if(null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()){ + Map> badgeM = badgeR.getData(); + hiddenTopics.forEach(top -> { + if(StringUtils.equals("other",top.getReleaseUserFlag())){ + top.setBadgeList( + CollectionUtils.isEmpty(badgeM.get(top.getUserId())) ? + Collections.EMPTY_LIST : + badgeM.get(top.getUserId()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList()) + ); + }else top.setBadgeList(Collections.EMPTY_LIST); + }); + + }else hiddenTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + + } + + } return new Result>().ok(hiddenTopics); @@ -789,6 +914,30 @@ public class ResiTopicServiceImpl extends BaseServiceImpl>> badgeR + = userOpenFeignClient.userShowBadge( + new UserGroupFormDTO(group.getCustomerId(), + pastTopics.stream() + .map(ResiTopicInfoResultDTO::getUserId) + .distinct().collect(Collectors.toList()))); + if (null != badgeR && badgeR.success() && null != badgeR.getData() && !badgeR.getData().isEmpty()) { + Map> badgeM = badgeR.getData(); + pastTopics.forEach(top -> { + top.setBadgeList( + CollectionUtils.isEmpty(badgeM.get(top.getUserId())) ? + Collections.EMPTY_LIST : + badgeM.get(top.getUserId()).stream().map(UserBadgeUnitFormDTO::getBadgeIcon).collect(Collectors.toList()) + ); + }); + + } else pastTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + + } } return new Result>().ok(pastTopics); @@ -862,11 +1011,13 @@ public class ResiTopicServiceImpl extends BaseServiceImpl 0) { for (UserResiInfoResultDTO user : result.getData()) { - ResiTopicInfoResultDTO topic = - topicMap.get(user.getUserId()).get(0); - topic.setReleaseUserHeadPhoto(user.getHeadPhoto()); - topic.setReleaseUserName(user.getShowName()); + if(!CollectionUtils.isEmpty(topicMap.get(user.getUserId()))){ + topicMap.get(user.getUserId()).forEach( topic -> { + topic.setReleaseUserHeadPhoto(user.getHeadPhoto()); + topic.setReleaseUserName(user.getShowName()); + }); + } //存入缓存 ResiGroupMemberInfoRedisDTO memberRedisDTO = new ResiGroupMemberInfoRedisDTO(); ResiGroupMemberDTO memberMySql = resiGroupMemberDao.selectGroupMemberInfo(groupId, user.getUserId()); @@ -934,10 +1085,12 @@ public class ResiTopicServiceImpl extends BaseServiceImpl 0) { for (UserResiInfoResultDTO user : result.getData()) { - ResiTopicIncludeIssueInfoResultDTO topic = - topicMap.get(user.getUserId()).get(0); - topic.setReleaseUserHeadPhoto(user.getHeadPhoto()); - topic.setReleaseUserName(user.getShowName()); + if(!CollectionUtils.isEmpty(topicMap.get(user.getUserId()))){ + topicMap.get(user.getUserId()).forEach( topic -> { + topic.setReleaseUserHeadPhoto(user.getHeadPhoto()); + topic.setReleaseUserName(user.getShowName()); + }); + } //存入缓存 ResiGroupMemberInfoRedisDTO memberRedisDTO = new ResiGroupMemberInfoRedisDTO(); @@ -1275,6 +1428,65 @@ public class ResiTopicServiceImpl extends BaseServiceImpl listMyCreateTopics(String customerId, String userId, Integer pageNo, Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List myTopics = resiTopicDao.listMyCreateTopics(userId, customerId); + + HashMap gridIdAndNames = new HashMap<>(); + List gridIds = myTopics.stream().map(c -> c.getReleaseGridId()).collect(Collectors.toList()); + + Result> gridsResult = govOrgOpenFeignClient.getGridListByGridIds(gridIds); + if (gridsResult.success()) { + List grids = gridsResult.getData(); + grids.stream().forEach(g -> gridIdAndNames.put(g.getGridId(), g.getGridName())); + } else { + log.error("【我创建的话题列表】,查询组织-网格名称出错,没有抛出,内部处理。内部消息:{},外部消息:{}", gridsResult.getInternalMsg(), gridsResult.getMsg()); + } + + for (MyCreateTopicsResultDTO myTopic : myTopics) { + myTopic.setReleaseGridName(gridIdAndNames.get(myTopic.getReleaseGridId())); + } + + return myTopics; + } + + /** + * @Description 个人中心-我参与过的话题 + * @param param + * @return java.util.List + * @author wangc + * @date 2020.11.11 23:20 + */ + @Override + public List getParticipatedTopics(CustomerPageFormDTO param) { + + PageInfo page = + PageHelper.startPage(Optional.ofNullable(param.getPageNo()).orElse(NumConstant.ONE), + Optional.ofNullable(param.getPageSize()).orElse(NumConstant.ONE)).doSelectPageInfo(() -> + baseDao.selectParticipatedTopics(param.getCustomerId(),param.getUserId())); + List result = page.getList(); + if(CollectionUtils.isEmpty(result)) return Collections.EMPTY_LIST; + Result> gridR = govOrgOpenFeignClient.selectOrgInfo( + new OrgInfoFormDTO(OrgInfoConstant.GRID,result.stream().map(ParticipatedTopicUnitResultDTO :: getTopicReleaseGridName).distinct().collect(Collectors.toList()))); + if(gridR.success() && !CollectionUtils.isEmpty(gridR.getData())){ + return result.stream().flatMap(topic -> gridR.getData().stream() .filter(grid -> StringUtils.equals(grid.getOrgId(),topic.getTopicReleaseGridName())).map(orgInfo -> { + topic.setTopicReleaseGridName(orgInfo.getOrgName()); + return topic; + })).collect(Collectors.toList()); + } return Collections.EMPTY_LIST; + } + + /** + * @Description 查询我创建的话题 + * @Param topicIdListFormDTO + * @author zxc + * @date 2020/11/13 4:32 下午 + */ + @Override + public List selectMyCreateTopic(TopicIdListFormDTO topicIdListFormDTO) { + return baseDao.selectMyCreateTopic(topicIdListFormDTO); + } /** * 获取小组内话题ID * diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml index 6c992be86b..d6f09d87ae 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/logback-spring.xml @@ -139,7 +139,7 @@ - + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 119db46b30..bc2e24ea2a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -397,4 +397,45 @@ GRID_ID = #{gridId} + + + + + + + + + + + + + + + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml index c51f3cdf04..d154e20d6e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml @@ -70,4 +70,22 @@ #{pageNo},#{pageSize} + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml index e1ac125fbd..2e7f1280ee 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml @@ -446,6 +446,68 @@ AND created_by = #{createdBy} AND id = #{topicId} + + + + + + + + + + + select CERTIFICATION_TYPE from badge_certification_config + where CUSTOMER_ID = #{customerId} + and BADGE_ID = #{badgeId} + and DEL_FLAG = '0' + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml new file mode 100644 index 0000000000..b5a72206b6 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + INSERT INTO badge + (`ID`, + `CUSTOMER_ID`, + `BADGE_NAME`, + `BADGE_ICON`, + `FIXATION_BADGE_TYPE`, + `BADGE_STATUS`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME`) + VALUES + (#{id}, + #{customerId}, + #{badgeName}, + #{badgeIcon}, + #{fixationBadgeType}, + #{badgeStatus}, + #{delFlag}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}); + + + + update badge set + BADGE_NAME = #{badgeName}, + BADGE_ICON = #{badgeIcon}, + BADGE_STATUS = #{badgeStatus} + where ID = #{id} AND CUSTOMER_ID = #{customerId} + + + + update badge set + DEL_FLAG = '1' + where ID = #{badgeId} AND CUSTOMER_ID = #{customerId} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/ResiUserBadgeDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/ResiUserBadgeDao.xml new file mode 100644 index 0000000000..221c9c3d3f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/ResiUserBadgeDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml new file mode 100644 index 0000000000..1499c9581b --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceDao.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update user_advice + set + reply_content = #{replyContent}, + reply_user_id = #{replyUserId}, + reply_time = now(), + gov_content = #{govContent}, + reply_user_name = (select real_name from oper_user where user_id = #{replyUserId} and del_flag = 0), + updated_by = #{replyUserId}, + updated_time = now() + where id = #{adviceId} and del_flag = 0 + + + + + + + + + + + + + + + + + + select md5(replace(UUID(),'-','')) + + insert into user_advice( + id, + customer_id, + customer_name, + agency_id, + agency_name, + grid_id, + grid_name, + user_id, + user_name, + reg_phone, + advice_content, + phone, + advice_time, + advice_type, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) + values ( + #{id}, + #{customerId}, + #{customerName}, + #{agencyId}, + #{agencyName}, + #{gridId}, + #{gridName}, + #{userId}, + #{userName}, + #{regPhone}, + #{adviceContent}, + #{phone}, + #{adviceTime}, + #{adviceType}, + 0,0,#{userId},#{adviceTime},#{userId},#{adviceTime} + ) + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceImgDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceImgDao.xml new file mode 100644 index 0000000000..8bb5ff3792 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserAdviceImgDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml new file mode 100644 index 0000000000..a2f59e8b8e --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml new file mode 100644 index 0000000000..8377839e72 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml @@ -0,0 +1,303 @@ + + + + + + + + UPDATE user_badge_certificate_record + SET is_last = 'no' + WHERE DEL_FLAG = '0' + AND BADGE_ID = #{badgeId} + AND USER_ID = #{userId} + + + + + UPDATE resi_user_badge + SET IS_OPENED = (case when IS_OPENED = 1 THEN 0 ELSE 1 END), + UPDATED_TIME = NOW() + WHERE DEL_FLAG = '0' + AND USER_ID = #{userId} + AND BADGE_ID = #{badgeId} + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO user_badge_certificate_record ( + ID, + CUSTOMER_ID, + GRID_ID, + USER_ID, + BADGE_ID, + SURNAME, + NAME, + MOBILE, + ID_NUM, + CERTIFICATION_IMG, + REMAEK, + AUDIT_STATUS, + AUDIT_REMARK, + STAFF_ID, + AUDIT_TIME, + IS_LAST, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + VALUES + ( + REPLACE ( UUID(), '-', '' ), + #{customerId}, + #{gridId}, + #{userId}, + #{badgeId}, + #{surname}, + #{name}, + #{mobile}, + #{idNum}, + #{certificationImg}, + #{remark}, + #{auditStatus}, + #{auditRemark}, + #{staffId}, + #{auditTime}, + #{isLast}, + #{delFlag}, + #{revision}, + #{createdBy}, + NOW(), + #{updatedBy}, + NOW() + ) + + + + + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index 0aa445acfa..1203a01e12 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -37,6 +37,16 @@ uri.updated_by AS "updatedby", uri.updated_time AS "updatedtime" + + update user_resi_info set + SURNAME = #{surname}, + NAME = #{name}, + STREET = #{street}, + DISTRICT = #{district}, + BUILDING_ADDRESS = #{buildingAddress} + where USER_ID = #{userId} + and DEL_FLAG = '0' +