Browse Source

工作端查看活动详情

dev_shibei_match
yinzuomei 4 years ago
parent
commit
139277c5e5
  1. 42
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/FileCommonDTO.java
  2. 151
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/ActDetailGovResultDTO.java
  3. 21
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java
  4. 7
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java
  5. 12
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/ResiGroupServiceImpl.java
  6. 8
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/ActDetailFormDTO.java
  7. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java

42
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;
}

151
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<String> textList;
/**
* 图片列表
*/
private List<String> imgArrayList;
/**
* 图片列表最多3张
*/
private List<FileCommonDTO> imgList;
//以下字段需要单独赋值
/**
* 取消原因
*/
private String canceledReason;
/**
* blank: 不显示 display显示
*/
private String signInButton;
/**
* 未签到时的描述可能是签到时间未开始可能是签到时间已经过
*/
private String signInDesc;
/**
* 已签到人数有人签到自动+1
*/
private Integer signedInNum;
/**
* 网格id
*/
private String gridId;
/**
* 客户id
*/
private String customerId;
}

21
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.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; 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.form.*;
import com.epmet.resi.group.dto.group.result.*; 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.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.service.ResiGroupService; import com.epmet.service.ResiGroupService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -175,5 +174,19 @@ public class ResiGroupController {
return groupOpenFeignClient.govAuditEdit(param); return groupOpenFeignClient.govAuditEdit(param);
} }
/**
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.act.result.ActDetailResultDTO>
* @param tokenDto
* @param actDetailFormDTO
* @author yinzuomei
* @description 工作端查看小组内活动详情
* @Date 2021/4/29 9:38
**/
@PostMapping("actdetail")
public Result<ActDetailGovResultDTO> queryActDetailForWork(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){
actDetailFormDTO.setUserId(tokenDto.getUserId());
actDetailFormDTO.setClient("gov");
ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class);
return new Result<ActDetailGovResultDTO>().ok(resiGroupService.queryActDetailForWork(actDetailFormDTO));
}
} }

7
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/ResiGroupService.java

@ -1,10 +1,10 @@
package com.epmet.service; package com.epmet.service;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; import com.epmet.dto.result.ActDetailGovResultDTO;
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO;
import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.form.*;
import com.epmet.resi.group.dto.group.result.*;
import java.util.List; import java.util.List;
@ -74,4 +74,5 @@ public interface ResiGroupService {
**/ **/
Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO); Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO);
ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO);
} }

12
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; package com.epmet.service.impl;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.ActDetailGovResultDTO;
import com.epmet.feign.ResiGroupFeignClient; import com.epmet.feign.ResiGroupFeignClient;
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; import com.epmet.resi.group.dto.act.form.ActDetailFormDTO;
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO;
import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.group.dto.group.form.*; import com.epmet.resi.group.dto.group.form.*;
import com.epmet.resi.group.dto.group.result.*;
import com.epmet.service.ResiGroupService; import com.epmet.service.ResiGroupService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -57,5 +57,11 @@ public class ResiGroupServiceImpl implements ResiGroupService{
return resiGroupFeignClient.disagreeApplying(disAgreeApplyGroupFormDTO); return resiGroupFeignClient.disagreeApplying(disAgreeApplyGroupFormDTO);
} }
@Override
public ActDetailGovResultDTO queryActDetailForWork(ActDetailFormDTO actDetailFormDTO) {
//todo
return null;
}
} }

8
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) @NotBlank(message = "tokenDto获取userId为空", groups = AddUserInternalGroup.class)
private String userId; private String userId;
/**
* 工作端gov; 居民端resi
* 这个是代码里赋值的
*/
private String client;
} }

1
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") @PostMapping("actdetail")
public Result<ActDetailResultDTO> queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){ public Result<ActDetailResultDTO> queryActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActDetailFormDTO actDetailFormDTO){
actDetailFormDTO.setUserId(tokenDto.getUserId()); actDetailFormDTO.setUserId(tokenDto.getUserId());
actDetailFormDTO.setClient("resi");
ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class); ValidatorUtils.validateEntity(actDetailFormDTO,ActDetailFormDTO.AddUserInternalGroup.class);
return new Result<ActDetailResultDTO>().ok(groupActInfoService.queryActDetail(actDetailFormDTO)); return new Result<ActDetailResultDTO>().ok(groupActInfoService.queryActDetail(actDetailFormDTO));
} }

Loading…
Cancel
Save