forked from rongchao/epmet-cloud-rizhao
154 changed files with 7650 additions and 62 deletions
@ -0,0 +1,8 @@ |
|||||
|
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1560458000894500866', 'icpartyact_auto_publish_time', '党组织活动自动发布时间', '党组织活动自动发布时间', 35, 0, 0, '1', '2022-08-19 10:45:54', '1', '2022-08-19 10:46:11'); |
||||
|
|
||||
|
|
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1560458233091170305', 1560458000894500866, '活动开始前1天', '1', '0', '活动开始前1天', 1, 0, 0, '1', '2022-08-19 10:46:49', '1', '2022-08-19 10:46:49'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1560458276439302146', 1560458000894500866, '活动开始前3天', '3', '0', '活动开始前3天', 2, 0, 0, '1', '2022-08-19 10:47:00', '1', '2022-08-19 10:47:00'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1560458332076744705', 1560458000894500866, '活动开始前5天', '5', '0', '活动开始前5天', 3, 0, 0, '1', '2022-08-19 10:47:13', '1', '2022-08-19 10:47:13'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1560458388007788545', 1560458000894500866, '活动开始前7天', '7', '0', '活动开始前7天', 4, 0, 0, '1', '2022-08-19 10:47:26', '1', '2022-08-19 10:47:26'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1561627442626142210', 1560458000894500866, '现在发布', '0', '0', '', 5, 0, 0, '1', '2022-08-22 16:12:51', '1', '2022-08-22 16:12:51'); |
||||
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.commons.rocketmq.messages; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 党建小助手发布活动、活动到期提醒、活动发布提醒推送MQ |
||||
|
* @author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PartyMeetingMessageMQMsg extends MqBaseFormDTO implements Serializable { |
||||
|
|
||||
|
//客户Id
|
||||
|
private String customerId; |
||||
|
//活动/日程Id
|
||||
|
private String icPartyActId; |
||||
|
//动作类型 发布活动:publish 提前提醒:remind 日程通知:notify
|
||||
|
private String type; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/22 15:13 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component("autoPublishIcPartyActTask") |
||||
|
public class AutoPublishIcPartyActTask implements ITask { |
||||
|
@Autowired |
||||
|
private ResiPartyMemberOpenFeignClient resiPartyMemberOpenFeignClient; |
||||
|
/** |
||||
|
* 活动时间2022-08-15 10:30 选择的是提前3天自动发布 |
||||
|
* 本任务是自动发布活动 |
||||
|
* //2022-8-9号 8:00 收到一个:您有一个活动3天后即将自动发布
|
||||
|
* |
||||
|
* @param params 参数,多参数使用JSON数据 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
Result result=resiPartyMemberOpenFeignClient.autoPublishIcPartyAct(); |
||||
|
if(result.success()){ |
||||
|
log.info("autoPublishIcPartyActTask执行成功"); |
||||
|
}else{ |
||||
|
log.info("autoPublishIcPartyActTask执行失败"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/22 15:07 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component("noticePartyActAutoPublishTask") |
||||
|
public class NoticePartyActAutoPublishTask implements ITask { |
||||
|
@Autowired |
||||
|
private ResiPartyMemberOpenFeignClient resiPartyMemberOpenFeignClient; |
||||
|
|
||||
|
/** |
||||
|
* 活动时间2022-08-15 10:30 选择的是提前3天自动发布 |
||||
|
* //2022-8-12 10:30自动发布,收到消息:您有一个活动已经发布
|
||||
|
* 本任务是通知:2022-8-9号 8:00 收到一个:您有一个活动3天后即将自动发布 |
||||
|
* |
||||
|
* @param params 参数,多参数使用JSON数据 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
Result result=resiPartyMemberOpenFeignClient.noticePartyActAutoPublishTask(); |
||||
|
if(result.success()){ |
||||
|
log.info("noticePartyActAutoPublishTask执行成功"); |
||||
|
}else{ |
||||
|
log.info("noticePartyActAutoPublishTask执行失败"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,104 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 用户消息表(党建小助手) |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcMessageDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* app=resi时,此列为gridId,其他情况暂定 * |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 被通知的用户id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper |
||||
|
*/ |
||||
|
private String app; |
||||
|
|
||||
|
/** |
||||
|
* 消息分类 党建小助手:party |
||||
|
*/ |
||||
|
private String messageType; |
||||
|
|
||||
|
/** |
||||
|
* 消息类型对应的业务Id |
||||
|
*/ |
||||
|
private String targetId; |
||||
|
|
||||
|
/** |
||||
|
* 消息标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 消息通知内容 |
||||
|
*/ |
||||
|
private String messageContent; |
||||
|
|
||||
|
/** |
||||
|
* read已读、unread未读 |
||||
|
*/ |
||||
|
private String readFlag; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人(发布消息的人) |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* 调用者 |
||||
|
*/ |
||||
|
private String referer; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class IcMessageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2697079163476964749L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
@NotBlank(message = "客户id不能为空") |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* app=resi时,此列为gridId,其他情况暂定 * |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 对应用户id |
||||
|
*/ |
||||
|
@NotBlank(message = "通知用户id为空") |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper |
||||
|
*/ |
||||
|
@NotBlank(message = "消息通知对象不能为空") |
||||
|
private String app; |
||||
|
|
||||
|
/** |
||||
|
* 消息标题 |
||||
|
*/ |
||||
|
@NotBlank(message = "消息标题不能为空") |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 消息通知内容 |
||||
|
*/ |
||||
|
@NotBlank(message = "通知内容不能为空") |
||||
|
private String messageContent; |
||||
|
|
||||
|
/** |
||||
|
* read已读、unread未读 |
||||
|
*/ |
||||
|
@NotBlank(message = "readFlag不能为空") |
||||
|
private String readFlag; |
||||
|
|
||||
|
/** |
||||
|
* 调用者 【分内部调用和外部调用,内部调用值为空,外部默认为:外挂-站内信】 |
||||
|
*/ |
||||
|
private String referer; |
||||
|
|
||||
|
/** |
||||
|
* 消息分类:info-上传下达消息 详见UserMessageTypeConstant |
||||
|
*/ |
||||
|
private String messageType; |
||||
|
/** |
||||
|
* 消息对应的业务id,比如message_type=info时,此列存储的是消息id,可跳转到消息详情 |
||||
|
*/ |
||||
|
private String targetId; |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class IcMessageListFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2697079163476964749L; |
||||
|
|
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 20; |
||||
|
private Boolean isPage = true; |
||||
|
//token中信息
|
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class ReadIcMessageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2697079163476964749L; |
||||
|
|
||||
|
/** |
||||
|
* 消息Id |
||||
|
*/ |
||||
|
private String id; |
||||
|
//token中信息
|
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
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.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.IcMessageDTO; |
||||
|
import com.epmet.dto.form.IcMessageFormDTO; |
||||
|
import com.epmet.dto.form.IcMessageListFormDTO; |
||||
|
import com.epmet.dto.form.ReadIcMessageFormDTO; |
||||
|
import com.epmet.service.IcMessageService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 用户消息表(党建小助手) |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-19 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icMessage") |
||||
|
public class IcMessageController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcMessageService icMessageService; |
||||
|
|
||||
|
@RequestMapping("list") |
||||
|
public Result<PageData<IcMessageDTO>> list(@LoginUser TokenDto tokenDto, @RequestBody IcMessageListFormDTO formDTO){ |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
return new Result<PageData<IcMessageDTO>>().ok(icMessageService.list(formDTO)); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcMessageDTO> get(@PathVariable("id") String id){ |
||||
|
IcMessageDTO data = icMessageService.get(id); |
||||
|
return new Result<IcMessageDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcMessageDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icMessageService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcMessageDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icMessageService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icMessageService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 批量插入未读消息 |
||||
|
**/ |
||||
|
@PostMapping("saveicmessagelist") |
||||
|
public Result saveIcMessageList(@RequestBody List<IcMessageFormDTO> msgList) { |
||||
|
icMessageService.saveIcMessageList(msgList); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 单条或批量修改已读 |
||||
|
**/ |
||||
|
@PostMapping("read") |
||||
|
public Result read(@LoginUser TokenDto tokenDto, @RequestBody ReadIcMessageFormDTO formDTO) { |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
icMessageService.read(formDTO); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("unreadcount/{userId}") |
||||
|
public Result<Integer> unReadCount(@PathVariable ("userId") String userId) { |
||||
|
return new Result<Integer>().ok(icMessageService.unReadCount(userId)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.IcMessageDTO; |
||||
|
import com.epmet.dto.form.IcMessageListFormDTO; |
||||
|
import com.epmet.dto.form.ReadIcMessageFormDTO; |
||||
|
import com.epmet.entity.IcMessageEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 用户消息表(党建小助手) |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-19 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcMessageDao extends BaseDao<IcMessageEntity> { |
||||
|
|
||||
|
List<IcMessageDTO> selectMessageList(IcMessageListFormDTO formDTO); |
||||
|
|
||||
|
void upByUserId(ReadIcMessageFormDTO formDTO); |
||||
|
|
||||
|
Integer selectUnReadCount(@Param("userId") String userId); |
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 用户消息表(党建小助手) |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_message") |
||||
|
public class IcMessageEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* app=resi时,此列为gridId,其他情况暂定 * |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 被通知的用户id |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper |
||||
|
*/ |
||||
|
private String app; |
||||
|
|
||||
|
/** |
||||
|
* 消息分类 党建小助手:party |
||||
|
*/ |
||||
|
private String messageType; |
||||
|
|
||||
|
/** |
||||
|
* 消息类型对应的业务Id |
||||
|
*/ |
||||
|
private String targetId; |
||||
|
|
||||
|
/** |
||||
|
* 消息标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 消息通知内容 |
||||
|
*/ |
||||
|
private String messageContent; |
||||
|
|
||||
|
/** |
||||
|
* read已读、unread未读 |
||||
|
*/ |
||||
|
private String readFlag; |
||||
|
|
||||
|
/** |
||||
|
* 调用者 |
||||
|
*/ |
||||
|
private String referer; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
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.IcMessageDTO; |
||||
|
import com.epmet.dto.form.IcMessageFormDTO; |
||||
|
import com.epmet.dto.form.IcMessageListFormDTO; |
||||
|
import com.epmet.dto.form.ReadIcMessageFormDTO; |
||||
|
import com.epmet.entity.IcMessageEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 用户消息表(党建小助手) |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-19 |
||||
|
*/ |
||||
|
public interface IcMessageService extends BaseService<IcMessageEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return java.util.List<IcMessageDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-08-19 |
||||
|
*/ |
||||
|
PageData<IcMessageDTO> list(IcMessageListFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcMessageDTO |
||||
|
* @author generator |
||||
|
* @date 2022-08-19 |
||||
|
*/ |
||||
|
IcMessageDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-08-19 |
||||
|
*/ |
||||
|
void save(IcMessageDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-08-19 |
||||
|
*/ |
||||
|
void update(IcMessageDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-08-19 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
void saveIcMessageList(List<IcMessageFormDTO> msgList); |
||||
|
|
||||
|
void read(ReadIcMessageFormDTO formDTO); |
||||
|
|
||||
|
Integer unReadCount(String userId); |
||||
|
} |
||||
@ -0,0 +1,116 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
||||
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dao.IcMessageDao; |
||||
|
import com.epmet.dto.IcMessageDTO; |
||||
|
import com.epmet.dto.form.IcMessageFormDTO; |
||||
|
import com.epmet.dto.form.IcMessageListFormDTO; |
||||
|
import com.epmet.dto.form.IcMoveInListFormDTO; |
||||
|
import com.epmet.dto.form.ReadIcMessageFormDTO; |
||||
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
||||
|
import com.epmet.dto.result.HouseInfoDTO; |
||||
|
import com.epmet.dto.result.IcMoveInListResultDTO; |
||||
|
import com.epmet.entity.IcMessageEntity; |
||||
|
import com.epmet.service.IcMessageService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.collections4.MapUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.util.CollectionUtils; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import java.util.function.Function; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 用户消息表(党建小助手) |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-19 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcMessageServiceImpl extends BaseServiceImpl<IcMessageDao, IcMessageEntity> implements IcMessageService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcMessageDTO> list(IcMessageListFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); |
||||
|
List<IcMessageDTO> list = baseDao.selectMessageList(formDTO); |
||||
|
PageInfo<IcMessageDTO> pageInfo = new PageInfo<>(list); |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcMessageEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcMessageEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcMessageDTO get(String id) { |
||||
|
IcMessageEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcMessageDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcMessageDTO dto) { |
||||
|
IcMessageEntity entity = ConvertUtils.sourceToTarget(dto, IcMessageEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcMessageDTO dto) { |
||||
|
IcMessageEntity entity = ConvertUtils.sourceToTarget(dto, IcMessageEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void saveIcMessageList(List<IcMessageFormDTO> msgList) { |
||||
|
List<IcMessageEntity> entityList = ConvertUtils.sourceToTarget(msgList, IcMessageEntity.class); |
||||
|
insertBatch(entityList); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void read(ReadIcMessageFormDTO formDTO) { |
||||
|
//id入参有值就按id修改,没值就按用户修改
|
||||
|
if(StringUtils.isNotBlank(formDTO.getId())){ |
||||
|
IcMessageEntity entity = new IcMessageEntity(); |
||||
|
entity.setId(formDTO.getId()); |
||||
|
entity.setReadFlag("read"); |
||||
|
updateById(entity); |
||||
|
return; |
||||
|
} |
||||
|
//批量修改某个人消息列表
|
||||
|
baseDao.upByUserId(formDTO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer unReadCount(String userId) { |
||||
|
return baseDao.selectUnReadCount(userId); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
CREATE TABLE `ic_message` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`customer_id` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`grid_id` varchar(64) NOT NULL DEFAULT '*' COMMENT '暂定 *', |
||||
|
`user_id` varchar(64) NOT NULL COMMENT '被通知的用户id', |
||||
|
`app` varchar(32) NOT NULL COMMENT '消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper', |
||||
|
`message_type` varchar(32) DEFAULT NULL COMMENT '消息分类 党建小助手:party', |
||||
|
`target_id` varchar(64) DEFAULT NULL COMMENT '消息类型对应的业务Id', |
||||
|
`title` varchar(255) NOT NULL COMMENT '消息标题', |
||||
|
`message_content` varchar(3096) NOT NULL COMMENT '消息通知内容', |
||||
|
`read_flag` varchar(32) NOT NULL DEFAULT 'unread' COMMENT 'read已读、unread未读', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人(发布消息的人)', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
`REFERER` varchar(20) DEFAULT NULL COMMENT '调用者', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户消息表(党建小助手)'; |
||||
@ -0,0 +1,39 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcMessageDao"> |
||||
|
|
||||
|
<select id="selectMessageList" resultType="com.epmet.dto.IcMessageDTO"> |
||||
|
SELECT |
||||
|
* |
||||
|
FROM |
||||
|
ic_message |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND customer_id = #{customerId} |
||||
|
AND user_id = #{userId} |
||||
|
</select> |
||||
|
|
||||
|
<update id="upByUserId" parameterType="com.epmet.dto.form.ReadIcMessageFormDTO"> |
||||
|
UPDATE ic_message |
||||
|
SET read_flag = 'read', |
||||
|
updated_by = #{userId}, |
||||
|
updated_time = NOW() |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND customer_id = #{customerId} |
||||
|
AND user_id = #{userId} |
||||
|
</update> |
||||
|
|
||||
|
<select id="selectUnReadCount" resultType="java.lang.Integer"> |
||||
|
SELECT |
||||
|
COUNT(id) |
||||
|
FROM |
||||
|
ic_message |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND read_flag = 'unread' |
||||
|
AND user_id = #{userId} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/8/22 15:57 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PartyPointFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -4811220825653023328L; |
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
private String year; |
||||
|
private String quarter; |
||||
|
private String month; |
||||
|
private String type; |
||||
|
private String dateType; |
||||
|
private String startDate; |
||||
|
private String endDate; |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/8/25 9:20 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PartyPointRecordResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -1480768520576719171L; |
||||
|
/** |
||||
|
* 日期 yyyy-MM-dd 字符串 |
||||
|
* */ |
||||
|
private String date; |
||||
|
private List<PartyPointResultDTO> dailyList; |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/8/22 15:59 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PartyPointResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -3208641116926725011L; |
||||
|
private String title; |
||||
|
/** |
||||
|
* 日期yyyy-MM-dd |
||||
|
*/ |
||||
|
private String date; |
||||
|
/** |
||||
|
* 时间hh:mm |
||||
|
*/ |
||||
|
private String time; |
||||
|
private String point; |
||||
|
private String actId; |
||||
|
private String actType; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date actDate; |
||||
|
private String actAddress; |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
ALTER TABLE `epmet_resi_group`.`resi_group` |
||||
|
ADD COLUMN `PARTY_ORG_ID` varchar(64) NULL COMMENT '党支部ID' AFTER `CUSTOMER_ID`, |
||||
|
ADD COLUMN `PARTY_ORG_PIDS` varchar(255) NULL COMMENT '党支部的所有上级ID' AFTER `PARTY_ORG_ID`; |
||||
|
|
||||
|
|
||||
|
ALTER TABLE `epmet_resi_group`.`group_edit_submit_record` |
||||
|
ADD COLUMN `PARTY_ORG_ID` varchar(64) NULL COMMENT '党支部ID' AFTER `GRID_ID`, |
||||
|
ADD COLUMN `PARTY_ORG_PIDS` varchar(255) NULL COMMENT '党支部的所有上级ID' AFTER `PARTY_ORG_ID`; |
||||
@ -0,0 +1,6 @@ |
|||||
|
update resi_group_setup s |
||||
|
set s.`NAME`='党小组', |
||||
|
s.`DESCRIBE`='党小组是党支部的组成部分,党小组长可以申请创建线上党小组,从而便于组织线上思想学习、工作交流、党小组生活会等各类事项活动。' , |
||||
|
s.UPDATED_TIME=NOW() |
||||
|
where s.DEL_FLAG='0' |
||||
|
and s.`NAME`='支部小组'; |
||||
@ -0,0 +1,180 @@ |
|||||
|
package com.epmet.resi.partymember.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 党建组织活动 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID:当前工作人员所属组织id |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的上级;如果org_id是根组织,那此列=0 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* ORG_ID全路径,包含自身 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织 |
||||
|
*/ |
||||
|
private String publishPartyOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织名称 |
||||
|
*/ |
||||
|
private String publishPartyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织ID的上级节点 |
||||
|
*/ |
||||
|
private String publishOrgPid; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部;6党小组 |
||||
|
*/ |
||||
|
private String publishOrgType; |
||||
|
|
||||
|
/** |
||||
|
* PARTY_ORG_ID的全路径,包含自身。方便前端回显 |
||||
|
*/ |
||||
|
private String publishOrgPath; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型,0:支部党员大会;1:支部委员会;2:党小组会;3:党课;4:主题党日;5:为民服务活动; |
||||
|
*/ |
||||
|
private String actType; |
||||
|
|
||||
|
/** |
||||
|
* 活动举办时间:yyyy |
||||
|
*/ |
||||
|
private String holdYearId; |
||||
|
|
||||
|
/** |
||||
|
* 活动举办时间:yyyyMM |
||||
|
*/ |
||||
|
private String holdMonthId; |
||||
|
|
||||
|
/** |
||||
|
* 举办活动时间 |
||||
|
*/ |
||||
|
private Date holdTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动主题 |
||||
|
*/ |
||||
|
private String topic; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动开始前几天 |
||||
|
*/ |
||||
|
private Integer autoPublicType; |
||||
|
|
||||
|
/** |
||||
|
* 自动发布时间,保存时算好时间存在这里 |
||||
|
*/ |
||||
|
private Date autoPublicTime; |
||||
|
|
||||
|
/** |
||||
|
* 参加人员类型,0:全体党员;1:支部委员 |
||||
|
*/ |
||||
|
private String joinUserType; |
||||
|
|
||||
|
/** |
||||
|
* 是否自动通知参加人员,0否;1是 |
||||
|
*/ |
||||
|
private String isAutoInform; |
||||
|
|
||||
|
/** |
||||
|
* 活动介绍 |
||||
|
*/ |
||||
|
private String introduce; |
||||
|
|
||||
|
/** |
||||
|
* 是否发布,0未发布;1已发布; |
||||
|
*/ |
||||
|
private String isPublish; |
||||
|
|
||||
|
/** |
||||
|
* 活动发布人 |
||||
|
*/ |
||||
|
private String publishStaffId; |
||||
|
|
||||
|
/** |
||||
|
* 活动发布人姓名 |
||||
|
*/ |
||||
|
private String publishStaffName; |
||||
|
|
||||
|
/** |
||||
|
* 0未删除;1:已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.resi.partymember.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActOrgDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 活动id |
||||
|
*/ |
||||
|
private String icPartyActId; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织ID,groupId |
||||
|
*/ |
||||
|
private String joinOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部;6党小组 |
||||
|
*/ |
||||
|
private String orgType; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织ID的上级节点 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* PARTY_ORG_ID的全路径,包含自身。方便前端回显 |
||||
|
*/ |
||||
|
private String joinOrgPath; |
||||
|
|
||||
|
/** |
||||
|
* 0:未删除;1:已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,94 @@ |
|||||
|
package com.epmet.resi.partymember.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 党组织活动签到记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActSignInRecordDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 活动id |
||||
|
*/ |
||||
|
private String icPartyActId; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 签到用户id |
||||
|
*/ |
||||
|
private String epmetUserId; |
||||
|
|
||||
|
/** |
||||
|
* 签到用户姓名 |
||||
|
*/ |
||||
|
private String userRealName; |
||||
|
|
||||
|
/** |
||||
|
* 签到地点 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 签到地点纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 签到地点经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 0:未删除;1:已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,99 @@ |
|||||
|
package com.epmet.resi.partymember.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 日程表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcScheduleDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 所属行政组织ID:当前工作人员所属组织id |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的上级;如果org_id是根组织,那此列=0 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* ORG_ID全路径,包含自身 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 当前登录用户userId |
||||
|
*/ |
||||
|
private String staffId; |
||||
|
|
||||
|
/** |
||||
|
* 日程标题(35字) |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间;其实就是日程所属日期 |
||||
|
*/ |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 是否公开,0:仅自己可见;1:组织内其他人可见 |
||||
|
*/ |
||||
|
private String isPublic; |
||||
|
|
||||
|
/** |
||||
|
* 备注(500字) |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 0:未删除;1已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/22 12:25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BatchAddPartyActFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2616937693642413548L; |
||||
|
private List<String> delActIds; |
||||
|
@Valid |
||||
|
private List<IcPartyActAddOrUpdateFormDTO> actList; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,172 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/19 9:58 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActAddOrUpdateFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -2554822505755122067L; |
||||
|
|
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface UpdateUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
public interface UpdateUserShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
@NotBlank(message = "customerId不能为空", groups = {AddUserInternalGroup.class, UpdateUserInternalGroup.class}) |
||||
|
private String customerId; |
||||
|
|
||||
|
@NotBlank(message = "publishStaffId不能为空", groups = {AddUserInternalGroup.class, UpdateUserInternalGroup.class}) |
||||
|
private String publishStaffId; |
||||
|
|
||||
|
@NotBlank(message = "icPartyActId不能为空", groups = {UpdateUserInternalGroup.class}) |
||||
|
private String icPartyActId; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型,来源于ic_party_act_type_dict |
||||
|
*/ |
||||
|
@NotBlank(message = "活动类型不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String actType; |
||||
|
|
||||
|
/** |
||||
|
* 活动举办时间:yyyy |
||||
|
*/ |
||||
|
@NotBlank(message = "holdYearId不能为空", groups = {AddUserInternalGroup.class, UpdateUserInternalGroup.class}) |
||||
|
private String holdYearId; |
||||
|
|
||||
|
/** |
||||
|
* 活动举办时间:yyyyMM |
||||
|
*/ |
||||
|
@NotBlank(message = "holdMonthId不能为空", groups = {AddUserInternalGroup.class, UpdateUserInternalGroup.class}) |
||||
|
private String holdMonthId; |
||||
|
|
||||
|
/** |
||||
|
* 举办活动时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
@NotNull(message = "活动举办时间不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private Date holdTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动主题 |
||||
|
*/ |
||||
|
@NotBlank(message = "活动主题不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
@Length(max = 35, message = "最多输入35个字", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String topic; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
@NotBlank(message = "活动地点不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
@Length(max = 100, message = "活动地点最多输入100字", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动开始前几天,字典接口返回的 |
||||
|
* 0,1,3,5,7天 |
||||
|
*/ |
||||
|
@NotNull(message = "自动发布时间不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private Integer autoPublicType; |
||||
|
/** |
||||
|
* 发布活动党组织 |
||||
|
*/ |
||||
|
@NotBlank(message = "发布活动党组织不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String publishPartyOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "发布活动党组织名称不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String publishPartyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织ID的上级节点 |
||||
|
*/ |
||||
|
@NotBlank(message = "参加活动党组织ID的上级节点不能为空", groups = {AddUserInternalGroup.class, UpdateUserInternalGroup.class}) |
||||
|
private String publishOrgPid; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部;6党小组 |
||||
|
*/ |
||||
|
@NotBlank(message = "发布活动党组织类型不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String publishOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织PUBLISH_PARTY_ORG_ID的全路径,包含自身。方便前端回显 |
||||
|
*/ |
||||
|
// 后端接口内部去赋值,无需前端传入了
|
||||
|
private String publishOrgPath; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织路径,前端用此列 |
||||
|
* 先放开不限制必填 |
||||
|
*/ |
||||
|
// @NotBlank(message = "publishOrgPathShow不能为空", groups = {AddUserInternalGroup.class, UpdateUserInternalGroup.class})
|
||||
|
private String publishOrgPathShow; |
||||
|
|
||||
|
/** |
||||
|
* 参加人员类型,0:全体党员;1:支部委员 |
||||
|
*/ |
||||
|
@NotBlank(message = "参加人员类型不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String joinUserType; |
||||
|
|
||||
|
/** |
||||
|
* 是否自动通知参加人员,0否;1是 |
||||
|
*/ |
||||
|
@NotBlank(message = "自动通知参加人员不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String isAutoInform; |
||||
|
|
||||
|
/** |
||||
|
* 活动介绍 |
||||
|
*/ |
||||
|
// @NotBlank(message = "活动介绍不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class})
|
||||
|
@Length(max = 1000, message = "活动介绍最多输入1000字", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private String introduce; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织 |
||||
|
*/ |
||||
|
@Valid |
||||
|
@NotEmpty(message = "参加活动党组织不能为空", groups = {AddUserShowGroup.class, UpdateUserShowGroup.class}) |
||||
|
private List<JoinOrgDTO> joinOrgList; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
*/ |
||||
|
private List<FileCommonDTO> attachmentList; |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/19 10:02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActPageFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8171649039313981541L; |
||||
|
// tokenDto取值
|
||||
|
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
@NotBlank(message = "publishStaffId不能为空",groups = AddUserInternalGroup.class) |
||||
|
private String publishStaffId; |
||||
|
/** |
||||
|
* 接口内部查询 |
||||
|
* 当前登录用户所属的行政组织id |
||||
|
*/ |
||||
|
private String staffAgencyId; |
||||
|
// 界面传参数
|
||||
|
private String publishPartyOrgId; |
||||
|
private String startDate; |
||||
|
private String endDate; |
||||
|
private String address; |
||||
|
private String topic; |
||||
|
private String isPublish; |
||||
|
private String actType; |
||||
|
|
||||
|
/** |
||||
|
* 工作端小程序用yyyy |
||||
|
*/ |
||||
|
private String holdYearId; |
||||
|
/** |
||||
|
* 工作端小程序用yyyyMM |
||||
|
*/ |
||||
|
private String holdMonthId; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,71 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/19 10:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class JoinOrgDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6994576136698569857L; |
||||
|
|
||||
|
//前端传入
|
||||
|
/** |
||||
|
* 参加活动党组织ID,groupId |
||||
|
*/ |
||||
|
@NotBlank(message = "参加活动党组织不能为空", groups = {IcPartyActAddOrUpdateFormDTO.AddUserShowGroup.class, IcPartyActAddOrUpdateFormDTO.UpdateUserShowGroup.class}) |
||||
|
private String joinOrgId; |
||||
|
/** |
||||
|
* 参加党组织名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "参加党组织名称不能为空", groups = {IcPartyActAddOrUpdateFormDTO.AddUserShowGroup.class, IcPartyActAddOrUpdateFormDTO.UpdateUserShowGroup.class}) |
||||
|
private String joinOrgName; |
||||
|
/** |
||||
|
* 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部;6党小组 |
||||
|
*/ |
||||
|
@NotBlank(message = "参加活动党组织类型不能为空", groups = {IcPartyActAddOrUpdateFormDTO.AddUserShowGroup.class, IcPartyActAddOrUpdateFormDTO.UpdateUserShowGroup.class}) |
||||
|
private String orgType; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织ID的上级节点 |
||||
|
*/ |
||||
|
@NotBlank(message = "参加活动党组织不能为空", groups = {IcPartyActAddOrUpdateFormDTO.AddUserInternalGroup.class, IcPartyActAddOrUpdateFormDTO.UpdateUserInternalGroup.class}) |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* PARTY_ORG_ID的全路径,包含自身。方便前端回显 |
||||
|
*/ |
||||
|
// 后端接口内部去赋值,无需前端传入了
|
||||
|
private String joinOrgPath; |
||||
|
|
||||
|
/** |
||||
|
* PARTY_ORG_ID的全路径,前端用 |
||||
|
* 先放开不限制必填 |
||||
|
*/ |
||||
|
// @NotBlank(message = "joinOrgPathShow不能为空", groups = {IcPartyActAddOrUpdateFormDTO.AddUserInternalGroup.class, IcPartyActAddOrUpdateFormDTO.UpdateUserInternalGroup.class})
|
||||
|
private String joinOrgPathShow; |
||||
|
|
||||
|
//接口内部赋值
|
||||
|
/** |
||||
|
* 活动id |
||||
|
*/ |
||||
|
private String icPartyActId; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* ic_party_act_org.id |
||||
|
* 详情接口返回 |
||||
|
*/ |
||||
|
private String icPartyActOrgRecId; |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/18 18:45 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartActTypeDTO { |
||||
|
private String label; |
||||
|
private String value; |
||||
|
private Integer yearCount; |
||||
|
private String frequencyDesc; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,142 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.form.JoinOrgDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/19 10:08 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActDetailResDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8102085878449811977L; |
||||
|
private String customerId; |
||||
|
|
||||
|
private String publishStaffId; |
||||
|
|
||||
|
private String icPartyActId; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型,来源于ic_party_act_type_dict |
||||
|
*/ |
||||
|
private String actType; |
||||
|
private String actTypeName; |
||||
|
|
||||
|
/** |
||||
|
* 活动举办时间:yyyy |
||||
|
*/ |
||||
|
private String holdYearId; |
||||
|
|
||||
|
/** |
||||
|
* 活动举办时间:yyyyMM |
||||
|
*/ |
||||
|
private String holdMonthId; |
||||
|
|
||||
|
/** |
||||
|
* 举办活动时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date holdTime; |
||||
|
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
||||
|
private Date autoPublicTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动主题 |
||||
|
*/ |
||||
|
private String topic; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 活动开始前几天 |
||||
|
*/ |
||||
|
private Integer autoPublicType; |
||||
|
|
||||
|
private String autoPublicTypeDesc; |
||||
|
/** |
||||
|
* 发布活动党组织 |
||||
|
*/ |
||||
|
private String publishPartyOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织名称 |
||||
|
*/ |
||||
|
private String publishPartyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织ID的上级节点 |
||||
|
*/ |
||||
|
private String publishOrgPid; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部;6党小组 |
||||
|
*/ |
||||
|
private String publishOrgType; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织PUBLISH_PARTY_ORG_ID的全路径,包含自身。方便前端回显 |
||||
|
*/ |
||||
|
private String publishOrgPath; |
||||
|
|
||||
|
/** |
||||
|
*发布活动党组织路径,前端用此列 |
||||
|
*/ |
||||
|
private String publishOrgPathShow; |
||||
|
|
||||
|
/** |
||||
|
* 参加人员类型,0:全体党员;1:支部委员 |
||||
|
*/ |
||||
|
private String joinUserType; |
||||
|
private String joinUserTypeName; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 是否自动通知参加人员,0否;1是 |
||||
|
*/ |
||||
|
private String isAutoInform; |
||||
|
|
||||
|
/** |
||||
|
* 活动介绍 |
||||
|
*/ |
||||
|
private String introduce; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织 |
||||
|
*/ |
||||
|
private List<JoinOrgDTO> joinOrgList; |
||||
|
|
||||
|
/** |
||||
|
* 附件表 |
||||
|
*/ |
||||
|
private List<FileCommonDTO> attachmentList; |
||||
|
|
||||
|
private Boolean isSignIn; |
||||
|
|
||||
|
private String publishStaffName; |
||||
|
/** |
||||
|
* 是否发布,0未发布;1已发布; |
||||
|
*/ |
||||
|
private String isPublish; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,83 @@ |
|||||
|
package com.epmet.resi.partymember.dto.icpartyact.result; |
||||
|
|
||||
|
import com.epmet.resi.partymember.dto.icpartyact.form.JoinOrgDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/19 10:06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActPageResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1414832133227703667L; |
||||
|
|
||||
|
private String icPartyActId; |
||||
|
/** |
||||
|
* 活动主题 |
||||
|
*/ |
||||
|
private String topic; |
||||
|
|
||||
|
/** |
||||
|
* 发布活动党组织名称 |
||||
|
*/ |
||||
|
private String publishPartyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 活动发布人姓名 |
||||
|
*/ |
||||
|
private String publishStaffName; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型,来源于ic_party_act_type_dict |
||||
|
*/ |
||||
|
private String actType; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型,来源于ic_party_act_type_dict |
||||
|
*/ |
||||
|
private String actTypeName; |
||||
|
|
||||
|
/** |
||||
|
* 举办活动时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date holdTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 是否发布,0未发布;1已发布; |
||||
|
*/ |
||||
|
private String isPublish; |
||||
|
|
||||
|
/** |
||||
|
* 活动发布人 |
||||
|
*/ |
||||
|
private String publishStaffId; |
||||
|
|
||||
|
//以下返参,用于导出
|
||||
|
/** |
||||
|
* 是否发布,0未发布;1已发布; |
||||
|
* 返回名称 |
||||
|
*/ |
||||
|
private String isPublishName; |
||||
|
/** |
||||
|
* 参加人员类型,0:全体党员;1:支部委员 |
||||
|
*/ |
||||
|
private String joinUserType; |
||||
|
private String joinUserTypeName; |
||||
|
|
||||
|
private List<JoinOrgDTO> joinOrgList; |
||||
|
//导出用
|
||||
|
private String joinOrgNameStr; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,77 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 党组织活动类型字典表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActTypeDictDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 活动类型key |
||||
|
*/ |
||||
|
private String typeKey; |
||||
|
|
||||
|
/** |
||||
|
* 活动名称 |
||||
|
*/ |
||||
|
private String typeName; |
||||
|
|
||||
|
/** |
||||
|
* 每年几次 |
||||
|
*/ |
||||
|
private Integer yearCount; |
||||
|
|
||||
|
/** |
||||
|
* 频次单位 |
||||
|
*/ |
||||
|
private String frequencyUnit; |
||||
|
|
||||
|
/** |
||||
|
* 频次数量 |
||||
|
*/ |
||||
|
private Integer frequencyCount; |
||||
|
|
||||
|
/** |
||||
|
* 频率描述 |
||||
|
*/ |
||||
|
private String frequencyDesc; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 0未删除;1:已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
private String label; |
||||
|
private String value; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/19 13:52 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActAndScheduleListFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -6776882545589530612L; |
||||
|
|
||||
|
private String startDate; |
||||
|
private String endDate; |
||||
|
private String dateId; |
||||
|
private String yearId = ""; |
||||
|
|
||||
|
/** |
||||
|
* 是否本人创建的活动,1:是;0:否 |
||||
|
*/ |
||||
|
private String isSelf; |
||||
|
|
||||
|
/** |
||||
|
* 党组织ID |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
private String customerId; |
||||
|
private String staffId; |
||||
|
private String agencyId; |
||||
|
private String path; |
||||
|
|
||||
|
/** |
||||
|
* 当seachType = 'yearSearch'时,不需要查询党组织 |
||||
|
*/ |
||||
|
private String searchType = ""; |
||||
|
|
||||
|
private String type = ""; |
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/18 16:23 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AddOrEditScheduleFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 6290505458783549828L; |
||||
|
|
||||
|
public interface AddScheduleForm{} |
||||
|
|
||||
|
private String scheduleId; |
||||
|
private String staffId; |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 日程标题(35字) |
||||
|
*/ |
||||
|
@NotBlank(message = "title不能为空",groups = AddScheduleForm.class) |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间;其实就是日程所属日期 |
||||
|
*/ |
||||
|
@NotNull(message = "remindTime不能为空",groups = AddScheduleForm.class) |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 是否公开,0:仅自己可见;1:组织内其他人可见 |
||||
|
*/ |
||||
|
@NotBlank(message = "isPublic不能为空",groups = AddScheduleForm.class) |
||||
|
private String isPublic; |
||||
|
|
||||
|
/** |
||||
|
* 备注(500字) |
||||
|
*/ |
||||
|
private String remark; |
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/19 08:59 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HomeMonthTotalFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1128815856169903825L; |
||||
|
|
||||
|
public interface HomeMonthTotalForm{} |
||||
|
|
||||
|
/** |
||||
|
* 年份ID |
||||
|
*/ |
||||
|
@NotBlank(message = "yearId不能为空",groups = HomeMonthTotalForm.class) |
||||
|
private String yearId; |
||||
|
|
||||
|
/** |
||||
|
* 党支部ID |
||||
|
*/ |
||||
|
@NotBlank(message = "orgId不能为空",groups = HomeMonthTotalForm.class) |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 是否本人创建的活动,1:是;0:否 |
||||
|
*/ |
||||
|
@NotBlank(message = "isSelf不能为空",groups = HomeMonthTotalForm.class) |
||||
|
private String isSelf; |
||||
|
|
||||
|
private String staffId; |
||||
|
|
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 工作人员所属组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
private String path; |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class IcPartyActListFormDTO implements Serializable { |
||||
|
/** |
||||
|
* 活动类型,0:支部党员大会;1:支部委员会;2:党小组会;3:党课;4:主题党日;5:为民服务活动; |
||||
|
*/ |
||||
|
private String actType; |
||||
|
/** |
||||
|
* 签到状态[已签到:signIn 未签到:unSignIn] |
||||
|
*/ |
||||
|
private String signIn; |
||||
|
/** |
||||
|
* 标题内容 模糊检索 |
||||
|
*/ |
||||
|
private String topic; |
||||
|
|
||||
|
//参加活动党组织ID,groupId
|
||||
|
private String joinOrgId; |
||||
|
|
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 20; |
||||
|
private Boolean isPage = true; |
||||
|
|
||||
|
//token中信息
|
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class PartyActSignFormDTO implements Serializable { |
||||
|
/** |
||||
|
* 活动Id |
||||
|
*/ |
||||
|
@NotBlank(message = "活动Id不能为空",groups = {UpdateGroup.class}) |
||||
|
private String icPartyActId; |
||||
|
/** |
||||
|
* 网格Id |
||||
|
*/ |
||||
|
@NotBlank(message = "网格Id不能为空",groups = {AddGroup.class}) |
||||
|
private String gridId; |
||||
|
/** |
||||
|
* 签到地点 |
||||
|
*/ |
||||
|
@NotBlank(message = "签到地点不能为空",groups = {AddGroup.class}) |
||||
|
private String address; |
||||
|
/** |
||||
|
* 签到地点纬度 |
||||
|
*/ |
||||
|
@NotBlank(message = "签到地点纬度不能为空",groups = {AddGroup.class}) |
||||
|
private String latitude; |
||||
|
/** |
||||
|
* 签到地点经度 |
||||
|
*/ |
||||
|
@NotBlank(message = "签到地点经度不能为空",groups = {AddGroup.class}) |
||||
|
private String longitude; |
||||
|
|
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 20; |
||||
|
private Boolean isPage = true; |
||||
|
|
||||
|
//token中信息
|
||||
|
private String customerId; |
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class PartyActStatisFormDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织ID,groupId |
||||
|
*/ |
||||
|
@NotBlank(message = "党组织Id不能为空", groups = AddGroup.class) |
||||
|
private String joinOrgId; |
||||
|
|
||||
|
/** |
||||
|
* 活动开始时间 【yyyy-MM-dd】 |
||||
|
*/ |
||||
|
private String startTime; |
||||
|
|
||||
|
/** |
||||
|
* 活动结束时间 【yyyy-MM-dd】 |
||||
|
*/ |
||||
|
private String endTime; |
||||
|
|
||||
|
//党组织Id集合
|
||||
|
private List<String> partyOrgIdList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class PartyOrgListFormDTO implements Serializable { |
||||
|
/** |
||||
|
* 网格Id |
||||
|
*/ |
||||
|
@NotNull(message = "网格Id不能为空", groups = AddGroup.class) |
||||
|
private String gridId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/22 09:26 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class YearSearchFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 4557112229519696741L; |
||||
|
|
||||
|
public interface YearSearchForm{} |
||||
|
|
||||
|
@NotBlank(message = "yearId不能为空",groups = YearSearchForm.class) |
||||
|
private String yearId; |
||||
|
|
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 是否本人创建的活动,1:是;0:否 |
||||
|
*/ |
||||
|
private String isSelf = NumConstant.ONE_STR; |
||||
|
|
||||
|
private String staffId; |
||||
|
private String customerId; |
||||
|
} |
||||
@ -0,0 +1,86 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.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 2022/8/19 13:41 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActAndScheduleListResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 7378300105829566449L; |
||||
|
|
||||
|
private Integer scheduleTotal; |
||||
|
private Integer activityTotal; |
||||
|
private String dateId; |
||||
|
|
||||
|
private List<ActivityListDTO> activityList; |
||||
|
|
||||
|
private List<ScheduleListDTO> scheduleList; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public static class ActivityListDTO implements Serializable{ |
||||
|
|
||||
|
private static final long serialVersionUID = -9050507457068805831L; |
||||
|
|
||||
|
private String activityId; |
||||
|
private String staffId; |
||||
|
private String dateId; |
||||
|
private String topic; |
||||
|
private String address; |
||||
|
private String holdTime; |
||||
|
private String autoPublicTime; |
||||
|
private String isAutoInformValue; |
||||
|
private String isAutoInform; |
||||
|
private String autoInformDay; |
||||
|
private String type; |
||||
|
private String actTypeName; |
||||
|
private String isPublicValue; |
||||
|
private String isPublish; |
||||
|
private String joinTypeValue; |
||||
|
private String joinUserType; |
||||
|
private List<JoinOrgDTO> joinOrgList; |
||||
|
private List<String> joinOrgs; |
||||
|
private Boolean isMe = false; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class ScheduleListDTO implements Serializable{ |
||||
|
|
||||
|
private static final long serialVersionUID = 5372167729733804267L; |
||||
|
|
||||
|
private String scheduleId; |
||||
|
private String title; |
||||
|
private String remindTime; |
||||
|
private String remark; |
||||
|
private Boolean isMe = false; |
||||
|
private String staffId; |
||||
|
private String dateId; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class JoinOrgDTO implements Serializable{ |
||||
|
|
||||
|
private static final long serialVersionUID = -981758371558960097L; |
||||
|
|
||||
|
private String partyOrgId; |
||||
|
private String partyOrgName; |
||||
|
} |
||||
|
|
||||
|
public ActAndScheduleListResultDTO() { |
||||
|
this.scheduleTotal = NumConstant.ZERO; |
||||
|
this.activityTotal = NumConstant.ZERO; |
||||
|
this.dateId = ""; |
||||
|
this.activityList = new ArrayList<>(); |
||||
|
this.scheduleList = new ArrayList<>(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/22 10:25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DefaultPartyOrgResDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -7563161453372080189L; |
||||
|
/** |
||||
|
* 当前登录用户所属的组织 |
||||
|
*/ |
||||
|
private String staffAgencyId; |
||||
|
/** |
||||
|
* 当前登录用户所属的组织名称 |
||||
|
*/ |
||||
|
private String staffAgencyName; |
||||
|
/** |
||||
|
* 当前登录用户所属的行政组织下,默认的党组织名称 |
||||
|
*/ |
||||
|
private String defaultPartyOrgId; |
||||
|
private String defaultPartyOrgPid; |
||||
|
/** |
||||
|
* 党组织名称 |
||||
|
*/ |
||||
|
private String defaultPartyOrgName; |
||||
|
/** |
||||
|
* 党组织路径 |
||||
|
*/ |
||||
|
private String defaultPartyOrgPath; |
||||
|
|
||||
|
private String orgType; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/19 08:57 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HomeMonthTotalResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -4647982500373510830L; |
||||
|
|
||||
|
private String monthId; |
||||
|
|
||||
|
private Integer count; |
||||
|
|
||||
|
public HomeMonthTotalResultDTO() { |
||||
|
this.monthId = ""; |
||||
|
this.count = NumConstant.ZERO; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import com.epmet.resi.partymember.dto.partymember.result.AdditionalInfoDTO; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class IcPartyActListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
/** |
||||
|
* 活动Id |
||||
|
*/ |
||||
|
private String icPartyActId; |
||||
|
/** |
||||
|
* 活动主题 |
||||
|
*/ |
||||
|
private String topic; |
||||
|
/** |
||||
|
* 活动类型,0:支部党员大会;1:支部委员会;2:党小组会;3:党课;4:主题党日;5:为民服务活动; |
||||
|
*/ |
||||
|
private String actType; |
||||
|
/** |
||||
|
* 活动类型,0:支部党员大会;1:支部委员会;2:党小组会;3:党课;4:主题党日;5:为民服务活动; |
||||
|
*/ |
||||
|
private String actTypeName; |
||||
|
/** |
||||
|
* 活动时间 |
||||
|
*/ |
||||
|
private String holdTime; |
||||
|
/** |
||||
|
* 活动地点 |
||||
|
*/ |
||||
|
private String address; |
||||
|
/** |
||||
|
* 签到状态[已签到:signIn 未签到:unSignIn] |
||||
|
*/ |
||||
|
private String signIn; |
||||
|
/** |
||||
|
* 签到状态名 |
||||
|
*/ |
||||
|
private String signInName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2022/8/23 13:10 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyOrgInfo implements Serializable { |
||||
|
/** |
||||
|
* 党组织ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
/** |
||||
|
* 党组织的上级ID,没有上级时为0 |
||||
|
*/ |
||||
|
private String orgPid; |
||||
|
/** |
||||
|
* 党组织名称 |
||||
|
*/ |
||||
|
private String partyOrgName; |
||||
|
|
||||
|
/** |
||||
|
* 党组织的id全路径(包含自身) |
||||
|
*/ |
||||
|
private String partyOrgIdPath; |
||||
|
private String partyOrgNamePath; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class PartyActStatisResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
/** |
||||
|
* 党组织Id |
||||
|
*/ |
||||
|
private String joinOrgId = ""; |
||||
|
/** |
||||
|
* 党组织名称 |
||||
|
*/ |
||||
|
private String joinOrgName = ""; |
||||
|
/** |
||||
|
* 支部党员大会次数 |
||||
|
*/ |
||||
|
private Integer dydhNum = 0; |
||||
|
/** |
||||
|
* 支部委员会次数 |
||||
|
*/ |
||||
|
private Integer wyhNum = 0; |
||||
|
/** |
||||
|
* 党小组会次数 |
||||
|
*/ |
||||
|
private Integer dxzhNum = 0; |
||||
|
/** |
||||
|
* 党课次数 |
||||
|
*/ |
||||
|
private Integer dkNum = 0; |
||||
|
/** |
||||
|
* 主题党日次数 |
||||
|
*/ |
||||
|
private Integer ztdrNum = 0; |
||||
|
/** |
||||
|
* 为民服务活动次数 |
||||
|
*/ |
||||
|
private Integer wmfwNum = 0; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class PartyOrgListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
/** |
||||
|
* 党组织Id |
||||
|
*/ |
||||
|
private String partyOrgId = ""; |
||||
|
/** |
||||
|
* 党支部IdPath |
||||
|
*/ |
||||
|
private String partyOrgPath = ""; |
||||
|
/** |
||||
|
* 党组织名称 |
||||
|
*/ |
||||
|
private String partyOrgName = ""; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/22 09:27 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class YearSearchDetailResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 8961924457475202790L; |
||||
|
|
||||
|
private String type; |
||||
|
private String typeValue; |
||||
|
private String frequency; |
||||
|
private List<IcPartyActDetailResDTO> activityList; |
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partyOrg.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/8/22 09:27 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class YearSearchResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 8961924457475202790L; |
||||
|
|
||||
|
private String type; |
||||
|
private String frequency; |
||||
|
private List<YearSearchActivityListDTO> activityList; |
||||
|
|
||||
|
@Data |
||||
|
public static class YearSearchActivityListDTO implements Serializable{ |
||||
|
|
||||
|
private static final long serialVersionUID = -9050507457068805831L; |
||||
|
|
||||
|
private String activityId; |
||||
|
private String staffId; |
||||
|
private String dateId; |
||||
|
private String topic; |
||||
|
private String address; |
||||
|
private String holdTime; |
||||
|
private String type; |
||||
|
private String isPublicValue; |
||||
|
private String isPublish; |
||||
|
private String joinTypeValue; |
||||
|
private String joinUserType; |
||||
|
private String isAutoInformValue; |
||||
|
private String autoInformDay; |
||||
|
private String autoPublicTime; |
||||
|
private List<ActAndScheduleListResultDTO.JoinOrgDTO> joinOrgList; |
||||
|
private List<String> joinOrgs; |
||||
|
private Boolean isMe = false; |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.resi.partymember.dto.partymember.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class IcPartyInfoResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -1L; |
||||
|
|
||||
|
/** |
||||
|
* 所属支部Id |
||||
|
*/ |
||||
|
private String id = ""; |
||||
|
|
||||
|
/** |
||||
|
* 所属支部名称 |
||||
|
*/ |
||||
|
private String partOrgName = ""; |
||||
|
|
||||
|
/** |
||||
|
* 未读消息数 |
||||
|
*/ |
||||
|
private Integer count; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,360 @@ |
|||||
|
package com.epmet.modules.partyOrg.controller; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.ExcelWriter; |
||||
|
import com.alibaba.excel.write.metadata.WriteSheet; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.modules.partyOrg.excel.IcPartyActExpoprtExcel; |
||||
|
import com.epmet.modules.partyOrg.excel.PartyActStatisExcel; |
||||
|
import com.epmet.modules.partyOrg.service.IcPartyActService; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.form.BatchAddPartyActFormDTO; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActAddOrUpdateFormDTO; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartActTypeDTO; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO; |
||||
|
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO; |
||||
|
import com.epmet.resi.partymember.dto.partyOrg.form.*; |
||||
|
import com.epmet.resi.partymember.dto.partyOrg.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.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.IOException; |
||||
|
import java.io.PrintWriter; |
||||
|
import java.util.Date; |
||||
|
import java.util.LinkedList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 党建组织活动 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-18 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("icPartyAct") |
||||
|
public class IcPartyActController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPartyActService icPartyActService; |
||||
|
|
||||
|
/** |
||||
|
* 添加、修改活动各端通用 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("addOrUpdate") |
||||
|
public Result<Map<String,String>> addOrUpdate(@LoginUser TokenDto tokenDto,@RequestBody IcPartyActAddOrUpdateFormDTO formDTO){ |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setPublishStaffId(tokenDto.getUserId()); |
||||
|
if(StringUtils.isNotBlank(formDTO.getIcPartyActId())){ |
||||
|
//修改活动
|
||||
|
ValidatorUtils.validateEntity(formDTO,IcPartyActAddOrUpdateFormDTO.UpdateUserShowGroup.class,IcPartyActAddOrUpdateFormDTO.UpdateUserInternalGroup.class); |
||||
|
}else{ |
||||
|
//添加活动
|
||||
|
ValidatorUtils.validateEntity(formDTO,IcPartyActAddOrUpdateFormDTO.AddUserShowGroup.class,IcPartyActAddOrUpdateFormDTO.AddUserInternalGroup.class); |
||||
|
} |
||||
|
Map<String,String> map=icPartyActService.addOrUpdate(formDTO); |
||||
|
return new Result<Map<String, String>>().ok(map); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 生成年度计划 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("batch-add") |
||||
|
public Result batchAdd(@LoginUser TokenDto tokenDto,@RequestBody BatchAddPartyActFormDTO formDTO){ |
||||
|
formDTO.getActList().forEach(dto->{ |
||||
|
dto.setCustomerId(tokenDto.getCustomerId()); |
||||
|
dto.setPublishStaffId(tokenDto.getUserId()); |
||||
|
if(StringUtils.isNotBlank(dto.getIcPartyActId())){ |
||||
|
//修改活动
|
||||
|
ValidatorUtils.validateEntity(dto,IcPartyActAddOrUpdateFormDTO.UpdateUserShowGroup.class,IcPartyActAddOrUpdateFormDTO.UpdateUserInternalGroup.class); |
||||
|
}else{ |
||||
|
//添加活动
|
||||
|
ValidatorUtils.validateEntity(dto,IcPartyActAddOrUpdateFormDTO.AddUserShowGroup.class,IcPartyActAddOrUpdateFormDTO.AddUserInternalGroup.class); |
||||
|
} |
||||
|
icPartyActService.addOrUpdate(dto); |
||||
|
}); |
||||
|
icPartyActService.deleteIcPartyAct(tokenDto.getCustomerId(),tokenDto.getUserId(),formDTO.getDelActIds()); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【活动列表】分页查询(工作端小程序通用) |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("page-list") |
||||
|
public Result<PageData<IcPartyActPageResultDTO>> pageList(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActPageFormDTO formDTO){ |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setPublishStaffId(tokenDto.getUserId()); |
||||
|
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
||||
|
return new Result<PageData<IcPartyActPageResultDTO>>().ok(icPartyActService.pageList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 活动列表活动详情 |
||||
|
* 居民端小程序活动详情、工作端小程序活动详情通用 |
||||
|
* @param tokenDto |
||||
|
* @param icPartyActId |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("act-detail/{icPartyActId}") |
||||
|
public Result<IcPartyActDetailResDTO> actDetail(@LoginUser TokenDto tokenDto, @PathVariable("icPartyActId")String icPartyActId){ |
||||
|
if(StringUtils.isBlank(icPartyActId)){ |
||||
|
return new Result<>(); |
||||
|
} |
||||
|
return new Result<IcPartyActDetailResDTO>().ok(icPartyActService.queryActDetail(tokenDto.getCustomerId(),tokenDto.getUserId(),icPartyActId)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 活动类型 |
||||
|
* @param tokenDto |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/acttypelist") |
||||
|
public com.epmet.commons.tools.utils.Result<List<IcPartActTypeDTO>> actTypeList(@LoginUser TokenDto tokenDto){ |
||||
|
List<IcPartActTypeDTO> list=icPartyActService.actTypeList(tokenDto.getCustomerId()); |
||||
|
return new Result<List<IcPartActTypeDTO>>().ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc: 【党建日历】首页-获取每月总数 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/8/19 09:05 |
||||
|
*/ |
||||
|
@PostMapping("homeMonthTotal") |
||||
|
public Result<List<HomeMonthTotalResultDTO>> getHomeMonthTotal(@LoginUser TokenDto tokenDto,@RequestBody HomeMonthTotalFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, HomeMonthTotalFormDTO.HomeMonthTotalForm.class); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
return new Result<List<HomeMonthTotalResultDTO>>().ok(icPartyActService.getHomeMonthTotal(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc:【党建日历】活动、日程列表 |
||||
|
* @param formDTO |
||||
|
* @param tokenDto |
||||
|
* @author zxc |
||||
|
* @date 2022/8/19 13:57 |
||||
|
*/ |
||||
|
@PostMapping("actAndScheduleList") |
||||
|
public Result<ActAndScheduleListResultDTO> getActAndScheduleList(@RequestBody ActAndScheduleListFormDTO formDTO, @LoginUser TokenDto tokenDto){ |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
return new Result<ActAndScheduleListResultDTO>().ok(icPartyActService.getActAndScheduleList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc:【党建日历】某月/天数据搜索列表 |
||||
|
* @param formDTO |
||||
|
* @param tokenDto |
||||
|
* @author zxc |
||||
|
* @date 2022/8/19 14:00 |
||||
|
*/ |
||||
|
@PostMapping("homeSearch") |
||||
|
public Result<List<ActAndScheduleListResultDTO>> homeSearch(@RequestBody ActAndScheduleListFormDTO formDTO, @LoginUser TokenDto tokenDto){ |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
return new Result<List<ActAndScheduleListResultDTO>>().ok(icPartyActService.homeSearch(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* pc活动列表-发布活动 |
||||
|
* pc党建日历左下角列表,点击发布 |
||||
|
* 工作端小程序点击发布 |
||||
|
* @param tokenDto |
||||
|
* @param icPartyActId |
||||
|
* @return |
||||
|
*/ |
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("publish/{icPartyActId}") |
||||
|
public Result publicshIcPartyAct(@LoginUser TokenDto tokenDto,@PathVariable("icPartyActId")String icPartyActId){ |
||||
|
icPartyActService.publicshIcPartyAct(tokenDto.getUserId(),icPartyActId); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* pc活动列表-发布活动 |
||||
|
* pc党建日历左下角列表,点击删除 |
||||
|
* pc生成年度记录,删除活动 |
||||
|
* 工作端小程序-详情页面,删除 |
||||
|
* @param tokenDto |
||||
|
* @param icPartyActIds |
||||
|
* @return |
||||
|
*/ |
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("del") |
||||
|
public Result deleteIcPartyAct(@LoginUser TokenDto tokenDto,@RequestBody List<String> icPartyActIds){ |
||||
|
if(CollectionUtils.isNotEmpty(icPartyActIds)){ |
||||
|
icPartyActService.deleteIcPartyAct(tokenDto.getCustomerId(),tokenDto.getUserId(),icPartyActIds); |
||||
|
} |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc:【党建日历】生成年度活动计划查询 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2022/8/22 09:33 |
||||
|
*/ |
||||
|
@PostMapping("yearSearch01") |
||||
|
public Result<List<YearSearchResultDTO>> yearSearch01(@LoginUser TokenDto tokenDto, @RequestBody YearSearchFormDTO formDTO){ |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
return new Result<List<YearSearchResultDTO>>().ok(icPartyActService.yearSearch01(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 【党建日历】生成年度活动计划查询 |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("yearSearch") |
||||
|
public Result<List<YearSearchDetailResultDTO>> yearSearch(@LoginUser TokenDto tokenDto, @RequestBody YearSearchFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, YearSearchFormDTO.YearSearchForm.class); |
||||
|
formDTO.setStaffId(tokenDto.getUserId()); |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
return new Result<List<YearSearchDetailResultDTO>>().ok(icPartyActService.yearSearch(formDTO)); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("/export-act") |
||||
|
public void export(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActPageFormDTO formDTO, HttpServletResponse response) throws IOException { |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setPublishStaffId(tokenDto.getUserId()); |
||||
|
formDTO.setIsPage(false); |
||||
|
ExcelWriter excelWriter = null; |
||||
|
formDTO.setPageNo(NumConstant.ONE); |
||||
|
formDTO.setPageSize(NumConstant.TEN_THOUSAND); |
||||
|
try { |
||||
|
String fileName = "党组织活动" + DateUtils.format(new Date()) + ".xlsx"; |
||||
|
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcPartyActExpoprtExcel.class).build(); |
||||
|
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); |
||||
|
PageData<IcPartyActPageResultDTO> data = null; |
||||
|
List<IcPartyActExpoprtExcel> list = null; |
||||
|
do { |
||||
|
data = icPartyActService.pageList(formDTO); |
||||
|
data.getList().forEach(l->{ |
||||
|
List<String> orgNameList = l.getJoinOrgList().stream().map(m -> m.getJoinOrgName()).distinct().collect(Collectors.toList()); |
||||
|
l.setJoinOrgNameStr(orgNameList.stream().map(String::valueOf).collect(Collectors.joining(","))); |
||||
|
}); |
||||
|
list = ConvertUtils.sourceToTarget(data.getList(), IcPartyActExpoprtExcel.class); |
||||
|
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); |
||||
|
excelWriter.write(list, writeSheet); |
||||
|
} while (CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize()); |
||||
|
} catch (EpmetException e) { |
||||
|
response.reset(); |
||||
|
response.setCharacterEncoding("UTF-8"); |
||||
|
response.setHeader("content-type", "application/json; charset=UTF-8"); |
||||
|
PrintWriter printWriter = response.getWriter(); |
||||
|
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg()); |
||||
|
printWriter.write(JSON.toJSONString(result)); |
||||
|
printWriter.close(); |
||||
|
} catch (Exception e) { |
||||
|
log.error("export exception", e); |
||||
|
} finally { |
||||
|
if (excelWriter != null) { |
||||
|
excelWriter.finish(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@RequestMapping("list") |
||||
|
public Result<PageData<IcPartyActListResultDTO>> list(@LoginUser TokenDto tokenDto, @RequestBody IcPartyActListFormDTO formDTO){ |
||||
|
formDTO.setCustomerId(tokenDto.getCustomerId()); |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
return new Result<PageData<IcPartyActListResultDTO>>().ok(icPartyActService.list(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通知:您有一个活动3天后即将自动发布 |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("noticePartyActAutoPublish") |
||||
|
public Result noticePartyActAutoPublish(){ |
||||
|
icPartyActService.noticePartyActAutoPublish(); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 自动发布活动 |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("autoPublishIcPartyAct") |
||||
|
public Result autoPublishIcPartyAct(){ |
||||
|
icPartyActService.autoPublishIcPartyAct(); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Desc: 统计各党组织参与各种党活动的次数 |
||||
|
*/ |
||||
|
@RequestMapping("patryactstatis") |
||||
|
public Result<LinkedList<PartyActStatisResultDTO>> patryActStatis(@RequestBody PartyActStatisFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, AddGroup.class); |
||||
|
return new Result<LinkedList<PartyActStatisResultDTO>>().ok(icPartyActService.patryActStatis(formDTO)); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("export") |
||||
|
public void export(@RequestBody PartyActStatisFormDTO formDTO, HttpServletResponse response) throws IOException { |
||||
|
ExcelWriter excelWriter = null; |
||||
|
try { |
||||
|
String fileName = "党建数据统计" + DateUtils.format(new Date()) + ".xlsx"; |
||||
|
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), PartyActStatisExcel.class).build(); |
||||
|
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); |
||||
|
List<PartyActStatisResultDTO> data = icPartyActService.patryActStatis(formDTO); |
||||
|
List<PartyActStatisExcel> list = ConvertUtils.sourceToTarget(data, PartyActStatisExcel.class); |
||||
|
excelWriter.write(list, writeSheet); |
||||
|
} catch (EpmetException e) { |
||||
|
response.reset(); |
||||
|
response.setCharacterEncoding("UTF-8"); |
||||
|
response.setHeader("content-type", "application/json; charset=UTF-8"); |
||||
|
PrintWriter printWriter = response.getWriter(); |
||||
|
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMsg()); |
||||
|
printWriter.write(JSON.toJSONString(result)); |
||||
|
printWriter.close(); |
||||
|
} catch (Exception e) { |
||||
|
log.error("export exception", e); |
||||
|
} finally { |
||||
|
if (excelWriter != null) { |
||||
|
excelWriter.finish(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.modules.partyOrg.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
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.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.modules.partyOrg.service.IcPartyActOrgService; |
||||
|
import com.epmet.resi.partymember.dto.IcPartyActOrgDTO; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 参加活动党组织表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-08-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icPartyActOrg") |
||||
|
public class IcPartyActOrgController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcPartyActOrgService icPartyActOrgService; |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue