diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java new file mode 100644 index 0000000000..494c636a95 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java @@ -0,0 +1,42 @@ +package com.epmet.commons.tools.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/12/21 15:37 + */ +@NoArgsConstructor +@Data +public class FileCommonDTO implements Serializable { + + private static final long serialVersionUID = -5307959406648243353L; + /** + * 文件名 + */ + private String name; + /** + * url地址 + */ + private String url; + /** + * 文件类型(图片 - image、 视频 - video、 语音 - voice、 文档 - doc) + */ + private String type; + /** + * 后缀名 + */ + private String format; + /** + * 文件大小 kb + */ + private Integer size; + /** + * 语音或视频文件时长,单位秒 + */ + private Integer duration; +} diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java new file mode 100644 index 0000000000..65b2541ed0 --- /dev/null +++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java @@ -0,0 +1,151 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.dto.form.FileCommonDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * 工作端小组内,活动详情返参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/29 9:30 + */ +@Data +public class ActDetailGovResultDTO implements Serializable { + private static final long serialVersionUID = 3982724635100043221L; + + private String groupActId; + + /** + * 小组id + */ + private String groupId; + + /** + * 活动标题; + */ + private String title; + + /** + * 活动时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date startTime; + + /** + * 活动所属类别编码 + */ + private String categoryCode; + + /** + * 上级类别编码 + */ + private String parentCode; + + private String menuCode; + + /** + * 活动类别名称;eg:支部建设-三会一课 + */ + private String allCategoryName; + + /** + * 活动地点 + */ + private String address; + + /** + * 应参加人数组长填入;此列也是应签到人数; + */ + private Integer shouldAttend; + + /** + * 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed + */ + private String status; + + /** + * 签到开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signInStartTime; + + /** + * 签到截止时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signInEndTime; + + /** + * 是否填写总结?1:已填写;0:未填写 + */ + private Integer summaryFlag; + + /** + * 取消时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date canceledTime; + + /** + * 关闭时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date closedTime; + + /** + * 活动发布人用户id + */ + private String publishUserId; + + /** + * 内容列表 + */ + private List textList; + + /** + * 图片列表 + */ + private List imgArrayList; + + /** + * 图片列表,最多3张 + */ + private List imgList; + + //以下字段需要单独赋值 + /** + * 取消原因 + */ + private String canceledReason; + + /** + * blank: 不显示; display:显示 + */ + private String signInButton; + + /** + * 未签到时的描述,可能是签到时间未开始,可能是签到时间已经过 + */ + private String signInDesc; + + /** + * 已签到人数(有人签到自动+1) + */ + private Integer signedInNum; + + /** + * 网格id + */ + private String gridId; + + /** + * 客户id + */ + private String customerId; + +} diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java index 4ee3b04ee8..31c745fe35 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java @@ -6,11 +6,10 @@ import com.epmet.commons.tools.enums.RequirePermissionEnum; 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.result.ActDetailGovResultDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.result.*; -import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; -import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.ResiGroupService; import org.springframework.beans.factory.annotation.Autowired; @@ -175,5 +174,19 @@ public class ResiGroupController { return groupOpenFeignClient.govAuditEdit(param); } - + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param actDetailFormDTO + * @author yinzuomei + * @description 工作端查看小组内活动详情 + * @Date 2021/4/29 9:38 + **/ + @PostMapping("actdetail") + public Result queryActDetailForWork(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ + actDetailFormDTO.setUserId(tokenDto.getUserId()); + actDetailFormDTO.setClient("gov"); + ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); + return new Result().ok(resiGroupService.queryActDetailForWork(actDetailFormDTO)); + } } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java index 02dc4e458d..2609cb7b87 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java @@ -1,10 +1,10 @@ package com.epmet.service; import com.epmet.commons.tools.utils.Result; -import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; -import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; -import com.epmet.resi.group.dto.group.result.*; +import com.epmet.dto.result.ActDetailGovResultDTO; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.group.form.*; +import com.epmet.resi.group.dto.group.result.*; import java.util.List; @@ -74,4 +74,5 @@ public interface ResiGroupService { **/ Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO); + ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java index 28cb001f5e..d876c7180a 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java @@ -1,11 +1,11 @@ package com.epmet.service.impl; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.ActDetailGovResultDTO; import com.epmet.feign.ResiGroupFeignClient; -import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; -import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; -import com.epmet.resi.group.dto.group.result.*; +import com.epmet.resi.group.dto.act.form.ActDetailFormDTO; import com.epmet.resi.group.dto.group.form.*; +import com.epmet.resi.group.dto.group.result.*; import com.epmet.service.ResiGroupService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -57,5 +57,11 @@ public class ResiGroupServiceImpl implements ResiGroupService{ return resiGroupFeignClient.disagreeApplying(disAgreeApplyGroupFormDTO); } + @Override + public ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO) { + //todo + return null; + } + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java index 4403b96a48..2cf07cf690 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java @@ -24,4 +24,12 @@ public class ActDetailFormDTO implements Serializable { */ @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class) private String userId; + + + + /** + * 工作端:gov; 居民端:resi + * 这个是代码里赋值的 + */ + private String client; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index 6492fe4008..3c204ac284 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -74,6 +74,7 @@ public class GroupActInfoController { @PostMapping("actdetail") public Result queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ actDetailFormDTO.setUserId(tokenDto.getUserId()); + actDetailFormDTO.setClient("resi"); ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); }