代表联系选民

常委会联系选民
This commit is contained in:
lijiaqi 2022-11-24 10:47:00 +08:00
parent 392e5e57a8
commit 82394c100c
81 changed files with 2650 additions and 1 deletions

View File

@ -0,0 +1,166 @@
package com.ydool.boot.api.controller;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.entity.BaseEntity;
import com.ydool.boot.core.exception.ResultException;
import com.ydool.boot.modules.rddb.entity.CwhContactVoter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterComment;
import com.ydool.boot.modules.rddb.entity.dto.CwhContactVoterDto;
import com.ydool.boot.modules.rddb.entity.request.ContactCommentRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.IntendRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.RecordRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.SignRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.TransactRequest;
import com.ydool.boot.modules.rddb.service.CwhContactVoterCommentService;
import com.ydool.boot.modules.rddb.service.CwhContactVoterService;
import com.ydool.boot.modules.rddb.wrapper.CwhContactVoterWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.formula.functions.Rank;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Controller
@RequestMapping("/api/cwh_contact_voter")
@Api(value = "A常委会联系选民", tags = "A常委会联系选民")
public class ApiCwhContactVoterController extends ApiBaseController {
@Autowired
private CwhContactVoterService cwhContactVoterService;
@Autowired
private CwhContactVoterCommentService cwhContactVoterCommentService;
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "type", value = "public公告栏underWay进行中"),
}
)
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系选民", name = "data", dataTypeClass =
CwhContactVoterDto.class)})
@ApiOperation("常委会联系选民列表")
@GetMapping("cwhContactVoterCommentPage")
public void cwhContactVoterPage(String type) {
LambdaQueryWrapper<CwhContactVoter> qw = new LambdaQueryWrapper<CwhContactVoter>();
if (!"underWay".equals(type) && !"public".equals(type)) throw new ResultException(Ret.fail("类型不支持"));
if ("underWay".equals(type)) qw.lt(CwhContactVoter::getState, CwhContactVoter.STATE_PUBLIC);
if ("public".equals(type)) qw.eq(CwhContactVoter::getState, CwhContactVoter.STATE_PUBLIC);
IPage<CwhContactVoter> paged = cwhContactVoterService.page(new Page<>(getPageNum(),
getPageSize()), qw.orderByDesc(CwhContactVoter::getCreatedAt));
render(Ret.ok().paged(CwhContactVoterWrapper.build().pageVO(paged)));
}
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "id", value = "常委会联系选民id"),
}
)
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系选民", name = "data", dataTypeClass =
CwhContactVoterDto.class)})
@ApiOperation("常委会联系选民详情")
@GetMapping("cwhContactVoterCommentPage")
public void cwhContactVoterDetail(String id) {
CwhContactVoter cwhContactVoter = cwhContactVoterService.getById(id);
Assert.notNull(cwhContactVoter, "未找到该记录");
render(Ret.ok().data(CwhContactVoterWrapper.build().entityVO(cwhContactVoter)));
}
@ApiOperation("活动准备")
@PostMapping("state/intend")
@ResponseBody
public void stateIntend(@Validated @RequestBody IntendRequest request) {
Ret ret = cwhContactVoterService.stateIntend(request, getApiUser());
render(ret);
}
@ApiOperation("活动签到")
@PostMapping("state/sign")
@ResponseBody
public void stateSign(@Validated @RequestBody SignRequest request) {
Ret ret = cwhContactVoterService.stateSign(request, getApiUser());
render(ret);
}
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "常委会联系选民id"),
})
@ApiOperation("结束签到")
@PutMapping("end/sign")
@ResponseBody
public void endSign(String id) {
Ret ret = cwhContactVoterService.endSign(id, getApiUser());
render(ret);
}
@ApiOperation("活动记录")
@PostMapping("state/record")
@ResponseBody
public void stateRecord(@Validated @RequestBody RecordRequest request) {
Ret ret = cwhContactVoterService.stateRecord(request, getApiUser());
render(ret);
}
@ApiOperation("建议办理")
@GetMapping("state/transact")
@ResponseBody
public void stateTransact(@Validated @RequestBody TransactRequest request) {
Ret ret = cwhContactVoterService.stateTransact(request, getApiUser());
render(ret);
}
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "常委会联系选民id"),
})
@ApiOperation("删除")
@DeleteMapping("deleteCwhContactVoter")
public void deleteCwhContactVoter(String id) {
CwhContactVoter cwhContactVoter = cwhContactVoterService.getById(id);
Assert.notNull(cwhContactVoter, "未找到该记录");
render(!cwhContactVoterService.removeById(id) ? Ret.fail("删除失败") : Ret.ok().msg("删除成功"));
}
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "id", value = "常委会联系选民id"),
@ApiImplicitParam(name = "type", value = "环节 1-5"),
}
)
@DynamicResponseParameters(properties = {@DynamicParameter(value = "评论", name = "data", dataTypeClass =
CwhContactVoterComment.class)})
@ApiOperation("评论列表")
@GetMapping("cwhContactVoterCommentPage")
public void cwhContactVoterCommentPage(String id, Integer type) {
LambdaQueryWrapper<CwhContactVoterComment> qw = new LambdaQueryWrapper<CwhContactVoterComment>();
qw.eq(CwhContactVoterComment::getContactId, id)
.eq(ObjectUtil.isNotNull(type), CwhContactVoterComment::getType, type)
.orderByDesc(CwhContactVoterComment::getCreatedAt);
Page<CwhContactVoterComment> paged = cwhContactVoterCommentService.page(new Page<>(getPageNum(),
getPageSize()), qw);
render(Ret.ok().paged(paged));
}
@ApiOperation("评论")
@PostMapping("cwhContactVoterComment")
public void cwhContactVoterComment(@Validated @RequestBody ContactCommentRequest commentRequest) {
Ret ret = cwhContactVoterCommentService.comment(commentRequest, getApiUser());
render(ret);
}
}

View File

@ -0,0 +1,166 @@
package com.ydool.boot.api.controller;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.exception.ResultException;
import com.ydool.boot.modules.rddb.entity.CwhContactVoter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterComment;
import com.ydool.boot.modules.rddb.entity.DbContactVoter;
import com.ydool.boot.modules.rddb.entity.DbContactVoterComment;
import com.ydool.boot.modules.rddb.entity.dto.CwhContactVoterDto;
import com.ydool.boot.modules.rddb.entity.dto.DbContactVoterDto;
import com.ydool.boot.modules.rddb.entity.request.ContactCommentRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.IntendRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.RecordRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.SignRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.TransactRequest;
import com.ydool.boot.modules.rddb.service.DbContactVoterCommentService;
import com.ydool.boot.modules.rddb.service.DbContactVoterService;
import com.ydool.boot.modules.rddb.wrapper.CwhContactVoterWrapper;
import com.ydool.boot.modules.rddb.wrapper.DbContactVoterWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Controller
@RequestMapping("/api/db_contact_voter")
@Api(value = "A代表联系选民", tags = "A代表联系选民")
public class ApiDbContactVoterController extends ApiBaseController {
@Autowired
private DbContactVoterService dbContactVoterService;
@Autowired
private DbContactVoterCommentService dbContactVoterCommentService;
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "type", value = "public公告栏underWay进行中"),
}
)
@DynamicResponseParameters(properties = {@DynamicParameter(value = "代表联系选民", name = "data", dataTypeClass =
DbContactVoterDto.class)})
@ApiOperation("代表联系选民列表")
@GetMapping("dbContactVoterCommentPage")
public void dbContactVoterCommentPage(String type) {
LambdaQueryWrapper<DbContactVoter> qw = new LambdaQueryWrapper<DbContactVoter>();
if (!"underWay".equals(type) && !"public".equals(type)) throw new ResultException(Ret.fail("类型不支持"));
if ("underWay".equals(type)) qw.lt(DbContactVoter::getState, DbContactVoter.STATE_PUBLIC);
if ("public".equals(type)) qw.eq(DbContactVoter::getState, DbContactVoter.STATE_PUBLIC);
IPage<DbContactVoter> paged = dbContactVoterService.page(new Page<>(getPageNum(),
getPageSize()), qw.orderByDesc(DbContactVoter::getCreatedAt));
render(Ret.ok().paged(DbContactVoterWrapper.build().pageVO(paged)));
}
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "id", value = "代表联系选民id"),
}
)
@DynamicResponseParameters(properties = {@DynamicParameter(value = "代表联系选民", name = "data", dataTypeClass =
DbContactVoterDto.class)})
@ApiOperation("代表联系选民详情")
@GetMapping("dbContactVoterCommentPage")
public void dbContactVoterDetail(String id) {
DbContactVoter dbContactVoter = dbContactVoterService.getById(id);
Assert.notNull(dbContactVoter, "未找到该记录");
render(Ret.ok().data(DbContactVoterWrapper.build().entityVO(dbContactVoter)));
}
@ApiOperation("活动准备")
@PostMapping("state/intend")
@ResponseBody
public void stateIntend(@Validated @RequestBody IntendRequest request){
Ret ret = dbContactVoterService.stateIntend(request, getApiUser());
render(ret);
}
@ApiOperation("活动签到")
@PostMapping("state/sign")
@ResponseBody
public void stateSign(@Validated @RequestBody SignRequest request){
Ret ret = dbContactVoterService.stateSign(request, getApiUser());
render(ret);
}
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "代表联系选民id"),
})
@ApiOperation("结束签到")
@PutMapping("end/sign")
@ResponseBody
public void endSign(String id){
Ret ret = dbContactVoterService.endSign(id, getApiUser());
render(ret);
}
@ApiOperation("活动记录")
@PostMapping("state/record")
@ResponseBody
public void stateRecord(@Validated @RequestBody RecordRequest request){
Ret ret = dbContactVoterService.stateRecord(request, getApiUser());
render(ret);
}
@ApiOperation("建议办理")
@GetMapping("state/transact")
@ResponseBody
public void stateTransact(@Validated @RequestBody TransactRequest request){
Ret ret = dbContactVoterService.stateTransact(request, getApiUser());
render(ret);
}
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "代表联系选民id"),
})
@ApiOperation("删除")
@DeleteMapping("deleteDbContactVoter")
public void deleteDbContactVoter(String id) {
DbContactVoter dbContactVoter = dbContactVoterService.getById(id);
Assert.notNull(dbContactVoter, "未找到该记录");
render(!dbContactVoterService.removeById(id)? Ret.fail("删除失败") : Ret.ok().msg("删除成功"));
}
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "id", value = "常委会联系选民id"),
@ApiImplicitParam(name = "type", value = "环节 1-5"),
}
)
@DynamicResponseParameters(properties = {@DynamicParameter(value = "评论", name = "data", dataTypeClass =
DbContactVoterComment.class)})
@ApiOperation("评论列表")
@GetMapping("dbContactVoterCommentPage")
public void dbContactVoterCommentPage(String id, Integer type) {
LambdaQueryWrapper<DbContactVoterComment> qw = new LambdaQueryWrapper<DbContactVoterComment>();
qw.eq(DbContactVoterComment::getContactId, id)
.eq(ObjectUtil.isNotNull(type), DbContactVoterComment::getType, type)
.orderByDesc(DbContactVoterComment::getCreatedAt);
Page<DbContactVoterComment> paged = dbContactVoterCommentService.page(new Page<>(getPageNum(),
getPageSize()), qw);
render(Ret.ok().paged(paged));
}
@ApiOperation("评论")
@PostMapping("dbContactVoterCommentComment")
public void dbContactVoterCommentComment(@Validated @RequestBody ContactCommentRequest commentRequest) {
Ret ret = dbContactVoterCommentService.comment(commentRequest, getApiUser());
render(ret);
}
}

View File

@ -39,4 +39,12 @@ public class Const {
* 常委会领导
*/
public static final String TYPE_CWHLD = "cwhld";
/**
* 签到用户
*/
public static final String TYPE_SIGN = "sign";
/**
* 参会人员
*/
public static final String JOIN = "join";
}

View File

@ -0,0 +1,66 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* <p>
* 常委会联系选民
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_cwh_contact_voter")
@ApiModel(value = "CwhContactVoter对象", description = "常委会联系选民")
public class CwhContactVoter extends BaseEntity {
private static final long serialVersionUID = 1L;
public static Integer STATE_INTEND = 1;
public static Integer STATE_SIGN = 2;
public static Integer STATE_RECORD = 3;
public static Integer STATE_TRANSACT = 4;
public static Integer STATE_PUBLIC = 5;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "活动名称")
private String activityName;
@ApiModelProperty(value = "活动主题")
private String activityTitle;
@ApiModelProperty(value = "活动地点")
private String activityPlace;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "计划时间")
private Date planAt;
@ApiModelProperty(value = "会议记录")
private String meetingRecord;
@ApiModelProperty(value = "办理反馈")
private String feedback;
@ApiModelProperty(value = "环节")
private Integer state;
}

View File

@ -0,0 +1,58 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 常委会联系选民 附件
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_cwh_contact_voter_attachment")
@ApiModel(value = "CwhContactVoterAttachment对象", description = "常委会联系选民 附件")
public class CwhContactVoterAttachment extends BaseEntity {
private static final long serialVersionUID = 1L;
public static String TYPE_CONFERENCE_INFORMATION = "information";
public static String TYPE_CONFERENCE_PHOTO = "photo";
public static String TYPE_CONFERENCE_OTHER = "other";
public static String TYPE_CONFERENCE_ADVICE = "advice";
public static String TYPE_CONFERENCE_MATERIAL = "material";
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "附件类型")
private String type;
@ApiModelProperty(value = "常委会联系选民 id")
private String contactId;
@ApiModelProperty(value = "附件名")
private String title;
@ApiModelProperty(value = "附件路径")
private String attachment;
@ApiModelProperty(value = "文件大小")
private String size;
@ApiModelProperty(value = "会议id")
private String conferenceId;
@ApiModelProperty(value = "会议名称")
private String conferenceName;
}

View File

@ -0,0 +1,45 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 常委会联系选民 评论
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_cwh_contact_voter_comment")
@ApiModel(value="CwhContactVoterComment对象", description="常委会联系选民 评论")
public class CwhContactVoterComment extends BaseEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "类型 (与常委会联系选民环节相对应)")
private Integer type;
@ApiModelProperty(value = "常委会联系选民 id")
private String contactId;
@ApiModelProperty(value = "人员id")
private String userId;
@ApiModelProperty(value = "人员id")
private String userName;
@ApiModelProperty(value = "内容")
private String content;
}

View File

@ -0,0 +1,45 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 常委会联系选民 建议待送
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_cwh_contact_voter_message")
@ApiModel(value="CwhContactVoterMessage对象", description="常委会联系选民 建议待送")
public class CwhContactVoterMessage extends BaseEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "常委会联系选民id")
private String contactId;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "提送人")
private String userName;
@ApiModelProperty(value = "联系电话")
private String telephone;
@ApiModelProperty(value = "部门")
private String dept;
}

View File

@ -0,0 +1,42 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 常委会联系选民 人员
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_cwh_contact_voter_user")
@ApiModel(value="CwhContactVoterUser对象", description="常委会联系选民 人员")
public class CwhContactVoterUser extends BaseEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "常委会联系选民 id")
private String contactId;
@ApiModelProperty(value = "人员id")
private String userId;
@ApiModelProperty(value = "身份")
private String identity;
@ApiModelProperty(value = "用户姓名")
private String userName;
}

View File

@ -0,0 +1,68 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* <p>
* 代表联系选民
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_db_contact_voter")
@ApiModel(value = "DbContactVoter对象", description = "代表联系选民")
public class DbContactVoter extends BaseEntity {
private static final long serialVersionUID = 1L;
public static Integer STATE_INTEND = 1;
public static Integer STATE_SIGN = 2;
public static Integer STATE_RECORD = 3;
public static Integer STATE_TRANSACT = 4;
public static Integer STATE_PUBLIC = 5;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "活动名称")
private String activityName;
@ApiModelProperty(value = "活动主题")
private String activityTitle;
@ApiModelProperty(value = "活动地点")
private String activityPlace;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "计划时间")
private Date planAt;
@ApiModelProperty(value = "会议记录")
private String meetingRecord;
@ApiModelProperty(value = "办理反馈")
private String feedback;
@ApiModelProperty(value = "环节")
private Integer state;
}

View File

@ -0,0 +1,57 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 代表联系选民 附件
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_db_contact_voter_attachment")
@ApiModel(value = "DbContactVoterAttachment对象", description = "代表联系选民 附件")
public class DbContactVoterAttachment extends BaseEntity {
private static final long serialVersionUID = 1L;
public static String TYPE_CONFERENCE_INFORMATION = "information";
public static String TYPE_CONFERENCE_PHOTO = "photo";
public static String TYPE_CONFERENCE_OTHER = "other";
public static String TYPE_CONFERENCE_ADVICE = "advice";
public static String TYPE_CONFERENCE_MATERIAL = "material";
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "附件类型")
private String type;
@ApiModelProperty(value = "代表联系选民 id")
private String contactId;
@ApiModelProperty(value = "附件名")
private String title;
@ApiModelProperty(value = "附件路径")
private String attachment;
@ApiModelProperty(value = "文件大小")
private String size;
@ApiModelProperty(value = "会议id")
private String conferenceId;
@ApiModelProperty(value = "会议名称")
private String conferenceName;
}

View File

@ -0,0 +1,45 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 代表联系选民 评论
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_db_contact_voter_comment")
@ApiModel(value="DbContactVoterComment对象", description="代表联系选民 评论")
public class DbContactVoterComment extends BaseEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "类型 (与代表联系选民环节相对应)")
private Integer type;
@ApiModelProperty(value = "代表联系选民 id")
private String contactId;
@ApiModelProperty(value = "人员id")
private String userId;
@ApiModelProperty(value = "人员id")
private String userName;
@ApiModelProperty(value = "内容")
private String content;
}

View File

@ -0,0 +1,45 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 代表联系选民 建议待送
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_db_contact_voter_message")
@ApiModel(value="DbContactVoterMessage对象", description="代表联系选民 建议待送")
public class DbContactVoterMessage extends BaseEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "代表联系选民 id")
private String contactId;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "提送人")
private String userName;
@ApiModelProperty(value = "联系电话")
private String telephone;
@ApiModelProperty(value = "部门")
private String dept;
}

View File

@ -0,0 +1,42 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 代表联系选民 人员
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_db_contact_voter_user")
@ApiModel(value="DbContactVoterUser对象", description="代表联系选民 人员")
public class DbContactVoterUser extends BaseEntity{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "创建者")
private String createdId;
@ApiModelProperty(value = "更新者")
private String updatedId;
@ApiModelProperty(value = "代表联系选民 id")
private String contactId;
@ApiModelProperty(value = "人员id")
private String userId;
@ApiModelProperty(value = "身份")
private String identity;
@ApiModelProperty(value = "用户姓名")
private String userName;
}

View File

@ -0,0 +1,44 @@
package com.ydool.boot.modules.rddb.entity.dto;
import com.ydool.boot.modules.rddb.entity.CwhContactVoter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterAttachment;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterMessage;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterUser;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.AttachmentRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class CwhContactVoterDto extends CwhContactVoter {
@ApiModelProperty(value = "常委会领导")
private List<CwhContactVoterUser> cwhUsers;
@ApiModelProperty(value = "选民")
private List<CwhContactVoterUser> voterUsers;
@ApiModelProperty(value = "参会人员")
private List<CwhContactVoterUser> joinUsers;
@ApiModelProperty(value = "签到用户")
private List<CwhContactVoterUser> signUsers;
@ApiModelProperty(value = "相关资料")
private List<CwhContactVoterAttachment> informationList;
@ApiModelProperty(value = "会议图片")
private List<CwhContactVoterAttachment> photoList;
@ApiModelProperty(value = "其他资料")
private List<CwhContactVoterAttachment> otherList;
@ApiModelProperty(value = "建议汇总")
private List<CwhContactVoterAttachment> adviceList;
@ApiModelProperty(value = "相关材料")
private List<CwhContactVoterAttachment> materialList;
@ApiModelProperty(value = "建议汇总")
private List<CwhContactVoterMessage> messages;
}

View File

@ -0,0 +1,40 @@
package com.ydool.boot.modules.rddb.entity.dto;
import com.ydool.boot.modules.rddb.entity.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class DbContactVoterDto extends DbContactVoter {
@ApiModelProperty(value = "常委会领导")
private List<DbContactVoterUser> cwhUsers;
@ApiModelProperty(value = "选民")
private List<DbContactVoterUser> voterUsers;
@ApiModelProperty(value = "参会人员")
private List<DbContactVoterUser> joinUsers;
@ApiModelProperty(value = "签到用户")
private List<DbContactVoterUser> signUsers;
@ApiModelProperty(value = "相关资料")
private List<DbContactVoterAttachment> informationList;
@ApiModelProperty(value = "会议图片")
private List<DbContactVoterAttachment> photoList;
@ApiModelProperty(value = "其他资料")
private List<DbContactVoterAttachment> otherList;
@ApiModelProperty(value = "建议汇总")
private List<DbContactVoterAttachment> adviceList;
@ApiModelProperty(value = "相关材料")
private List<DbContactVoterAttachment> materialList;
@ApiModelProperty(value = "建议汇总")
private List<DbContactVoterMessage> messages;
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.entity.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContactCommentRequest {
@ApiModelProperty(value = "流程 id", required = true)
private String contactId;
@ApiModelProperty(value = "评论内容", required = true)
private String content;
@ApiModelProperty(value = "环节", required = true)
private int type;
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AttachmentRequest {
@ApiModelProperty(value = "附件名 英文逗号间隔")
private String attachmentName;
@ApiModelProperty(value = "附件路径 英文逗号间隔")
private String attachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
private String attachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
private String attachmentConferenceName;
}

View File

@ -0,0 +1,31 @@
package com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MessageRequest {
/**
* 内容
*/
@ApiModelProperty(value = "内容")
private String content;
/**
* 提送人
*/
@ApiModelProperty(value = "提送人")
private String userName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String telephone;
/**
* 部门
*/
@ApiModelProperty(value = "部门")
private String dept;
}

View File

@ -0,0 +1,40 @@
package com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.AttachmentRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
@Data
public class IntendRequest {
@ApiModelProperty(value = "活动名称")
private String activityName;
@ApiModelProperty(value = "活动主题")
private String activityTitle;
@ApiModelProperty(value = "活动地点")
private String activityPlace;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "计划时间")
private Date planAt;
@ApiModelProperty(value = "常委会领导")
private List<String> cwhUsers;
@ApiModelProperty(value = "选民")
private List<String> voterUsers;
@ApiModelProperty(value = "相关资料")
private List<AttachmentRequest> informationList;
}

View File

@ -0,0 +1,25 @@
package com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.AttachmentRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class RecordRequest {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "参会人员")
private List<String> joinUsers;
@ApiModelProperty(value = "会议记录")
private String meetingRecord;
@ApiModelProperty(value = "会议图片")
private List<AttachmentRequest> photoList;
@ApiModelProperty(value = "其他资料")
private List<AttachmentRequest> otherList;
}

View File

@ -0,0 +1,15 @@
package com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class SignRequest {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "签到用户")
private List<String> signUsers;
}

View File

@ -0,0 +1,26 @@
package com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.AttachmentRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.MessageRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class TransactRequest {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "建议代送")
private List<MessageRequest> messages;
@ApiModelProperty(value = "办理反馈")
private String feedback;
@ApiModelProperty(value = "建议汇总")
private List<AttachmentRequest> adviceList;
@ApiModelProperty(value = "相关材料")
private List<AttachmentRequest> materialList;
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.entity.request.db_contact_voter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AttachmentRequest {
@ApiModelProperty(value = "附件名 英文逗号间隔")
private String attachmentName;
@ApiModelProperty(value = "附件路径 英文逗号间隔")
private String attachmentPath;
@ApiModelProperty(value = "附件关联会议id 英文逗号间隔")
private String attachmentConferenceId;
@ApiModelProperty(value = "附件关联会议名称 英文逗号间隔")
private String attachmentConferenceName;
}

View File

@ -0,0 +1,31 @@
package com.ydool.boot.modules.rddb.entity.request.db_contact_voter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MessageRequest {
/**
* 内容
*/
@ApiModelProperty(value = "内容")
private String content;
/**
* 提送人
*/
@ApiModelProperty(value = "提送人")
private String userName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String telephone;
/**
* 部门
*/
@ApiModelProperty(value = "部门")
private String dept;
}

View File

@ -0,0 +1,42 @@
package com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.AttachmentRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
@Data
public class IntendRequest {
@ApiModelProperty(value = "活动名称")
private String activityName;
@ApiModelProperty(value = "活动主题")
private String activityTitle;
@ApiModelProperty(value = "活动地点")
private String activityPlace;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "计划时间")
private Date planAt;
@ApiModelProperty(value = "常委会领导")
private List<String> cwhUsers;
@ApiModelProperty(value = "选民")
private List<String> voterUsers;
@ApiModelProperty(value = "相关资料")
private List<AttachmentRequest> informationList;
}

View File

@ -0,0 +1,25 @@
package com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.AttachmentRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class RecordRequest {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "参会人员")
private List<String> joinUsers;
@ApiModelProperty(value = "会议记录")
private String meetingRecord;
@ApiModelProperty(value = "会议图片")
private List<AttachmentRequest> photoList;
@ApiModelProperty(value = "其他资料")
private List<AttachmentRequest> otherList;
}

View File

@ -0,0 +1,15 @@
package com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class SignRequest {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "签到用户")
private List<String> signUsers;
}

View File

@ -0,0 +1,26 @@
package com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.AttachmentRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.MessageRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class TransactRequest {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "建议代送")
private List<MessageRequest> messages;
@ApiModelProperty(value = "办理反馈")
private String feedback;
@ApiModelProperty(value = "建议汇总")
private List<AttachmentRequest> adviceList;
@ApiModelProperty(value = "相关材料")
private List<AttachmentRequest> materialList;
}

View File

@ -20,7 +20,7 @@ public class MyGenerator {
public static void main(String[] args) {
//表名
String tableName = "t_suggestion_comment ";
String tableName = "t_db_contact_voter_user";
//表前缀
String tablePrefix = "t_";
@ -39,6 +39,8 @@ public class MyGenerator {
//是否覆盖
gc.setFileOverride(false);
gc.setDateType(DateType.ONLY_DATE);
//带swagger注解
gc.setSwagger2(true);
//实现类不要Impl后缀
gc.setServiceImplName("%sService");
mpg.setGlobalConfig(gc);
@ -61,6 +63,7 @@ public class MyGenerator {
pc.setServiceImpl("service");
pc.setService("service.inter");
pc.setController("web");
//带swagger注解
mpg.setPackageInfo(pc);
//策略配置

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterAttachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 常委会联系选民 附件 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface CwhContactVoterAttachmentMapper extends BaseMapper<CwhContactVoterAttachment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 常委会联系选民 评论 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface CwhContactVoterCommentMapper extends BaseMapper<CwhContactVoterComment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.CwhContactVoter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 常委会联系选民 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface CwhContactVoterMapper extends BaseMapper<CwhContactVoter> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 常委会联系选民 建议待送 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface CwhContactVoterMessageMapper extends BaseMapper<CwhContactVoterMessage> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 常委会联系选民 人员 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface CwhContactVoterUserMapper extends BaseMapper<CwhContactVoterUser> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.DbContactVoterAttachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 代表联系选民 附件 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface DbContactVoterAttachmentMapper extends BaseMapper<DbContactVoterAttachment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.DbContactVoterComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 代表联系选民 评论 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface DbContactVoterCommentMapper extends BaseMapper<DbContactVoterComment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.DbContactVoter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 代表联系选民 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface DbContactVoterMapper extends BaseMapper<DbContactVoter> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.DbContactVoterMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 代表联系选民 建议待送 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface DbContactVoterMessageMapper extends BaseMapper<DbContactVoterMessage> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.mapper;
import com.ydool.boot.modules.rddb.entity.DbContactVoterUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 代表联系选民 人员 Mapper 接口
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface DbContactVoterUserMapper extends BaseMapper<DbContactVoterUser> {
}

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.CwhContactVoterAttachmentMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.CwhContactVoterCommentMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.CwhContactVoterMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.CwhContactVoterMessageMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.CwhContactVoterUserMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.DbContactVoterAttachmentMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.DbContactVoterCommentMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.DbContactVoterMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.DbContactVoterMessageMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.ydool.boot.modules.rddb.mapper.DbContactVoterUserMapper">
</mapper>

View File

@ -0,0 +1,20 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterAttachment;
import com.ydool.boot.modules.rddb.mapper.CwhContactVoterAttachmentMapper;
import com.ydool.boot.modules.rddb.service.inter.ICwhContactVoterAttachmentService;
import com.ydool.boot.core.service.BaseService;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系选民 附件 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class CwhContactVoterAttachmentService extends BaseService<CwhContactVoterAttachmentMapper, CwhContactVoterAttachment> implements ICwhContactVoterAttachmentService {
}

View File

@ -0,0 +1,40 @@
package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.modules.rddb.entity.CwhContactVoter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterComment;
import com.ydool.boot.modules.rddb.entity.request.ContactCommentRequest;
import com.ydool.boot.modules.rddb.mapper.CwhContactVoterCommentMapper;
import com.ydool.boot.modules.rddb.service.inter.ICwhContactVoterCommentService;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.sys.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系选民 评论 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class CwhContactVoterCommentService extends BaseService<CwhContactVoterCommentMapper, CwhContactVoterComment> implements ICwhContactVoterCommentService {
@Autowired
private CwhContactVoterService cwhContactVoterService;
public Ret comment(ContactCommentRequest commentRequest, User loginUser) {
CwhContactVoter cwhContactVoter = cwhContactVoterService.getById(commentRequest.getContactId());
Assert.notNull(cwhContactVoter, "未找到该记录");
CwhContactVoterComment cwhContactVoterComment = BeanUtil.copyProperties(commentRequest,
CwhContactVoterComment.class);
cwhContactVoterComment.setCreatedId(loginUser.getId());
cwhContactVoterComment.setUserId(loginUser.getId());
cwhContactVoterComment.setUserName(loginUser.getUserName());
boolean flag = saveOrUpdate(cwhContactVoterComment);
return !flag ? Ret.fail("评论失败") : Ret.ok().msg("评论成功");
}
}

View File

@ -0,0 +1,20 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterMessage;
import com.ydool.boot.modules.rddb.mapper.CwhContactVoterMessageMapper;
import com.ydool.boot.modules.rddb.service.inter.ICwhContactVoterMessageService;
import com.ydool.boot.core.service.BaseService;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系选民 建议待送 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class CwhContactVoterMessageService extends BaseService<CwhContactVoterMessageMapper, CwhContactVoterMessage> implements ICwhContactVoterMessageService {
}

View File

@ -0,0 +1,220 @@
package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.exception.ResultException;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.*;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.AttachmentRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.MessageRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.IntendRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.RecordRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.SignRequest;
import com.ydool.boot.modules.rddb.entity.request.cwh_contact_voter.state.TransactRequest;
import com.ydool.boot.modules.rddb.mapper.CwhContactVoterMapper;
import com.ydool.boot.modules.rddb.service.inter.ICwhContactVoterService;
import com.ydool.boot.modules.sys.entity.User;
import com.ydool.boot.modules.sys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 常委会联系选民 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class CwhContactVoterService extends BaseService<CwhContactVoterMapper, CwhContactVoter> implements ICwhContactVoterService {
@Autowired
private CwhContactVoterMessageService cwhContactVoterMessageService;
@Autowired
private CwhContactVoterAttachmentService cwhContactVoterAttachmentService;
@Autowired
private CwhContactVoterUserService cwhContactVoterUserService;
@Autowired
private UserService userService;
@Autowired
private ConferenceAttachmentService conferenceAttachmentService;
public Ret stateIntend(IntendRequest request, User apiUser) {
CwhContactVoter cwhContactVoter = BeanUtil.copyProperties(request, CwhContactVoter.class);
cwhContactVoter.setState(CwhContactVoter.STATE_SIGN);
cwhContactVoter.setCreatedId(apiUser.getId());
cwhContactVoter.setCreatedAt(LocalDateTime.now());
cwhContactVoter.setUpdatedId(apiUser.getId());
cwhContactVoter.setUpdatedAt(LocalDateTime.now());
boolean flag = saveOrUpdate(cwhContactVoter);
if (CollectionUtil.isNotEmpty(request.getInformationList())) {
flag = saveAttachment(request.getInformationList(),
cwhContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_INFORMATION);
}
if (CollectionUtil.isNotEmpty(request.getCwhUsers())) {
flag = saveUser(request.getCwhUsers(), cwhContactVoter.getId(), apiUser, Const.TYPE_CWHLD);
}
if (CollectionUtil.isNotEmpty(request.getVoterUsers())) {
flag = saveUser(request.getVoterUsers(), cwhContactVoter.getId(), apiUser, Const.TYPE_VOTER);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret stateSign(SignRequest request, User apiUser) {
CwhContactVoter cwhContactVoter = getById(request.getId());
Assert.notNull(cwhContactVoter, "未找到该记录");
if (cwhContactVoter.getState() != CwhContactVoter.STATE_SIGN)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(request, cwhContactVoter);
cwhContactVoter.setUpdatedId(apiUser.getId());
cwhContactVoter.setUpdatedAt(LocalDateTime.now());
boolean flag = saveOrUpdate(cwhContactVoter);
if (CollectionUtil.isNotEmpty(request.getSignUsers())) {
flag = saveUser(request.getSignUsers(), cwhContactVoter.getId(), apiUser, Const.TYPE_SIGN);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret endSign(String id, User apiUser) {
CwhContactVoter cwhContactVoter = getById(id);
Assert.notNull(cwhContactVoter, "未找到该记录");
if (cwhContactVoter.getState() != CwhContactVoter.STATE_SIGN)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
cwhContactVoter.setState(CwhContactVoter.STATE_RECORD);
cwhContactVoter.setUpdatedId(apiUser.getId());
cwhContactVoter.setUpdatedAt(LocalDateTime.now());
boolean flag = saveOrUpdate(cwhContactVoter);
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret stateRecord(RecordRequest request, User apiUser) {
CwhContactVoter cwhContactVoter = getById(request.getId());
Assert.notNull(cwhContactVoter, "未找到该记录");
if (cwhContactVoter.getState() != CwhContactVoter.STATE_RECORD)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(request, cwhContactVoter);
cwhContactVoter.setUpdatedId(apiUser.getId());
cwhContactVoter.setUpdatedAt(LocalDateTime.now());
cwhContactVoter.setState(CwhContactVoter.STATE_TRANSACT);
boolean flag = saveOrUpdate(cwhContactVoter);
if (CollectionUtil.isNotEmpty(request.getJoinUsers())) {
flag = saveUser(request.getJoinUsers(), cwhContactVoter.getId(), apiUser, Const.JOIN);
}
if (CollectionUtil.isNotEmpty(request.getPhotoList())) {
flag = saveAttachment(request.getPhotoList(),
cwhContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_PHOTO);
}
if (CollectionUtil.isNotEmpty(request.getOtherList())) {
flag = saveAttachment(request.getOtherList(),
cwhContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_OTHER);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret stateTransact(TransactRequest request, User apiUser) {
CwhContactVoter cwhContactVoter = getById(request.getId());
Assert.notNull(cwhContactVoter, "未找到该记录");
if (cwhContactVoter.getState() != CwhContactVoter.STATE_TRANSACT)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(request, cwhContactVoter);
cwhContactVoter.setUpdatedId(apiUser.getId());
cwhContactVoter.setUpdatedAt(LocalDateTime.now());
cwhContactVoter.setState(CwhContactVoter.STATE_PUBLIC);
boolean flag = saveOrUpdate(cwhContactVoter);
if (CollectionUtil.isNotEmpty(request.getAdviceList())) {
flag = saveAttachment(request.getAdviceList(),
cwhContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_ADVICE);
}
if (CollectionUtil.isNotEmpty(request.getMaterialList())) {
flag = saveAttachment(request.getMaterialList(),
cwhContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_MATERIAL);
}
if (CollectionUtil.isNotEmpty(request.getMessages())) {
flag = saveMessage(request.getMessages(), cwhContactVoter.getId(), apiUser);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
private boolean saveMessage(List<MessageRequest> messages, String id, User apiUser) {
List<CwhContactVoterMessage> cwhContactVoterMessages = new ArrayList<CwhContactVoterMessage>();
messages.forEach(message -> {
CwhContactVoterMessage cwhContactVoterMessage = BeanUtil.copyProperties(message,
CwhContactVoterMessage.class);
cwhContactVoterMessage.setCreatedId(apiUser.getId());
cwhContactVoterMessage.setUpdatedId(apiUser.getId());
cwhContactVoterMessage.setCreatedAt(LocalDateTime.now());
cwhContactVoterMessage.setUpdatedAt(LocalDateTime.now());
cwhContactVoterMessage.setContactId(id);
cwhContactVoterMessages.add(cwhContactVoterMessage);
});
return cwhContactVoterMessageService.saveBatch(cwhContactVoterMessages);
}
private boolean saveUser(List<String> users, String id, User apiUser, String type) {
List<CwhContactVoterUser> cwhContactVoterUsers = new ArrayList<CwhContactVoterUser>();
users.forEach(user -> {
CwhContactVoterUser cwhContactVoterUser = new CwhContactVoterUser();
cwhContactVoterUser.setContactId(id);
cwhContactVoterUser.setCreatedId(apiUser.getId());
cwhContactVoterUser.setUserId(user);
cwhContactVoterUser.setUpdatedId(apiUser.getId());
cwhContactVoterUser.setIdentity(type);
cwhContactVoterUser.setUserName(userService.getById(user).getUserName());
cwhContactVoterUser.setCreatedAt(LocalDateTime.now());
cwhContactVoterUser.setUpdatedAt(LocalDateTime.now());
cwhContactVoterUsers.add(cwhContactVoterUser);
});
return cwhContactVoterUserService.saveBatch(cwhContactVoterUsers);
}
private boolean saveAttachment(List<AttachmentRequest> attachments, String id, User apiUser, String type) {
List<CwhContactVoterAttachment>
cwhContactVoterAttachments = new ArrayList<CwhContactVoterAttachment>();
attachments.forEach(attachment -> {
CwhContactVoterAttachment cwhContactVoterAttachment = new CwhContactVoterAttachment();
cwhContactVoterAttachment.setCreatedId(apiUser.getId());
cwhContactVoterAttachment.setUpdatedId(apiUser.getId());
cwhContactVoterAttachment.setCreatedAt(LocalDateTime.now());
cwhContactVoterAttachment.setUpdatedAt(LocalDateTime.now());
cwhContactVoterAttachment.setContactId(id);
cwhContactVoterAttachment.setType(type);
cwhContactVoterAttachment.setTitle(attachment.getAttachmentName());
cwhContactVoterAttachment.setAttachment(attachment.getAttachmentPath());
cwhContactVoterAttachment.setConferenceId(attachment.getAttachmentConferenceId());
cwhContactVoterAttachment.setConferenceName(attachment.getAttachmentConferenceName());
cwhContactVoterAttachments.add(cwhContactVoterAttachment);
if (StrUtil.isNotBlank(attachment.getAttachmentConferenceId())) {
conferenceAttachmentService.associationMeeting(attachment.getAttachmentConferenceId(),
attachment.getAttachmentPath(),
attachment.getAttachmentName(), "常委会联系选民附件", apiUser.getId());
}
});
return cwhContactVoterAttachmentService.saveBatch(cwhContactVoterAttachments);
}
}

View File

@ -0,0 +1,20 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterUser;
import com.ydool.boot.modules.rddb.mapper.CwhContactVoterUserMapper;
import com.ydool.boot.modules.rddb.service.inter.ICwhContactVoterUserService;
import com.ydool.boot.core.service.BaseService;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系选民 人员 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class CwhContactVoterUserService extends BaseService<CwhContactVoterUserMapper, CwhContactVoterUser> implements ICwhContactVoterUserService {
}

View File

@ -0,0 +1,20 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.modules.rddb.entity.DbContactVoterAttachment;
import com.ydool.boot.modules.rddb.mapper.DbContactVoterAttachmentMapper;
import com.ydool.boot.modules.rddb.service.inter.IDbContactVoterAttachmentService;
import com.ydool.boot.core.service.BaseService;
import org.springframework.stereotype.Service;
/**
* <p>
* 代表联系选民 附件 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class DbContactVoterAttachmentService extends BaseService<DbContactVoterAttachmentMapper, DbContactVoterAttachment> implements IDbContactVoterAttachmentService {
}

View File

@ -0,0 +1,40 @@
package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.DbContactVoter;
import com.ydool.boot.modules.rddb.entity.DbContactVoterComment;
import com.ydool.boot.modules.rddb.entity.request.ContactCommentRequest;
import com.ydool.boot.modules.rddb.mapper.DbContactVoterCommentMapper;
import com.ydool.boot.modules.rddb.service.inter.IDbContactVoterCommentService;
import com.ydool.boot.modules.sys.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 代表联系选民 评论 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class DbContactVoterCommentService extends BaseService<DbContactVoterCommentMapper, DbContactVoterComment> implements IDbContactVoterCommentService {
@Autowired
private DbContactVoterService dbContactVoterService;
public Ret comment(ContactCommentRequest commentRequest, User loginUser) {
DbContactVoter dbContactVoter = dbContactVoterService.getById(commentRequest.getContactId());
Assert.notNull(dbContactVoter, "未找到该记录");
DbContactVoterComment dbContactVoterComment = BeanUtil.copyProperties(commentRequest,
DbContactVoterComment.class);
dbContactVoterComment.setCreatedId(loginUser.getId());
dbContactVoterComment.setUserId(loginUser.getId());
dbContactVoterComment.setUserName(loginUser.getUserName());
boolean flag = saveOrUpdate(dbContactVoterComment);
return !flag ? Ret.fail("评论失败") : Ret.ok().msg("评论成功");
}
}

View File

@ -0,0 +1,20 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.modules.rddb.entity.DbContactVoterMessage;
import com.ydool.boot.modules.rddb.mapper.DbContactVoterMessageMapper;
import com.ydool.boot.modules.rddb.service.inter.IDbContactVoterMessageService;
import com.ydool.boot.core.service.BaseService;
import org.springframework.stereotype.Service;
/**
* <p>
* 代表联系选民 建议待送 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class DbContactVoterMessageService extends BaseService<DbContactVoterMessageMapper, DbContactVoterMessage> implements IDbContactVoterMessageService {
}

View File

@ -0,0 +1,219 @@
package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.exception.ResultException;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.*;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.AttachmentRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.MessageRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.IntendRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.RecordRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.SignRequest;
import com.ydool.boot.modules.rddb.entity.request.db_contact_voter.state.TransactRequest;
import com.ydool.boot.modules.rddb.mapper.DbContactVoterMapper;
import com.ydool.boot.modules.rddb.service.inter.IDbContactVoterService;
import com.ydool.boot.modules.sys.entity.User;
import com.ydool.boot.modules.sys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 代表联系选民 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class DbContactVoterService extends BaseService<DbContactVoterMapper, DbContactVoter> implements IDbContactVoterService {
@Autowired
private DbContactVoterMessageService dbContactVoterMessageService;
@Autowired
private DbContactVoterAttachmentService dbContactVoterAttachmentService;
@Autowired
private DbContactVoterUserService dbContactVoterUserService;
@Autowired
private UserService userService;
@Autowired
private ConferenceAttachmentService conferenceAttachmentService;
public Ret stateIntend(IntendRequest request, User apiUser) {
DbContactVoter dbContactVoter = BeanUtil.copyProperties(request, DbContactVoter.class);
dbContactVoter.setState(CwhContactVoter.STATE_SIGN);
dbContactVoter.setCreatedId(apiUser.getId());
dbContactVoter.setCreatedAt(LocalDateTime.now());
dbContactVoter.setUpdatedId(apiUser.getId());
dbContactVoter.setUpdatedAt(LocalDateTime.now());
boolean flag = saveOrUpdate(dbContactVoter);
if (CollectionUtil.isNotEmpty(request.getInformationList())) {
flag = saveAttachment(request.getInformationList(),
dbContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_INFORMATION);
}
if (CollectionUtil.isNotEmpty(request.getCwhUsers())) {
flag = saveUser(request.getCwhUsers(), dbContactVoter.getId(), apiUser, Const.TYPE_CWHLD);
}
if (CollectionUtil.isNotEmpty(request.getVoterUsers())) {
flag = saveUser(request.getVoterUsers(), dbContactVoter.getId(), apiUser, Const.TYPE_VOTER);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret stateSign(SignRequest request, User apiUser) {
DbContactVoter dbContactVoter = getById(request.getId());
Assert.notNull(dbContactVoter, "未找到该记录");
if (dbContactVoter.getState() != CwhContactVoter.STATE_SIGN)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(request, dbContactVoter);
dbContactVoter.setUpdatedId(apiUser.getId());
dbContactVoter.setUpdatedAt(LocalDateTime.now());
boolean flag = saveOrUpdate(dbContactVoter);
if (CollectionUtil.isNotEmpty(request.getSignUsers())) {
flag = saveUser(request.getSignUsers(), dbContactVoter.getId(), apiUser, Const.TYPE_SIGN);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret endSign(String id, User apiUser) {
DbContactVoter dbContactVoter = getById(id);
Assert.notNull(dbContactVoter, "未找到该记录");
if (dbContactVoter.getState() != CwhContactVoter.STATE_SIGN)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
dbContactVoter.setState(CwhContactVoter.STATE_RECORD);
dbContactVoter.setUpdatedId(apiUser.getId());
dbContactVoter.setUpdatedAt(LocalDateTime.now());
boolean flag = saveOrUpdate(dbContactVoter);
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret stateRecord(RecordRequest request, User apiUser) {
DbContactVoter dbContactVoter = getById(request.getId());
Assert.notNull(dbContactVoter, "未找到该记录");
if (dbContactVoter.getState() != CwhContactVoter.STATE_RECORD)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(request, dbContactVoter);
dbContactVoter.setUpdatedId(apiUser.getId());
dbContactVoter.setUpdatedAt(LocalDateTime.now());
dbContactVoter.setState(CwhContactVoter.STATE_TRANSACT);
boolean flag = saveOrUpdate(dbContactVoter);
if (CollectionUtil.isNotEmpty(request.getJoinUsers())) {
flag = saveUser(request.getJoinUsers(), dbContactVoter.getId(), apiUser, Const.JOIN);
}
if (CollectionUtil.isNotEmpty(request.getPhotoList())) {
flag = saveAttachment(request.getPhotoList(),
dbContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_PHOTO);
}
if (CollectionUtil.isNotEmpty(request.getOtherList())) {
flag = saveAttachment(request.getOtherList(),
dbContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_OTHER);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
public Ret stateTransact(TransactRequest request, User apiUser) {
DbContactVoter dbContactVoter = getById(request.getId());
Assert.notNull(dbContactVoter, "未找到该记录");
if (dbContactVoter.getState() != CwhContactVoter.STATE_TRANSACT)
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(request, dbContactVoter);
dbContactVoter.setUpdatedId(apiUser.getId());
dbContactVoter.setUpdatedAt(LocalDateTime.now());
dbContactVoter.setState(CwhContactVoter.STATE_PUBLIC);
boolean flag = saveOrUpdate(dbContactVoter);
if (CollectionUtil.isNotEmpty(request.getAdviceList())) {
flag = saveAttachment(request.getAdviceList(),
dbContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_ADVICE);
}
if (CollectionUtil.isNotEmpty(request.getMaterialList())) {
flag = saveAttachment(request.getMaterialList(),
dbContactVoter.getId(), apiUser, CwhContactVoterAttachment.TYPE_CONFERENCE_MATERIAL);
}
if (CollectionUtil.isNotEmpty(request.getMessages())) {
flag = saveMessage(request.getMessages(), dbContactVoter.getId(), apiUser);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().msg("操作成功");
}
private boolean saveMessage(List<MessageRequest> messages, String id, User apiUser) {
List<DbContactVoterMessage> dbContactVoterMessages = new ArrayList<DbContactVoterMessage>();
messages.forEach(message -> {
DbContactVoterMessage dbContactVoterMessage = BeanUtil.copyProperties(message,
DbContactVoterMessage.class);
dbContactVoterMessage.setCreatedId(apiUser.getId());
dbContactVoterMessage.setUpdatedId(apiUser.getId());
dbContactVoterMessage.setCreatedAt(LocalDateTime.now());
dbContactVoterMessage.setUpdatedAt(LocalDateTime.now());
dbContactVoterMessage.setContactId(id);
dbContactVoterMessages.add(dbContactVoterMessage);
});
return dbContactVoterMessageService.saveBatch(dbContactVoterMessages);
}
private boolean saveUser(List<String> users, String id, User apiUser, String type) {
List<DbContactVoterUser> dbContactVoterUsers = new ArrayList<DbContactVoterUser>();
users.forEach(user -> {
DbContactVoterUser dbContactVoterUser = new DbContactVoterUser();
dbContactVoterUser.setContactId(id);
dbContactVoterUser.setCreatedId(apiUser.getId());
dbContactVoterUser.setUserId(user);
dbContactVoterUser.setUpdatedId(apiUser.getId());
dbContactVoterUser.setIdentity(type);
dbContactVoterUser.setUserName(userService.getById(user).getUserName());
dbContactVoterUser.setCreatedAt(LocalDateTime.now());
dbContactVoterUser.setUpdatedAt(LocalDateTime.now());
dbContactVoterUsers.add(dbContactVoterUser);
});
return dbContactVoterUserService.saveBatch(dbContactVoterUsers);
}
private boolean saveAttachment(List<AttachmentRequest> attachments, String id, User apiUser, String type) {
List<DbContactVoterAttachment>
dbContactVoterAttachments = new ArrayList<DbContactVoterAttachment>();
attachments.forEach(attachment -> {
DbContactVoterAttachment dbContactVoterAttachment = new DbContactVoterAttachment();
dbContactVoterAttachment.setCreatedId(apiUser.getId());
dbContactVoterAttachment.setUpdatedId(apiUser.getId());
dbContactVoterAttachment.setCreatedAt(LocalDateTime.now());
dbContactVoterAttachment.setUpdatedAt(LocalDateTime.now());
dbContactVoterAttachment.setContactId(id);
dbContactVoterAttachment.setType(type);
dbContactVoterAttachment.setTitle(attachment.getAttachmentName());
dbContactVoterAttachment.setAttachment(attachment.getAttachmentPath());
dbContactVoterAttachment.setConferenceId(attachment.getAttachmentConferenceId());
dbContactVoterAttachment.setConferenceName(attachment.getAttachmentConferenceName());
dbContactVoterAttachments.add(dbContactVoterAttachment);
if (StrUtil.isNotBlank(attachment.getAttachmentConferenceId())) {
conferenceAttachmentService.associationMeeting(attachment.getAttachmentConferenceId(),
attachment.getAttachmentPath(),
attachment.getAttachmentName(), "代表联系选民附件", apiUser.getId());
}
});
return dbContactVoterAttachmentService.saveBatch(dbContactVoterAttachments);
}
}

View File

@ -0,0 +1,20 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.modules.rddb.entity.DbContactVoterUser;
import com.ydool.boot.modules.rddb.mapper.DbContactVoterUserMapper;
import com.ydool.boot.modules.rddb.service.inter.IDbContactVoterUserService;
import com.ydool.boot.core.service.BaseService;
import org.springframework.stereotype.Service;
/**
* <p>
* 代表联系选民 人员 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Service
public class DbContactVoterUserService extends BaseService<DbContactVoterUserMapper, DbContactVoterUser> implements IDbContactVoterUserService {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterAttachment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 常委会联系选民 附件 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface ICwhContactVoterAttachmentService extends IService<CwhContactVoterAttachment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterComment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 常委会联系选民 评论 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface ICwhContactVoterCommentService extends IService<CwhContactVoterComment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterMessage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 常委会联系选民 建议待送 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface ICwhContactVoterMessageService extends IService<CwhContactVoterMessage> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoter;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 常委会联系选民 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface ICwhContactVoterService extends IService<CwhContactVoter> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.CwhContactVoterUser;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 常委会联系选民 人员 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface ICwhContactVoterUserService extends IService<CwhContactVoterUser> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.DbContactVoterAttachment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 代表联系选民 附件 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface IDbContactVoterAttachmentService extends IService<DbContactVoterAttachment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.DbContactVoterComment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 代表联系选民 评论 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface IDbContactVoterCommentService extends IService<DbContactVoterComment> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.DbContactVoterMessage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 代表联系选民 建议待送 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface IDbContactVoterMessageService extends IService<DbContactVoterMessage> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.DbContactVoter;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 代表联系选民 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface IDbContactVoterService extends IService<DbContactVoter> {
}

View File

@ -0,0 +1,16 @@
package com.ydool.boot.modules.rddb.service.inter;
import com.ydool.boot.modules.rddb.entity.DbContactVoterUser;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 代表联系选民 人员 服务类
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
public interface IDbContactVoterUserService extends IService<DbContactVoterUser> {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 常委会联系选民 附件 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/cwhContactVoterAttachment")
public class CwhContactVoterAttachmentController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 常委会联系选民 评论 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/cwhContactVoterComment")
public class CwhContactVoterCommentController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 常委会联系选民 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/cwhContactVoter")
public class CwhContactVoterController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 常委会联系选民 建议待送 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/cwhContactVoterMessage")
public class CwhContactVoterMessageController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 常委会联系选民 人员 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/cwhContactVoterUser")
public class CwhContactVoterUserController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 代表联系选民 附件 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/dbContactVoterAttachment")
public class DbContactVoterAttachmentController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 代表联系选民 评论 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/dbContactVoterComment")
public class DbContactVoterCommentController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 代表联系选民 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/dbContactVoter")
public class DbContactVoterController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 代表联系选民 建议待送 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/dbContactVoterMessage")
public class DbContactVoterMessageController extends BaseController {
}

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import com.ydool.boot.core.web.BaseController;
/**
* <p>
* 代表联系选民 人员 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-11-23
*/
@Controller
@RequestMapping("/rddb/dbContactVoterUser")
public class DbContactVoterUserController extends BaseController {
}

View File

@ -0,0 +1,84 @@
package com.ydool.boot.modules.rddb.wrapper;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ydool.boot.common.utils.SpringUtils;
import com.ydool.boot.core.wrapper.BaseWrapper;
import com.ydool.boot.modules.rddb.entity.*;
import com.ydool.boot.modules.rddb.entity.dto.CwhContactVoterDto;
import com.ydool.boot.modules.rddb.service.CwhContactVoterAttachmentService;
import com.ydool.boot.modules.rddb.service.CwhContactVoterMessageService;
import com.ydool.boot.modules.rddb.service.CwhContactVoterUserService;
import java.util.List;
public class CwhContactVoterWrapper extends BaseWrapper<CwhContactVoter, CwhContactVoterDto> {
public static CwhContactVoterWrapper build() {
return new CwhContactVoterWrapper();
}
@Override
public CwhContactVoterDto entityVO(CwhContactVoter cwhContactVoter) {
CwhContactVoterDto dto = BeanUtil.copyProperties(cwhContactVoter, CwhContactVoterDto.class);
CwhContactVoterUserService cwhContactVoterUserService = SpringUtils.getBean(CwhContactVoterUserService.class);
CwhContactVoterAttachmentService cwhContactVoterAttachmentService =
SpringUtils.getBean(CwhContactVoterAttachmentService.class);
CwhContactVoterMessageService cwhContactVoterMessageService =
SpringUtils.getBean(CwhContactVoterMessageService.class);
List<CwhContactVoterMessage> messages =
cwhContactVoterMessageService.list(new LambdaQueryWrapper<CwhContactVoterMessage>().eq(CwhContactVoterMessage::getContactId, cwhContactVoter.getId()));
dto.setMessages(messages);
List<CwhContactVoterAttachment> informationList =
cwhContactVoterAttachmentService.list(new LambdaQueryWrapper<CwhContactVoterAttachment>().eq(CwhContactVoterAttachment::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterAttachment::getType, CwhContactVoterAttachment.TYPE_CONFERENCE_INFORMATION));
List<CwhContactVoterAttachment> photoList =
cwhContactVoterAttachmentService.list(new LambdaQueryWrapper<CwhContactVoterAttachment>().eq(CwhContactVoterAttachment::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterAttachment::getType, CwhContactVoterAttachment.TYPE_CONFERENCE_PHOTO));
List<CwhContactVoterAttachment> otherList =
cwhContactVoterAttachmentService.list(new LambdaQueryWrapper<CwhContactVoterAttachment>().eq(CwhContactVoterAttachment::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterAttachment::getType, CwhContactVoterAttachment.TYPE_CONFERENCE_OTHER));
List<CwhContactVoterAttachment> adviceList =
cwhContactVoterAttachmentService.list(new LambdaQueryWrapper<CwhContactVoterAttachment>().eq(CwhContactVoterAttachment::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterAttachment::getType, CwhContactVoterAttachment.TYPE_CONFERENCE_ADVICE));
List<CwhContactVoterAttachment> materialList =
cwhContactVoterAttachmentService.list(new LambdaQueryWrapper<CwhContactVoterAttachment>().eq(CwhContactVoterAttachment::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterAttachment::getType, CwhContactVoterAttachment.TYPE_CONFERENCE_MATERIAL));
dto.setInformationList(informationList);
dto.setPhotoList(photoList);
dto.setOtherList(otherList);
dto.setAdviceList(adviceList);
dto.setMaterialList(materialList);
List<CwhContactVoterUser> cwhUsers =
cwhContactVoterUserService.list(new LambdaQueryWrapper<CwhContactVoterUser>().eq(CwhContactVoterUser::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterUser::getIdentity, Const.TYPE_CWHLD));
List<CwhContactVoterUser> voterUsers =
cwhContactVoterUserService.list(new LambdaQueryWrapper<CwhContactVoterUser>().eq(CwhContactVoterUser::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterUser::getIdentity, Const.TYPE_VOTER));
List<CwhContactVoterUser> joinUsers =
cwhContactVoterUserService.list(new LambdaQueryWrapper<CwhContactVoterUser>().eq(CwhContactVoterUser::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterUser::getIdentity, Const.JOIN));
List<CwhContactVoterUser> signUsers =
cwhContactVoterUserService.list(new LambdaQueryWrapper<CwhContactVoterUser>().eq(CwhContactVoterUser::getContactId, cwhContactVoter.getId())
.eq(CwhContactVoterUser::getIdentity, Const.TYPE_SIGN));
dto.setCwhUsers(cwhUsers);
dto.setVoterUsers(voterUsers);
dto.setJoinUsers(joinUsers);
dto.setSignUsers(signUsers);
return dto;
}
}

View File

@ -0,0 +1,82 @@
package com.ydool.boot.modules.rddb.wrapper;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ydool.boot.common.utils.SpringUtils;
import com.ydool.boot.core.wrapper.BaseWrapper;
import com.ydool.boot.modules.rddb.entity.*;
import com.ydool.boot.modules.rddb.entity.dto.CwhContactVoterDto;
import com.ydool.boot.modules.rddb.entity.dto.DbContactVoterDto;
import com.ydool.boot.modules.rddb.service.*;
import java.util.List;
public class DbContactVoterWrapper extends BaseWrapper<DbContactVoter, DbContactVoterDto> {
public static DbContactVoterWrapper build() {
return new DbContactVoterWrapper();
}
@Override
public DbContactVoterDto entityVO(DbContactVoter dbContactVoter) {
DbContactVoterDto dto = BeanUtil.copyProperties(dbContactVoter, DbContactVoterDto.class);
DbContactVoterUserService dbContactVoterUserService = SpringUtils.getBean(DbContactVoterUserService.class);
DbContactVoterAttachmentService dbContactVoterAttachmentService =
SpringUtils.getBean(DbContactVoterAttachmentService.class);
DbContactVoterMessageService dbContactVoterMessageService =
SpringUtils.getBean(DbContactVoterMessageService.class);
List<DbContactVoterMessage> messages =
dbContactVoterMessageService.list(new LambdaQueryWrapper<DbContactVoterMessage>().eq(DbContactVoterMessage::getContactId, dbContactVoter.getId()));
dto.setMessages(messages);
List<DbContactVoterAttachment> informationList =
dbContactVoterAttachmentService.list(new LambdaQueryWrapper<DbContactVoterAttachment>().eq(DbContactVoterAttachment::getContactId, dbContactVoter.getId())
.eq(DbContactVoterAttachment::getType, DbContactVoterAttachment.TYPE_CONFERENCE_INFORMATION));
List<DbContactVoterAttachment> photoList =
dbContactVoterAttachmentService.list(new LambdaQueryWrapper<DbContactVoterAttachment>().eq(DbContactVoterAttachment::getContactId, dbContactVoter.getId())
.eq(DbContactVoterAttachment::getType, DbContactVoterAttachment.TYPE_CONFERENCE_PHOTO));
List<DbContactVoterAttachment> otherList =
dbContactVoterAttachmentService.list(new LambdaQueryWrapper<DbContactVoterAttachment>().eq(DbContactVoterAttachment::getContactId, dbContactVoter.getId())
.eq(DbContactVoterAttachment::getType, DbContactVoterAttachment.TYPE_CONFERENCE_OTHER));
List<DbContactVoterAttachment> adviceList =
dbContactVoterAttachmentService.list(new LambdaQueryWrapper<DbContactVoterAttachment>().eq(DbContactVoterAttachment::getContactId, dbContactVoter.getId())
.eq(DbContactVoterAttachment::getType, DbContactVoterAttachment.TYPE_CONFERENCE_ADVICE));
List<DbContactVoterAttachment> materialList =
dbContactVoterAttachmentService.list(new LambdaQueryWrapper<DbContactVoterAttachment>().eq(DbContactVoterAttachment::getContactId, dbContactVoter.getId())
.eq(DbContactVoterAttachment::getType, DbContactVoterAttachment.TYPE_CONFERENCE_MATERIAL));
dto.setInformationList(informationList);
dto.setPhotoList(photoList);
dto.setOtherList(otherList);
dto.setAdviceList(adviceList);
dto.setMaterialList(materialList);
List<DbContactVoterUser> cwhUsers =
dbContactVoterUserService.list(new LambdaQueryWrapper<DbContactVoterUser>().eq(DbContactVoterUser::getContactId, dbContactVoter.getId())
.eq(DbContactVoterUser::getIdentity, Const.TYPE_CWHLD));
List<DbContactVoterUser> voterUsers =
dbContactVoterUserService.list(new LambdaQueryWrapper<DbContactVoterUser>().eq(DbContactVoterUser::getContactId, dbContactVoter.getId())
.eq(DbContactVoterUser::getIdentity, Const.TYPE_VOTER));
List<DbContactVoterUser> joinUsers =
dbContactVoterUserService.list(new LambdaQueryWrapper<DbContactVoterUser>().eq(DbContactVoterUser::getContactId, dbContactVoter.getId())
.eq(DbContactVoterUser::getIdentity, Const.JOIN));
List<DbContactVoterUser> signUsers =
dbContactVoterUserService.list(new LambdaQueryWrapper<DbContactVoterUser>().eq(DbContactVoterUser::getContactId, dbContactVoter.getId())
.eq(DbContactVoterUser::getIdentity, Const.TYPE_SIGN));
dto.setCwhUsers(cwhUsers);
dto.setVoterUsers(voterUsers);
dto.setJoinUsers(joinUsers);
dto.setSignUsers(signUsers);
return dto;
}
}