常委会联系代表模块

This commit is contained in:
周源 2022-06-14 10:28:11 +08:00
parent c76189a121
commit 48a9c3fd15
231 changed files with 2417 additions and 159 deletions

View File

@ -13,6 +13,8 @@ import com.ydool.boot.common.result.Ret;
import com.ydool.boot.modules.rddb.entity.Appoint;
import com.ydool.boot.modules.rddb.entity.AppointComment;
import com.ydool.boot.modules.rddb.entity.dto.AppointDto;
import com.ydool.boot.modules.rddb.entity.request.CommentRequest;
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
import com.ydool.boot.modules.rddb.entity.request.appoint.*;
import com.ydool.boot.modules.rddb.entity.request.appoint.state.*;
import com.ydool.boot.modules.rddb.service.AppointCommentService;
@ -157,7 +159,7 @@ public class ApiAppointController extends ApiBaseController {
@ApiOperation("打分")
@PostMapping("perform")
@ResponseBody
public void perform(@Validated AppointPerformRequest performRequest) {
public void perform(@Validated ScoreRequest performRequest) {
Ret ret = appointService.perform(performRequest, getApiUser());
render(ret);
}
@ -174,7 +176,7 @@ public class ApiAppointController extends ApiBaseController {
@ApiOperation("评论")
@PostMapping("comment")
@ResponseBody
public void comment(@Validated AppointCommentRequest commentRequest) {
public void comment(@Validated CommentRequest commentRequest) {
Ret ret = appointService.comment(commentRequest, getApiUser());
render(ret);
}

View File

@ -1,5 +1,6 @@
package com.ydool.boot.api.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
@ -21,6 +22,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -130,16 +132,22 @@ public class ApiConferenceController extends ApiBaseController {
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "title", value = "会议名称"),
@ApiImplicitParam(name = "category", value = "附件分类"),
@ApiImplicitParam(name = "type", value = "history 历次会议/near 近期会议"),
@ApiImplicitParam(name = "category", value = "附件分类 1主任会议文件 2常委会会议文件 3其他会议文件 4人代会会议文件 5党组会议文件"),
})
@DynamicResponseParameters(properties = {
@DynamicParameter(name = "data", value = "会议", dataTypeClass = Conference.class)
})
public void conferenceHaveAttachmentList(String title, String category) {
public void conferenceHaveAttachmentList(String title, String category,String type) {
QueryWrapper<Conference> wrapper = getQueryWrapper(title);
//上传文件数>=1
wrapper.ge("attachment_num", 1);
wrapper.eq("category", category);
if(StrUtil.isNotBlank(type)){
if("near".equals(type))wrapper.ge("start_time", LocalDateTime.now());
if("history".equals(type))wrapper.lt("start_time", LocalDateTime.now());
}
Page page = conferenceService.page(new Page(getPageNum(), getPageSize()), wrapper);
page.getRecords().forEach(item -> {
Conference conference = (Conference) item;

View File

@ -0,0 +1,182 @@
package com.ydool.boot.api.controller;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.modules.rddb.entity.ContactDb;
import com.ydool.boot.modules.rddb.entity.ContactDbComment;
import com.ydool.boot.modules.rddb.entity.dto.ContactDbDto;
import com.ydool.boot.modules.rddb.entity.request.CommentRequest;
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
import com.ydool.boot.modules.rddb.entity.request.contactdb.SignRequest;
import com.ydool.boot.modules.rddb.entity.request.contactdb.state.*;
import com.ydool.boot.modules.rddb.service.ContactDbCommentService;
import com.ydool.boot.modules.rddb.service.ContactDbService;
import com.ydool.boot.modules.rddb.wrapper.ContactDbWrapper;
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.*;
/**
* @author zhouyuan
* @date 2022/6/8 15:37
*/
@Controller
@RequestMapping("/api/contact_db")
@Api(value = "A常委会联系代表", tags = "A常委会联系代表")
public class ApiContactDbController extends ApiBaseController {
@Autowired
ContactDbService contactDbService;
@Autowired
ContactDbCommentService contactDbCommentService;
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"),})
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系代表", name = "data", dataTypeClass = ContactDbDto.class)})
@ApiOperation("常委会联系代表列表 (被指定的人与创建人可见)")
@GetMapping
public void contactDbPage() {
QueryWrapper<ContactDb> qw = new QueryWrapper<ContactDb>().and(_qw -> _qw.eq("created_id", getApiUserId()).or().inSql("id", "select contact_db_id from t_contact_db_user where user_id='" + getApiUserId() + "'")).orderByDesc("created_at");
IPage<ContactDb> paged = contactDbService.page(new Page<>(getPageNum(), getPageSize()), qw);
render(Ret.ok().paged(ContactDbWrapper.build().pageVO(paged)));
}
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"),})
@DynamicResponseParameters(properties = {@DynamicParameter(value = "常委会联系代表", name = "data", dataTypeClass = ContactDbDto.class)})
@ApiOperation("已完成的常委会联系代表列表 (所有人可见)")
@GetMapping("public")
public void publicPage() {
QueryWrapper<ContactDb> qw = new QueryWrapper<ContactDb>().ge("state", ContactDb.STATE_EVALUATE).orderByDesc("created_at");
IPage<ContactDb> paged = contactDbService.page(new Page<>(getPageNum(), getPageSize()), qw);
render(Ret.ok().paged(ContactDbWrapper.build().pageVO(paged)));
}
@ApiOperation("详情")
@GetMapping("{id}")
@ResponseBody
@ApiImplicitParam(name = "id", value = "常委会联系代表id")
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
public void contactDbDetail(@PathVariable String id) {
ContactDb contactDb = contactDbService.getById(id);
Assert.notNull(contactDb, "未找到该记录");
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
}
@ApiOperation("评论")
@PostMapping("comment")
@ResponseBody
public void comment(@Validated CommentRequest commentRequest) {
Ret ret = contactDbService.comment(commentRequest, getApiUser());
render(ret);
}
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "当前页"), @ApiImplicitParam(name = "size", value = "显示条数"), @ApiImplicitParam(name = "contactDbId", value = "常委会联系代表id"), @ApiImplicitParam(name = "type", value = "环节 1-5")})
@DynamicResponseParameters(properties = {@DynamicParameter(value = "评论", name = "data", dataTypeClass = ContactDbComment.class)})
@ApiOperation("评论列表")
@GetMapping("comment")
public void commentPage(String contactDbId, Integer type) {
LambdaQueryWrapper<ContactDbComment> qw = new LambdaQueryWrapper<ContactDbComment>().eq(StrUtil.isNotBlank(contactDbId), ContactDbComment::getContactDbId, contactDbId).eq(type != null, ContactDbComment::getType, type).orderByDesc(ContactDbComment::getCreatedAt);
IPage<ContactDbComment> paged = contactDbCommentService.page(new Page<>(getPageNum(), getPageSize()), qw);
render(Ret.ok().paged(paged));
}
@ApiOperation("上传主题环节")
@PostMapping("state/subject")
@ResponseBody
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
public void stateSubjectSave(@Validated ContactDbSubjectRequest contactDbSubjectRequest) {
ContactDb contactDb = contactDbService.stateSubjectSave(contactDbSubjectRequest, getApiUser());
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
}
@ApiOperation("选择常委会和代表环节")
@PostMapping("state/choose")
@ResponseBody
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
public void stateChooseSave(@Validated ContactDbChooseRequest contactDbChooseRequest) {
ContactDb contactDb = contactDbService.stateChooseSave(contactDbChooseRequest, getApiUser());
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
}
@ApiOperation("签到环节")
@PostMapping("state/sign")
@ResponseBody
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
public void stateSignSave(@Validated ContactDbSignRequest contactSignRequest) {
ContactDb contactDb = contactDbService.stateSignSave(contactSignRequest, getApiUser());
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
}
@ApiOperation("签到")
@PostMapping("sign")
@ResponseBody
public void sign(@Validated SignRequest signRequest) {
Ret ret = contactDbService.sign(signRequest, getApiUser());
render(ret);
}
@ApiOperation("签到结束")
@PostMapping("sign/end/{id}")
@ApiImplicitParam(name = "id", value = "常委会联系代表id")
@ResponseBody
public void signEnd(@PathVariable String id) {
Ret ret = contactDbService.signEnd(id, getApiUser());
render(ret);
}
@ApiOperation("会议环节")
@PostMapping("state/conference")
@ResponseBody
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
public void stateConferenceSave(@Validated ContactDbConferenceRequest contactDbConferenceRequest) {
ContactDb contactDb = contactDbService.stateConferenceSave(contactDbConferenceRequest, getApiUser());
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
}
@ApiOperation("测评环节")
@PostMapping("state/evaluate")
@ResponseBody
@DynamicResponseParameters(properties = {@DynamicParameter(name = "data", value = "常委会联系代表", dataTypeClass = ContactDbDto.class)})
public void stateEvaluateSave(@Validated ContactDbEvaluateRequest contactDbEvaluateRequest) {
ContactDb contactDb = contactDbService.stateEvaluateSave(contactDbEvaluateRequest, getApiUser());
render(Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb)));
}
@ApiOperation("打分")
@PostMapping("evaluate")
@ResponseBody
public void evaluate(@Validated ScoreRequest scoreRequest) {
Ret ret = contactDbService.evaluate(scoreRequest, getApiUser());
render(ret);
}
@ApiOperation("打分结束")
@PostMapping("evaluate/end/{id}")
@ApiImplicitParam(name = "id", value = "常委会联系代表id")
@ResponseBody
public void evaluateEnd(@PathVariable String id) {
Ret ret = contactDbService.evaluateEnd(id, getApiUser());
render(ret);
}
@ApiOperation("通知")
@PostMapping("send_msg/{id}")
@ApiImplicitParam(name = "id", value = "常委会联系代表id")
@ResponseBody
public void sendMsg(@PathVariable String id) {
Ret ret = contactDbService.sendMsg(id, getApiUser());
render(ret);
}
}

View File

@ -65,7 +65,7 @@ public class ApiMessageController extends ApiBaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "type", value = "消息类型 不传查全部 1通知文件轮阅 2通知会议 3通知督事 4通知文件审批 5选民建议 6联系人大 7乡镇选民建议 8活动审核 9活动拒绝 10活动通过 11所有人的通知公告;" +
@ApiImplicitParam(name = "type", value = "消息类型 不传查11所有人的通知公告 1通知文件轮阅 2通知会议 3通知督事 4通知文件审批 5选民建议 6联系人大 7乡镇选民建议 8活动审核 9活动拒绝 10活动通过 11所有人的通知公告; 13常委会联系代表模块 " +
"多个用 , 号分开 如 5,6"),
})
@DynamicResponseParameters(properties = {

View File

@ -0,0 +1,172 @@
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.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* <p>
* 常委会联系代表
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_contact_db")
public class ContactDb extends BaseEntity{
private static final long serialVersionUID = 1L;
//当前环节 (上传主题subject:1 选择常委会领导和代表choose:2 签到sign:3 上传会见记录conference:4 办理回复测评evaluate:5)
public static Integer STATE_SUBJECT = 1;
public static Integer STATE_CHOOSE = 2;
public static Integer STATE_SIGN = 3;
public static Integer STATE_CONFERENCE = 4;
public static Integer STATE_EVALUATE= 5;
//结束标记
public static Integer STATE_END = 6;
/**
* 创建者
*/
private String createdId;
/**
* 更新者
*/
private String updatedId;
/**
* 主题名称
*/
@ApiModelProperty(value = "主题名称")
private String subjectName;
/**
* 计划时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "计划时间")
private LocalDateTime subjectPlanAt;
/**
* 提交时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "提交时间")
private LocalDateTime subjectSubmitAt;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String chooseRemark;
/**
* 开始时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "开始时间")
private LocalDateTime signBeginAt;
/**
* 地点
*/
@ApiModelProperty(value = "地点")
private String signAddress;
/**
* 结束时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "结束时间")
private LocalDateTime signEndAt;
/**
* 签到备注
*/
@ApiModelProperty(value = "签到备注")
private String signRemark;
/**
* 转办部门
*/
@ApiModelProperty(value = "转办部门")
private String conferenceTransferDept;
/**
* 会议时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "会议时间")
private LocalDateTime conferenceAt;
/**
* 会议备注
*/
@ApiModelProperty(value = "会议备注")
private String conferenceRemark;
/**
* 办理结果
*/
@ApiModelProperty(value = "办理结果")
private String dealResult;
/**
* 测评时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "测评时间")
private LocalDateTime evaluateAt;
/**
* 测评备注
*/
@ApiModelProperty(value = "测评备注")
private String evaluateRemark;
/**
* 当前环节
*/
@ApiModelProperty(value = "当前环节 1-6")
private Integer state;
}

View File

@ -0,0 +1,65 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 常委会联系代表 附件
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_contact_db_attachment")
@Accessors(chain = true)
public class ContactDbAttachment extends BaseEntity {
private static final long serialVersionUID = 1L;
//会议记录
public static String TYPE_CONFERENCE_RECORD = "record";
//会议图片
public static String TYPE_CONFERENCE_PHOTO = "photo";
/**
* 创建者
*/
private String createdId;
/**
* 更新者
*/
private String updatedId;
/**
* 附件类型
*/
private String type;
/**
* 常委会联系代表 id
*/
private String contactDbId;
/**
* 附件名
*/
private String title;
/**
* 附件路径
*/
private String attachment;
/**
* 文件大小
*/
private String size;
}

View File

@ -0,0 +1,56 @@
package com.ydool.boot.modules.rddb.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.boot.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 常委会联系代表 评论
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_contact_db_comment")
public class ContactDbComment extends BaseEntity{
private static final long serialVersionUID = 1L;
/**
* 创建者
*/
private String createdId;
/**
* 更新者
*/
private String updatedId;
/**
* 类型 (与常委会联系代表环节相对应)
*/
private Integer type;
/**
* 常委会联系代表 id
*/
private String contactDbId;
/**
* 人员id
*/
private String userId;
/**
* 人员id
*/
private String userName;
/**
* 内容
*/
private String content;
}

View File

@ -0,0 +1,85 @@
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 lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* 常委会联系代表 人员
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_contact_db_user")
public class ContactDbUser extends BaseEntity{
private static final long serialVersionUID = 1L;
/**
* 创建者
*/
private String createdId;
/**
* 更新者
*/
private String updatedId;
/**
* 常委会联系代表 id
*/
private String contactDbId;
/**
* 人员id
*/
private String userId;
/**
* 签到图片
*/
private String sign;
/**
* 分数
*/
private BigDecimal score;
/**
* 类型
*/
private Integer type;
/**
* 身份 机关admin/代表rddb
*/
private String identity;
private String userName;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime scoreAt;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime signAt;
}

View File

@ -44,7 +44,10 @@ public class Message extends BaseEntity {
//所有人的通知公告
public static final Integer TYPE_NOTICE = 11;
//通知评议审核
public static final Integer TYPE_REVIEW = 12;
// public static final Integer TYPE_REVIEW = 12;
//通知 常委会联系代表模块 评测操作
public static final Integer TYPE_CONTACT_DB_EVALUATE = 13;
//未读
public static final Integer STATUS_UNREAD = 0;

View File

@ -0,0 +1,21 @@
package com.ydool.boot.modules.rddb.entity.bo;
import com.ydool.boot.modules.rddb.entity.ContactDb;
import lombok.Data;
/**
* @author zhouyuan
* @date 2022/6/6 15:37
*/
@Data
public class ContactDbBo extends ContactDb {
String conferenceRecordAttachmentArrStr;
String conferencePhotoAttachmentArrStr;
String subjectUserIds;
String chooseAdminUserIds;
String chooseDbUserIds;
String signUserIds;
String conferenceUserIds;
String evaluateUserIds;
}

View File

@ -0,0 +1,45 @@
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.math.BigDecimal;
import java.util.List;
/**
* @author zhouyuan
* @date 2022/6/8 17:11
*/
@Data
public class ContactDbDto extends ContactDb {
@ApiModelProperty(value = "会议记录")
List<ContactDbAttachment> conferenceRecordAttachmentList;
@ApiModelProperty(value = "会议图片")
List<ContactDbAttachment> conferencePhotoAttachmentList;
@ApiModelProperty(value = "联络站")
List<ContactDbUser> subjectUserList;
@ApiModelProperty(value = "常委会领导")
List<ContactDbUser> chooseAdminUserList;
@ApiModelProperty(value = "代表")
List<ContactDbUser> chooseDbUserList;
@ApiModelProperty(value = "签到")
List<ContactDbUser> signUserList;
@ApiModelProperty(value = "参会人员")
List<ContactDbUser> conferenceUserList;
@ApiModelProperty(value = "测评人员")
List<ContactDbUser> evaluateUserList;
@ApiModelProperty(value = "平均分")
BigDecimal averageEvaluate;
@ApiModelProperty(value = "当前用户是否是创建人")
Boolean isCreator;
@ApiModelProperty(value = "当前用户是否可以签到")
Boolean isCanSign;
@ApiModelProperty(value = "当前用户是否可以测评")
Boolean isCanEvaluate;
}

View File

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

View File

@ -0,0 +1,17 @@
package com.ydool.boot.modules.rddb.entity.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class ScoreRequest {
@ApiModelProperty(value = "id", required = true)
private String id;
@ApiModelProperty(value = "分数", required = true)
private BigDecimal score;
}

View File

@ -1,18 +0,0 @@
package com.ydool.boot.modules.rddb.entity.request.appoint;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppointCommentRequest {
@ApiModelProperty(value = "任免督职id", required = true)
private String appointId;
@ApiModelProperty(value = "评论内容", required = true)
private String content;
@ApiModelProperty(value = "环节 (1-6)", required = true)
private int type;
}

View File

@ -1,17 +0,0 @@
package com.ydool.boot.modules.rddb.entity.request.appoint;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class AppointPerformRequest {
@ApiModelProperty(value = "任免督职id", required = true)
private String appointId;
@ApiModelProperty(value = "分数 (1-100)", required = true)
private BigDecimal score;
}

View File

@ -0,0 +1,19 @@
package com.ydool.boot.modules.rddb.entity.request.contactdb;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouyuan
* @date 2022/6/9 16:46
*/
@Data
public class SignRequest {
@ApiModelProperty(value = "id", required = true)
private String id;
@ApiModelProperty(value = "签到图", required = true)
private String sign;
}

View File

@ -0,0 +1,28 @@
package com.ydool.boot.modules.rddb.entity.request.contactdb.state;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouyuan
* @date 2022/6/9 14:26
*/
@Data
public class ContactDbChooseRequest {
@ApiModelProperty(value = "id", required = true)
private String id;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String chooseRemark;
@ApiModelProperty(value = "常委会领导用户id 英文逗号间隔")
private String chooseAdminUserIds;
@ApiModelProperty(value = "代表用户id 英文逗号间隔")
private String chooseDbUserIds;
}

View File

@ -0,0 +1,52 @@
package com.ydool.boot.modules.rddb.entity.request.contactdb.state;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* @author zhouyuan
* @date 2022/6/9 14:32
*/
@Data
public class ContactDbConferenceRequest {
@ApiModelProperty(value = "id", required = true)
private String id;
/**
* 转办部门
*/
@ApiModelProperty(value = "转办部门")
private String conferenceTransferDept;
/**
* 会议时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "会议时间")
private LocalDateTime conferenceAt;
/**
* 会议备注
*/
@ApiModelProperty(value = "会议备注")
private String conferenceRemark;
@ApiModelProperty(value = "会议记录附件名 英文逗号间隔")
String conferenceRecordAttachmentName;
@ApiModelProperty(value = "会议记录附件路径 英文逗号间隔")
String conferenceRecordAttachmentPath;
@ApiModelProperty(value = "会议图片附件名 英文逗号间隔")
String conferencePhotoAttachmentName;
@ApiModelProperty(value = "会议图片附件路径 英文逗号间隔")
String conferencePhotoAttachmentPath;
@ApiModelProperty(value = "会议用户id 英文逗号间隔")
String conferenceUserIds;
}

View File

@ -0,0 +1,42 @@
package com.ydool.boot.modules.rddb.entity.request.contactdb.state;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* @author zhouyuan
* @date 2022/6/9 14:36
*/
@Data
public class ContactDbEvaluateRequest {
@ApiModelProperty(value = "id", required = true)
private String id;
/**
* 办理结果
*/
@ApiModelProperty(value = "办理结果")
private String dealResult;
/**
* 测评时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "测评时间")
private LocalDateTime evaluateAt;
/**
* 测评备注
*/
@ApiModelProperty(value = "测评备注")
private String evaluateRemark;
@ApiModelProperty(value = "测评用户id 英文逗号间隔")
String evaluateUserIds;
}

View File

@ -0,0 +1,58 @@
package com.ydool.boot.modules.rddb.entity.request.contactdb.state;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* @author zhouyuan
* @date 2022/6/9 14:28
*/
@Data
public class ContactDbSignRequest {
@ApiModelProperty(value = "id",required = true)
private String id;
/**
* 开始时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "开始时间")
private LocalDateTime signBeginAt;
/**
* 地点
*/
@ApiModelProperty(value = "地点")
private String signAddress;
/**
* 结束时间
*/
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty(value = "结束时间")
private LocalDateTime signEndAt;
/**
* 签到备注
*/
@ApiModelProperty(value = "签到备注")
private String signRemark;
@ApiModelProperty(value = "签到用户id 英文逗号间隔")
private String signUserIds;
}

View File

@ -0,0 +1,42 @@
package com.ydool.boot.modules.rddb.entity.request.contactdb.state;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* @author zhouyuan
* @date 2022/6/9 14:21
*/
@Data
public class ContactDbSubjectRequest {
/**
* 主题名称
*/
@ApiModelProperty(value = "主题名称", required = true)
private String subjectName;
/**
* 计划时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "计划时间")
private LocalDateTime subjectPlanAt;
/**
* 提交时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "提交时间")
private LocalDateTime subjectSubmitAt;
@ApiModelProperty(value = "联络站用户id 英文逗号间隔")
private String subjectUserIds;
}

View File

@ -20,7 +20,7 @@ public class MyGenerator {
public static void main(String[] args) {
//表名
String tableName = "t_appoint_comment";
String tableName = "t_contact_db_attachment";
//表前缀
String tablePrefix = "t_";

View File

@ -1,20 +1,12 @@
package com.ydool.boot.modules.rddb.web;
package com.ydool.boot.modules.rddb.job;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ydool.boot.modules.rddb.entity.Const;
import com.ydool.boot.modules.rddb.entity.UserType;
import com.ydool.boot.modules.rddb.service.UserTypeService;
import com.ydool.boot.modules.sys.entity.User;
import com.ydool.boot.modules.sys.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
/**
* 补全中间表中用户的身份
*

View File

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

View File

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

View File

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

View File

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

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.ContactDbAttachmentMapper">
</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.ContactDbCommentMapper">
</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.ContactDbMapper">
</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.ContactDbUserMapper">
</mapper>

View File

@ -14,8 +14,8 @@ import com.ydool.boot.modules.rddb.entity.AppointAttachment;
import com.ydool.boot.modules.rddb.entity.AppointComment;
import com.ydool.boot.modules.rddb.entity.AppointUser;
import com.ydool.boot.modules.rddb.entity.bo.AppointBo;
import com.ydool.boot.modules.rddb.entity.request.appoint.AppointCommentRequest;
import com.ydool.boot.modules.rddb.entity.request.appoint.AppointPerformRequest;
import com.ydool.boot.modules.rddb.entity.request.CommentRequest;
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
import com.ydool.boot.modules.rddb.entity.request.appoint.AppointVoteRequest;
import com.ydool.boot.modules.rddb.entity.request.appoint.state.*;
import com.ydool.boot.modules.rddb.mapper.AppointMapper;
@ -204,11 +204,11 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
* @param loginUser
* @return
*/
public Ret perform(AppointPerformRequest performRequest, User loginUser) {
Appoint appoint = getById(performRequest.getAppointId());
public Ret perform(ScoreRequest performRequest, User loginUser) {
Appoint appoint = getById(performRequest.getId());
Assert.notNull(appoint, "未找到该记录");
AppointUser appointUser = appointUserService.getOne(new LambdaQueryWrapper<AppointUser>()
.eq(AppointUser::getAppointId, performRequest.getAppointId())
.eq(AppointUser::getAppointId, performRequest.getId())
.eq(AppointUser::getType, Appoint.STATE_PERFORM)
.eq(AppointUser::getUserId, loginUser.getId()));
if (appointUser == null) return Ret.fail("您没有打分的权限");
@ -220,7 +220,7 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
//如果所有人都打完分,自动进入下一环节
int nullCount = appointUserService.count(Wrappers.lambdaQuery(AppointUser.class)
.eq(AppointUser::getAppointId, performRequest.getAppointId())
.eq(AppointUser::getAppointId, performRequest.getId())
.eq(AppointUser::getType, Appoint.STATE_PERFORM)
.isNull(AppointUser::getScore));
if (nullCount == 0) {
@ -240,18 +240,19 @@ public class AppointService extends BaseService<AppointMapper, Appoint> {
return !flag ? Ret.fail("操作失败") : Ret.ok().data(AppointWrapper.build().entityVO(appoint));
}
public Ret comment(AppointCommentRequest commentRequest, User loginUser) {
Appoint appoint = getById(commentRequest.getAppointId());
public Ret comment(CommentRequest commentRequest, User loginUser) {
Appoint appoint = getById(commentRequest.getId());
Assert.notNull(appoint, "未找到该记录");
AppointComment appointComment = BeanUtil.copyProperties(commentRequest, AppointComment.class);
AppointComment appointComment = BeanUtil.copyProperties(commentRequest, AppointComment.class,"id");
appointComment.setAppointId(commentRequest.getId());
appointComment.setCreatedId(loginUser.getId());
appointComment.setUserId(loginUser.getId());
appointComment.setUserName(loginUser.getUserName());
boolean flag = appointCommentService.saveOrUpdate(appointComment);
return !flag ? Ret.fail("操作失败") : Ret.ok().data(AppointWrapper.build().entityVO(appoint));
}
/*公用*/
/*公用*/
/**
* @param appointId
* @param userIds

View File

@ -0,0 +1,19 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.ContactDbAttachment;
import com.ydool.boot.modules.rddb.mapper.ContactDbAttachmentMapper;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系代表 附件 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Service
public class ContactDbAttachmentService extends BaseService<ContactDbAttachmentMapper, ContactDbAttachment> {
}

View File

@ -0,0 +1,19 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.ContactDbComment;
import com.ydool.boot.modules.rddb.mapper.ContactDbCommentMapper;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系代表 评论 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Service
public class ContactDbCommentService extends BaseService<ContactDbCommentMapper, ContactDbComment> {
}

View File

@ -0,0 +1,354 @@
package com.ydool.boot.modules.rddb.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.bo.ContactDbBo;
import com.ydool.boot.modules.rddb.entity.request.CommentRequest;
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
import com.ydool.boot.modules.rddb.entity.request.contactdb.SignRequest;
import com.ydool.boot.modules.rddb.entity.request.contactdb.state.*;
import com.ydool.boot.modules.rddb.mapper.ContactDbMapper;
import com.ydool.boot.modules.rddb.wrapper.ContactDbWrapper;
import com.ydool.boot.modules.sys.entity.User;
import com.ydool.boot.modules.sys.service.UserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 常委会联系代表 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Service
public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
@Autowired
ContactDbUserService contactDbUserService;
@Autowired
ContactDbAttachmentService contactDbAttachmentService;
@Autowired
ContactDbCommentService contactDbCommentService;
@Autowired
UserService userService;
@Autowired
MessageService messageService;
/*后台*/
@Transactional
public boolean del(String id) {
contactDbUserService.remove(new LambdaQueryWrapper<ContactDbUser>().eq(ContactDbUser::getContactDbId, id));
contactDbAttachmentService.remove(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, id));
contactDbCommentService.remove(new LambdaQueryWrapper<ContactDbComment>().eq(ContactDbComment::getContactDbId, id));
return removeById(id);
}
public Ret adminSaveOrUpdate(ContactDbBo contactDbBo, User loginUser) {
ContactDb contactDb = BeanUtil.copyProperties(contactDbBo, ContactDb.class);
if (StrUtil.isNotBlank(contactDb.getId())) {
contactDb.setUpdatedId(loginUser.getId());
} else {
contactDb.setCreatedId(loginUser.getId());
contactDb.setState(ContactDb.STATE_SIGN);
}
saveOrUpdate(contactDb);
contactDbBo.setId(contactDb.getId());
//指定人员
String subjectUserIds = contactDbBo.getSubjectUserIds();
String chooseAdminUserIds = contactDbBo.getChooseAdminUserIds();
String chooseDbUserIds = contactDbBo.getChooseDbUserIds();
String signUserIds = contactDbBo.getSignUserIds();
String conferenceUserIds = contactDbBo.getConferenceUserIds();
String evaluateUserIds = contactDbBo.getEvaluateUserIds();
saveUser(contactDbBo.getId(), subjectUserIds, loginUser, ContactDb.STATE_SUBJECT);
saveUser(contactDbBo.getId(), chooseAdminUserIds, loginUser, ContactDb.STATE_CHOOSE, Const.TYPE_ADMIN);
saveUser(contactDbBo.getId(), chooseDbUserIds, loginUser, ContactDb.STATE_CHOOSE, Const.TYPE_RDDB);
saveUser(contactDbBo.getId(), signUserIds, loginUser, ContactDb.STATE_SIGN);
saveUser(contactDbBo.getId(), conferenceUserIds, loginUser, ContactDb.STATE_CONFERENCE);
saveUser(contactDbBo.getId(), evaluateUserIds, loginUser, ContactDb.STATE_EVALUATE);
//保存附件
saveAttachment(contactDbBo.getId(), contactDbBo.getConferenceRecordAttachmentArrStr(), loginUser, ContactDbAttachment.TYPE_CONFERENCE_RECORD);
saveAttachment(contactDbBo.getId(), contactDbBo.getConferencePhotoAttachmentArrStr(), loginUser, ContactDbAttachment.TYPE_CONFERENCE_PHOTO);
return Ret.ok();
}
/*接口*/
public Ret comment(CommentRequest commentRequest, User loginUser) {
ContactDb contactDb = getById(commentRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
ContactDbComment contactDbComment = BeanUtil.copyProperties(commentRequest, ContactDbComment.class,"id");
contactDbComment.setContactDbId(commentRequest.getId());
contactDbComment.setCreatedId(loginUser.getId());
contactDbComment.setUserId(loginUser.getId());
contactDbComment.setUserName(loginUser.getUserName());
boolean flag = contactDbCommentService.saveOrUpdate(contactDbComment);
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
}
@Transactional
public ContactDb stateSubjectSave(ContactDbSubjectRequest contactDbSubjectRequest, User loginUser) {
ContactDb contactDb = BeanUtil.copyProperties(contactDbSubjectRequest, ContactDb.class);
contactDb.setState(ContactDb.STATE_CHOOSE);
contactDb.setCreatedId(loginUser.getId());
saveOrUpdate(contactDb);
saveUser(contactDb.getId(), contactDbSubjectRequest.getSubjectUserIds(), loginUser, ContactDb.STATE_SUBJECT);
return contactDb;
}
@Transactional
public ContactDb stateChooseSave(ContactDbChooseRequest contactDbChooseRequest, User loginUser) {
ContactDb contactDb = getById(contactDbChooseRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_CHOOSE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactDbChooseRequest, contactDb);
contactDb.setState(ContactDb.STATE_SIGN);
contactDb.setUpdatedId(loginUser.getId());
saveOrUpdate(contactDb);
saveUser(contactDb.getId(), contactDbChooseRequest.getChooseAdminUserIds(), loginUser, ContactDb.STATE_CHOOSE, Const.TYPE_ADMIN);
saveUser(contactDb.getId(), contactDbChooseRequest.getChooseDbUserIds(), loginUser, ContactDb.STATE_CHOOSE, Const.TYPE_RDDB);
return contactDb;
}
@Transactional
public ContactDb stateSignSave(ContactDbSignRequest contactSignRequest, User loginUser) {
ContactDb contactDb = getById(contactSignRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_SIGN != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactSignRequest, contactDb);
contactDb.setUpdatedId(loginUser.getId());
saveOrUpdate(contactDb);
saveUser(contactDb.getId(), contactSignRequest.getSignUserIds(), loginUser, ContactDb.STATE_SIGN);
return contactDb;
}
@Transactional
public ContactDb stateConferenceSave(ContactDbConferenceRequest contactDbConferenceRequest, User loginUser) {
ContactDb contactDb = getById(contactDbConferenceRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_CONFERENCE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactDbConferenceRequest, contactDb);
contactDb.setState(ContactDb.STATE_EVALUATE);
contactDb.setUpdatedId(loginUser.getId());
saveOrUpdate(contactDb);
saveUser(contactDb.getId(), contactDbConferenceRequest.getConferenceUserIds(), loginUser, ContactDb.STATE_CONFERENCE);
saveAttachment(contactDb.getId(), contactDbConferenceRequest.getConferenceRecordAttachmentName(), contactDbConferenceRequest.getConferenceRecordAttachmentPath(), loginUser, ContactDbAttachment.TYPE_CONFERENCE_RECORD);
saveAttachment(contactDb.getId(), contactDbConferenceRequest.getConferencePhotoAttachmentName(), contactDbConferenceRequest.getConferencePhotoAttachmentPath(), loginUser, ContactDbAttachment.TYPE_CONFERENCE_PHOTO);
return contactDb;
}
@Transactional
public ContactDb stateEvaluateSave(ContactDbEvaluateRequest contactDbEvaluateRequest, User loginUser) {
ContactDb contactDb = getById(contactDbEvaluateRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
if (ContactDb.STATE_EVALUATE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
BeanUtil.copyProperties(contactDbEvaluateRequest, contactDb);
contactDb.setUpdatedId(loginUser.getId());
saveOrUpdate(contactDb);
saveUser(contactDb.getId(), contactDbEvaluateRequest.getEvaluateUserIds(), loginUser, ContactDb.STATE_EVALUATE);
return contactDb;
}
public Ret sign(SignRequest signRequest, User loginUser) {
ContactDb contactDb = getById(signRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
ContactDbUser contactDbUser = contactDbUserService.getOne(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_SIGN)
.eq(ContactDbUser::getUserId, loginUser.getId()));
if (contactDbUser == null) return Ret.fail("您没有签到的权限");
if (StrUtil.isNotBlank(contactDbUser.getSign())) return Ret.fail("您已签过到");
if (contactDb.getState() > ContactDb.STATE_SIGN) return Ret.fail("签到已结束,不能操作");
contactDbUser.setSign(signRequest.getSign());
contactDbUser.setSignAt(LocalDateTime.now());
boolean flag = contactDbUserService.saveOrUpdate(contactDbUser);
//自动进入下一环节
int waitCount = contactDbUserService.count(Wrappers.lambdaQuery(ContactDbUser.class).eq(ContactDbUser::getContactDbId, contactDb.getId()).eq(ContactDbUser::getType, ContactDb.STATE_SIGN).isNull(ContactDbUser::getSign));
if (waitCount == 0) {
contactDb.setState(ContactDb.STATE_CONFERENCE);
saveOrUpdate(contactDb);
}
return !flag ? Ret.fail("操作失败") : Ret.ok();
}
public Ret signEnd(String id, User loginUser) {
ContactDb contactDb = getById(id);
Assert.notNull(contactDb, "未找到该记录");
if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
if (ContactDb.STATE_SIGN != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
contactDb.setState(ContactDb.STATE_CONFERENCE);
boolean flag = saveOrUpdate(contactDb);
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
}
public Ret evaluate(ScoreRequest scoreRequest, User loginUser) {
ContactDb contactDb = getById(scoreRequest.getId());
Assert.notNull(contactDb, "未找到该记录");
ContactDbUser contactDbUser = contactDbUserService.getOne(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_EVALUATE)
.eq(ContactDbUser::getUserId, loginUser.getId()));
if (contactDbUser == null) return Ret.fail("您没有该权限");
if (StrUtil.isNotBlank(contactDbUser.getSign())) return Ret.fail("您已操作到");
if (contactDb.getState() > ContactDb.STATE_EVALUATE) return Ret.fail("该环节已结束,不能操作");
contactDbUser.setScore(scoreRequest.getScore());
contactDbUser.setScoreAt(LocalDateTime.now());
boolean flag = contactDbUserService.saveOrUpdate(contactDbUser);
//自动进入下一环节
int waitCount = contactDbUserService.count(Wrappers.lambdaQuery(ContactDbUser.class).eq(ContactDbUser::getContactDbId, contactDb.getId()).eq(ContactDbUser::getType, ContactDb.STATE_EVALUATE).isNull(ContactDbUser::getScore));
if (waitCount == 0) {
contactDb.setState(ContactDb.STATE_END);
saveOrUpdate(contactDb);
}
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
}
public Ret evaluateEnd(String id, User loginUser) {
ContactDb contactDb = getById(id);
Assert.notNull(contactDb, "未找到该记录");
if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
if (ContactDb.STATE_EVALUATE != contactDb.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
contactDb.setState(ContactDb.STATE_END);
boolean flag = saveOrUpdate(contactDb);
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
}
public Ret sendMsg(String id, User loginUser) {
ContactDb contactDb = getById(id);
Assert.notNull(contactDb, "未找到该记录");
if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
List<ContactDbUser> list = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, id)
.eq(ContactDbUser::getType, ContactDb.STATE_EVALUATE)
);
String userIds = list.stream().map(ContactDbUser::getUserId).collect(Collectors.joining(","));
if (StrUtil.isNotBlank(userIds)) sendMsg(contactDb, loginUser, userIds);
//todo 发送短信
return Ret.ok();
}
/*公用*/
private void sendMsg(ContactDb contactDb, User loginUser, String userIds) {
if (StringUtils.isNotBlank(userIds)) {
Arrays.stream(userIds.split(",")).forEach(userId -> {
Message message = new Message();
message.setActionId(contactDb.getId());
message.setTitle("您有一个新的常委会联系代表,请前往查看!");
message.setContent(contactDb.getSubjectName());
message.setType(Message.TYPE_CONTACT_DB_EVALUATE);
message.setCreatedId(loginUser.getId());
message.setStatus(Message.STATUS_UNREAD);
message.setUserId(userId);
messageService.save(message);
});
}
}
/**
* @param contactDbId
* @param userIds
* @param loginUser
* @param type
* @param identity
*/
private void saveUser(String contactDbId, String userIds, User loginUser, Integer type, String identity) {
if (StrUtil.isNotBlank(userIds)) {
List<String> userIdList = Arrays.asList(userIds.split(","));
List<ContactDbUser> userList = new ArrayList<>();
userIdList.forEach(userId -> {
//1.已存在的不管
int count = contactDbUserService.count(new LambdaQueryWrapper<ContactDbUser>().eq(ContactDbUser::getContactDbId, contactDbId).eq(ContactDbUser::getUserId, userId).eq(ContactDbUser::getType, type).eq(StrUtil.isNotBlank(identity), ContactDbUser::getIdentity, identity));
if (count == 0) {
//2.只插入新的
User user = userService.getById(userId);
ContactDbUser item = new ContactDbUser();
item.setUserId(userId);
item.setUserName(user != null ? user.getUserName() : "");
item.setType(type);
item.setContactDbId(contactDbId);
item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now());
if (StrUtil.isNotBlank(identity)) item.setIdentity(identity);
userList.add(item);
}
});
//3.删除本来有而现在没有的
contactDbUserService.remove(new LambdaQueryWrapper<ContactDbUser>().eq(ContactDbUser::getContactDbId, contactDbId).eq(ContactDbUser::getType, type).notIn(ContactDbUser::getUserId, userIdList).eq(StrUtil.isNotBlank(identity), ContactDbUser::getIdentity, identity));
contactDbUserService.saveBatch(userList);
} else {
//4.删除全部
contactDbUserService.remove(new LambdaQueryWrapper<ContactDbUser>().eq(ContactDbUser::getContactDbId, contactDbId).eq(ContactDbUser::getType, type).eq(StrUtil.isNotBlank(identity), ContactDbUser::getIdentity, identity));
}
}
private void saveUser(String contactDbId, String userIds, User loginUser, Integer type) {
saveUser(contactDbId, userIds, loginUser, type, null);
}
/**
* @param contactDbId
* @param attachmentArrStr
* @param loginUser
* @param type
*/
private void saveAttachment(String contactDbId, String attachmentArrStr, User loginUser, String type) {
contactDbAttachmentService.remove(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, contactDbId).eq(ContactDbAttachment::getType, type));
if (StrUtil.isNotBlank(attachmentArrStr)) {
List<ContactDbAttachment> attachmentList = JSONObject.parseArray(attachmentArrStr, ContactDbAttachment.class);
attachmentList.forEach(item -> {
item.setContactDbId(contactDbId);
item.setType(type);
item.setCreatedId(loginUser.getId());
item.setCreatedAt(LocalDateTime.now());
});
contactDbAttachmentService.saveBatch(attachmentList);
}
}
/**
* @param contactDbId
* @param attachmentName
* @param attachmentPath
* @param loginUser
* @param type
*/
private void saveAttachment(String contactDbId, String attachmentName, String attachmentPath, User loginUser, String type) {
contactDbAttachmentService.remove(new LambdaQueryWrapper<ContactDbAttachment>().eq(ContactDbAttachment::getContactDbId, contactDbId).eq(ContactDbAttachment::getType, type));
if (StrUtil.isNotBlank(attachmentName)) {
String[] nameArr = attachmentName.split(",");
String[] pathArr = attachmentPath.split(",");
for (int i = 0; i < nameArr.length; i++) {
ContactDbAttachment contactDbAttachment = new ContactDbAttachment();
contactDbAttachment.setType(type).setContactDbId(contactDbId).setTitle(nameArr[i]).setAttachment(pathArr[i]).setCreatedId(loginUser.getId()).setCreatedAt(LocalDateTime.now());
contactDbAttachmentService.save(contactDbAttachment);
}
}
}
}

View File

@ -0,0 +1,19 @@
package com.ydool.boot.modules.rddb.service;
import com.ydool.boot.core.service.BaseService;
import com.ydool.boot.modules.rddb.entity.ContactDbUser;
import com.ydool.boot.modules.rddb.mapper.ContactDbUserMapper;
import org.springframework.stereotype.Service;
/**
* <p>
* 常委会联系代表 人员 服务实现类
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Service
public class ContactDbUserService extends BaseService<ContactDbUserMapper, ContactDbUser> {
}

View File

@ -44,6 +44,10 @@ public class SyncNameService {
ReviewAuditService reviewAuditService;
@Autowired
ReviewCommentService reviewCommentService;
@Autowired
ContactDbUserService contactDbUserService;
@Autowired
ContactDbCommentService contactDbCommentService;
@Transactional
public void sync(User user) {
@ -94,6 +98,13 @@ public class SyncNameService {
List<ReviewComment> reviewCommentList = reviewCommentService.list(new QueryWrapper<ReviewComment>().eq("user_id", user.getId()));
reviewCommentList.forEach(item -> item.setUserName(user.getUserName()));
reviewCommentService.updateBatchById(reviewCommentList);
List<ContactDbUser> contactDbUserList = contactDbUserService.list(new QueryWrapper<ContactDbUser>().eq("user_id", user.getId()));
contactDbUserList.forEach(item -> item.setUserName(user.getUserName()));
contactDbUserService.updateBatchById(contactDbUserList);
List<ContactDbComment> contactDbCommentList = contactDbCommentService.list(new QueryWrapper<ContactDbComment>().eq("user_id", user.getId()));
contactDbCommentList.forEach(item -> item.setUserName(user.getUserName()));
contactDbCommentService.updateBatchById(contactDbCommentList);
}
}

View File

@ -57,7 +57,7 @@ public class ActivityAuditUserController extends BaseController {
@GetMapping("/to_assign")
public String toAssign(String userIds, Model model) {
model.addAttribute("userIds", userIds);
return "modules/rddb/activity/assign_user.html";
return "modules/rddb/activity/assign.html";
}
/**

View File

@ -49,7 +49,7 @@ public class AuditUserController extends ApiBaseController {
@GetMapping("to_assign")
public String toAssign(String userIds, Model model) {
model.addAttribute("userIds", userIds);
return "modules/rddb/audit/assign_user.html";
return "modules/rddb/audit/assign.html";
}
/**

View File

@ -49,7 +49,7 @@ public class ConferenceUserController extends BaseController {
@GetMapping("to_assign")
public String toAssign(String userIds, Model model) {
model.addAttribute("userIds", userIds);
return "modules/rddb/conference/assign_user.html";
return "modules/rddb/conference/assign.html";
}
/**

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-06-06
*/
@Controller
@RequestMapping("/rddb/contactDbAttachment")
public class ContactDbAttachmentController extends BaseController {
}

View File

@ -0,0 +1,40 @@
package com.ydool.boot.modules.rddb.web;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.web.BaseController;
import com.ydool.boot.modules.rddb.entity.ContactDbComment;
import com.ydool.boot.modules.rddb.service.ContactDbCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* <p>
* 常委会联系代表 评论 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Controller
@RequestMapping("${ydool.path}/rddb/contact_db_comment")
public class ContactDbCommentController extends BaseController {
@Autowired
private ContactDbCommentService contactDbCommentService;
@RequestMapping("list")
@ResponseBody
public void list(String id) {
LambdaQueryWrapper<ContactDbComment> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ContactDbComment::getContactDbId, id);
wrapper.orderByDesc(ContactDbComment::getCreatedAt);
Page page = contactDbCommentService.page(new Page(getPageNum(), getPageSize()), wrapper);
render(Ret.ok().paged(page));
}
}

View File

@ -0,0 +1,112 @@
package com.ydool.boot.modules.rddb.web;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.boot.common.json.JsonMapper;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.auth.PreAuth;
import com.ydool.boot.modules.rddb.entity.ContactDb;
import com.ydool.boot.modules.rddb.entity.ContactDbAttachment;
import com.ydool.boot.modules.rddb.entity.bo.ContactDbBo;
import com.ydool.boot.modules.rddb.service.ContactDbAttachmentService;
import com.ydool.boot.modules.rddb.service.ContactDbService;
import com.ydool.boot.modules.sys.web.BaseAdminController;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
* 常委会联系代表 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Controller
@RequestMapping("${ydool.path}/rddb/contact_db")
public class ContactDbController extends BaseAdminController {
@Autowired
private ContactDbService contactDbService;
@Autowired
private ContactDbAttachmentService contactDbAttachmentService;
@GetMapping
public String index() {
return "modules/rddb/contact_db/index.html";
}
@GetMapping("sign")
public String vote(String id) {
request.setAttribute("id", id);
return "modules/rddb/contact_db/sign.html";
}
@GetMapping("evaluate")
public String perform(String id) {
request.setAttribute("id", id);
return "modules/rddb/contact_db/evaluate.html";
}
@GetMapping("comment")
public String comment(String id) {
request.setAttribute("id", id);
return "modules/rddb/contact_db/comment.html";
}
@PostMapping("list")
@ResponseBody
public void list(ContactDb contactDb) {
QueryWrapper<ContactDb> wrapper = new QueryWrapper<>();
if (StringUtils.isNotBlank(contactDb.getSubjectName()))
wrapper.like("subject_name", contactDb.getSubjectName());
wrapper.orderByDesc("created_at");
Page page = contactDbService.page(new Page(getPageNum(), getPageSize()), wrapper);
render(Ret.ok().paged(page));
}
@PreAuth("rddb:contact_db:form")
@GetMapping("form")
public String form(String id, Model model) throws Exception {
ContactDb contactDb = new ContactDb();
if (ObjectUtil.isNotEmpty(id)) {
contactDb = contactDbService.getById(id);
List<ContactDbAttachment> recordAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
.eq(ContactDbAttachment::getContactDbId, id)
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD));
List<ContactDbAttachment> photoAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
.eq(ContactDbAttachment::getContactDbId, id)
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO));
model.addAttribute("conferenceRecordAttachmentListStr", JsonMapper.getInstance().writeValueAsString(recordAttachmentList));
model.addAttribute("conferencePhotoAttachmentListStr", JsonMapper.getInstance().writeValueAsString(photoAttachmentList));
}
model.addAttribute("contactDb", contactDb);
return "modules/rddb/contact_db/form.html";
}
@PostMapping("save")
@ResponseBody
public void save(@Validated ContactDbBo contactDbBo) {
render(contactDbService.adminSaveOrUpdate(contactDbBo, getLoginUser()));
}
@PostMapping("/delete")
public void delete(String id) {
boolean flag = contactDbService.del(id);
renderJson(!flag ? Ret.fail("操作失败") : Ret.ok());
}
}

View File

@ -0,0 +1,63 @@
package com.ydool.boot.modules.rddb.web;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.web.BaseController;
import com.ydool.boot.modules.rddb.entity.ContactDbUser;
import com.ydool.boot.modules.rddb.service.ContactDbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* <p>
* 常委会联系代表 人员 前端控制器
* </p>
*
* @author zhouyuan
* @since 2022-06-06
*/
@Controller
@RequestMapping("${ydool.path}/rddb/contact_db_user")
public class ContactDbUserController extends BaseController {
@Autowired
ContactDbUserService contactDbUserService;
/**
* @param identity
* @param id
* @param type
*/
@RequestMapping("{identity}/list")
@ResponseBody
public void _list(@PathVariable String identity, String id, String type) {
QueryWrapper<ContactDbUser> wrapper = new QueryWrapper<>();
wrapper.eq("contact_db_id", id);
wrapper.eq("type", type);
wrapper.eq("identity", identity);
wrapper.orderByDesc("created_at");
Page page = contactDbUserService.page(new Page(getPageNum(), getPageSize()), wrapper);
render(Ret.ok().paged(page));
}
/**
* @param id
* @param type
*/
@RequestMapping("list")
@ResponseBody
public void list(String id,String type) {
QueryWrapper<ContactDbUser> wrapper = new QueryWrapper<>();
wrapper.eq("contact_db_id", id);
wrapper.eq("type", type);
wrapper.orderByDesc("created_at");
Page page = contactDbUserService.page(new Page(getPageNum(), getPageSize()), wrapper);
render(Ret.ok().paged(page));
}
}

View File

@ -10,7 +10,6 @@ import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.auth.PreAuth;
import com.ydool.boot.modules.rddb.entity.Office;
import com.ydool.boot.modules.rddb.service.OfficeService;
import com.ydool.boot.modules.rddb.wrapper.OfficeWrapper;
import com.ydool.boot.modules.sys.entity.User;
import com.ydool.boot.modules.sys.service.UserService;
import com.ydool.boot.modules.sys.web.BaseAdminController;
@ -52,10 +51,14 @@ public class OfficeController extends BaseAdminController {
QueryWrapper<Office> wrapper = new QueryWrapper<>();
if (StringUtils.isNotBlank(office.getName())) wrapper.like("name", office.getName());
if (StringUtils.isNotBlank(office.getDuty())) wrapper.like("duty", office.getDuty());
wrapper.like(StrUtil.isNotBlank(office.getPhone()),"AES_DECRYPT(from_base64 (phone),'"+ CodecUtils.KEY +"')",office.getPhone());
wrapper.like(StrUtil.isNotBlank(office.getPhone()), "AES_DECRYPT(from_base64 (phone),'" + CodecUtils.KEY + "')", office.getPhone());
wrapper.orderByDesc("created_at");
Page page = officeService.page(new Page(getPageNum(), getPageSize()), wrapper);
render(Ret.ok().paged(OfficeWrapper.build().pageVO(page)));
page.getRecords().forEach(item -> {
Office of = (Office) item;
of.setPhone(CodecUtils.decrypt(of.getPhone()));
});
render(Ret.ok().paged(page));
}
@PreAuth("rddb:office:form")
@ -64,11 +67,12 @@ public class OfficeController extends BaseAdminController {
Office office = new Office();
if (ObjectUtil.isNotEmpty(id)) {
office = officeService.getById(id);
office.setPhone(CodecUtils.decrypt(office.getPhone()));
} else {
//新增的生日默认1980
office.setBirthday("1980-01");
}
model.addAttribute("office", OfficeWrapper.build().entityVO(office));
model.addAttribute("office", office);
return "modules/rddb/office/form.html";
}
@ -77,7 +81,7 @@ public class OfficeController extends BaseAdminController {
public void save(String id) {
Office office = officeService.getById(id);
User user = userService.getById(office.getUserId());
if(user!=null){
if (user != null) {
user.setOpenId("");
userService.updateById(user);
}

View File

@ -49,7 +49,7 @@ public class ReadFileUserController extends BaseAdminController {
@GetMapping("to_assign")
public String toAssign(String userIds, Model model) {
model.addAttribute("userIds", userIds);
return "modules/rddb/readfile/assign_user.html";
return "modules/rddb/readfile/assign.html";
}
/**

View File

@ -49,7 +49,7 @@ public class SuperviseThingUserController extends BaseController {
@GetMapping("to_assign")
public String toAssign(String userIds, Model model) {
model.addAttribute("userIds", userIds);
return "modules/rddb/supervise_thing/assign_user.html";
return "modules/rddb/supervise_thing/assign.html";
}
/**

View File

@ -57,7 +57,7 @@ public class VoterSuggestSolveController extends BaseController {
@GetMapping("/to_assign")
public String toAssign(String userIds, Model model) {
model.addAttribute("userIds", userIds);
return "modules/rddb/voter_suggest/assign_user.html";
return "modules/rddb/voter_suggest/assign.html";
}
/**

View File

@ -0,0 +1,74 @@
package com.ydool.boot.modules.rddb.web;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.boot.api.util.CodecUtils;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.common.utils.WebUtils;
import com.ydool.boot.core.web.BaseController;
import com.ydool.boot.modules.rddb.entity.Const;
import com.ydool.boot.modules.rddb.wrapper.UserDtoWrapper;
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.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author zhouyuan
* @date 2022/6/7 10:30
*/
@Controller
@RequestMapping("${ydool.path}/rddb/select")
public class _SelectController extends BaseController {
@Autowired
UserService userService;
@GetMapping("to_assign")
public String toAssign( Model model) {
model.addAllAttributes(WebUtils.getParameters(request));
return "modules/rddb/assign.html";
}
/**
* 选择各种账号列表
*
* @param userIds
*/
@RequestMapping("assign_list")
@ResponseBody
public void adminAssignList(String userType, String userIds, String userName, String loginName) {
QueryWrapper<User> qw = new QueryWrapper<>();
if (Const.TYPE_ADMIN.equals(userType)) {
qw.eq("account_type", Const.TYPE_ADMIN);
} else if (Const.TYPE_RDDB.equals(userType)) {
qw.eq("account_type", Const.TYPE_RDDB);
} else if ((Const.TYPE_ADMIN + "," + Const.TYPE_RDDB).equals(userType)) {
qw.and(_qw -> {
_qw.eq("account_type", Const.TYPE_ADMIN)
.or().eq("account_type", Const.TYPE_RDDB);
});
} else if (Const.TYPE_CONTACT.equals(userType)) {
qw.eq("account_type", Const.TYPE_CONTACT);
} else {
//默认县级机关人员
qw.eq("account_type", Const.TYPE_ADMIN);
}
_process(qw, userIds, userName, loginName);
}
private void _process(QueryWrapper<User> qw, String userIds, String userName, String loginName) {
qw.notIn(StrUtil.isNotBlank(userIds),"id", userIds.split(","));
if (StrUtil.isNotBlank(userName)) qw.like("user_name", userName);
qw.like(StrUtil.isNotBlank(loginName), "AES_DECRYPT(from_base64 (login_name),'" + CodecUtils.KEY + "')", loginName);
Page page = userService.page(new Page(getPageNum(), getPageSize()), qw);
render(Ret.ok().paged(UserDtoWrapper.build().pageVO(page)));
}
}

View File

@ -0,0 +1,111 @@
package com.ydool.boot.modules.rddb.wrapper;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ydool.boot.api.util.TokenUtil;
import com.ydool.boot.api.util.UserInfo;
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.ContactDbDto;
import com.ydool.boot.modules.rddb.service.ContactDbAttachmentService;
import com.ydool.boot.modules.rddb.service.ContactDbUserService;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author zhouyuan
* @date 2022/6/8 17:15
*/
public class ContactDbWrapper extends BaseWrapper<ContactDb, ContactDbDto> {
public static ContactDbWrapper build() {
return new ContactDbWrapper();
}
@Override
public ContactDbDto entityVO(ContactDb contactDb) {
ContactDbDto dto = BeanUtil.copyProperties(contactDb, ContactDbDto.class);
ContactDbAttachmentService contactDbAttachmentService = SpringUtils.getBean(ContactDbAttachmentService.class);
ContactDbUserService contactDbUserService = SpringUtils.getBean(ContactDbUserService.class);
List<ContactDbAttachment> recordAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_RECORD)
.orderByDesc(ContactDbAttachment::getCreatedAt));
List<ContactDbAttachment> photoAttachmentList = contactDbAttachmentService.list(new LambdaQueryWrapper<ContactDbAttachment>()
.eq(ContactDbAttachment::getContactDbId, contactDb.getId())
.eq(ContactDbAttachment::getType, ContactDbAttachment.TYPE_CONFERENCE_PHOTO)
.orderByDesc(ContactDbAttachment::getCreatedAt));
dto.setConferenceRecordAttachmentList(recordAttachmentList);
dto.setConferencePhotoAttachmentList(photoAttachmentList);
List<ContactDbUser> subjectUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_SUBJECT)
.orderByDesc(ContactDbUser::getCreatedAt));
List<ContactDbUser> chooseAdminUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_CHOOSE)
.eq(ContactDbUser::getIdentity, Const.TYPE_ADMIN)
.orderByDesc(ContactDbUser::getCreatedAt));
List<ContactDbUser> chooseDbUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_CHOOSE)
.eq(ContactDbUser::getIdentity, Const.TYPE_RDDB)
.orderByDesc(ContactDbUser::getCreatedAt));
List<ContactDbUser> signUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_SIGN)
.orderByDesc(ContactDbUser::getCreatedAt));
List<ContactDbUser> conferenceUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_CONFERENCE)
.orderByDesc(ContactDbUser::getCreatedAt));
List<ContactDbUser> evaluateUserList = contactDbUserService.list(new LambdaQueryWrapper<ContactDbUser>()
.eq(ContactDbUser::getContactDbId, contactDb.getId())
.eq(ContactDbUser::getType, ContactDb.STATE_EVALUATE)
.orderByDesc(ContactDbUser::getCreatedAt));
dto.setSubjectUserList(subjectUserList);
dto.setChooseAdminUserList(chooseAdminUserList);
dto.setChooseDbUserList(chooseDbUserList);
dto.setSignUserList(signUserList);
dto.setConferenceUserList(conferenceUserList);
dto.setEvaluateUserList(evaluateUserList);
//打分结束算平均分
if (ContactDb.STATE_END == contactDb.getState()) {
//没打分的不算
List<ContactDbUser> scoredUserList = evaluateUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(scoredUserList)) {
BigDecimal averageScore = scoredUserList.stream().map(item -> item.getScore())
.reduce(BigDecimal.ZERO, BigDecimal::add)
.divide(new BigDecimal(scoredUserList.size()), BigDecimal.ROUND_HALF_UP);
dto.setAverageEvaluate(averageScore);
} else {
dto.setAverageEvaluate(new BigDecimal("0"));
}
}
UserInfo userInfo = TokenUtil.getUserInfo();
//当期用户是否是创建人
//当期用户是否可签到
//当期用户是否可测评
dto.setIsCreator(false);
dto.setIsCanSign(false);
dto.setIsCanEvaluate(false);
if (userInfo != null) {
if (userInfo.getId().equals(contactDb.getCreatedId())) dto.setIsCreator(true);
List<String> signUserIdList = signUserList.stream().map(ContactDbUser::getUserId).collect(Collectors.toList());
if (signUserIdList.contains(userInfo.getId())) dto.setIsCanSign(true);
List<String> evaluateUserIdList = evaluateUserList.stream().map(ContactDbUser::getUserId).collect(Collectors.toList());
if (evaluateUserIdList.contains(userInfo.getId())) dto.setIsCanEvaluate(true);
}
return dto;
}
}

View File

@ -1 +1 @@
*{box-sizing:border-box}body{background-color:#f8f8f8}body,button,input,select,textarea{font-family:PingFang SC,PingFang SC-Bold!important}img{max-width:100%}table{width:100%!important}#app{height:100%;display:flex;flex-direction:column}.van-tabs__line{background-color:#d03a29}.van-pagination{min-height:1.06667rem}.van-search{min-height:1.44rem}.van-tabs--line .van-tabs__wrap{min-height:1.17333rem}.navVar-box[data-v-fe379062]{min-height:1.22667rem}.navVar-box .van-nav-bar[data-v-fe379062]{background-color:#d03a29}.navVar-box .van-nav-bar[data-v-fe379062] .van-icon,.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__left,.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__right,.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__title{font-size:.42667rem;color:#fff}.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__title{font-weight:700}.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__right .right{display:flex;align-items:center}.tabbar[data-v-25322661]{min-height:1.33333rem}blockquote,body,button,dd,dl,dt,fieldset,h1,h2,h3,h4,h5,h6,hr,input,lengend,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0}body,button,input,select,textarea{font:.32rem/1 Tahoma,Helvetica,Arial,"\5b8b\4f53",sans-serif}h1{font-size:.48rem}h2{font-size:.42667rem}h3{font-size:.37333rem}h4,h5,h6{font-size:100%}address,cite,dfn,em,var{font-style:normal}code,kbd,pre,samp,tt{font-family:Courier New,Courier,monospace}small{font-size:.32rem}ol,ul{list-style:none}a{text-decoration:none}a:hover{text-decoration:underline}abbr[title],acronym[title]{border-bottom:.02667rem dotted;cursor:help}q:after,q:before{content:""}legend{color:#000}fieldset,img{border:none}button,input,select,textarea{font-size:100%}table{border-collapse:collapse;border-spacing:0}hr{border:none;height:.02667rem}body,html{height:100%}.w-100{width:100%}.h-100{height:100%}.text-overflow{white-space:nowrap}.more-overflow,.text-overflow{overflow:hidden;text-overflow:ellipsis}.more-overflow{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
*{box-sizing:border-box}body{background-color:#f8f8f8}body,button,input,select,textarea{font-family:PingFang SC,PingFang SC-Bold!important}img{max-width:100%}table{width:100%!important}#app{height:100%;display:flex;flex-direction:column}.van-tabs__line{background-color:#d03a29}.van-pagination{min-height:1.06667rem}.van-search{min-height:1.44rem}.van-tabs--line .van-tabs__wrap{min-height:1.17333rem}.navVar-box[data-v-fe379062]{min-height:1.22667rem}.navVar-box .van-nav-bar[data-v-fe379062]{background-color:#d03a29}.navVar-box .van-nav-bar[data-v-fe379062] .van-icon,.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__left,.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__right,.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__title{font-size:.42667rem;color:#fff}.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__title{font-weight:700}.navVar-box .van-nav-bar[data-v-fe379062] .van-nav-bar__right .right{display:flex;align-items:center}.tabbar[data-v-a7b0c9a6]{min-height:1.33333rem}blockquote,body,button,dd,dl,dt,fieldset,h1,h2,h3,h4,h5,h6,hr,input,lengend,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0}body,button,input,select,textarea{font:.32rem/1 Tahoma,Helvetica,Arial,"\5b8b\4f53",sans-serif}h1{font-size:.48rem}h2{font-size:.42667rem}h3{font-size:.37333rem}h4,h5,h6{font-size:100%}address,cite,dfn,em,var{font-style:normal}code,kbd,pre,samp,tt{font-family:Courier New,Courier,monospace}small{font-size:.32rem}ol,ul{list-style:none}a{text-decoration:none}a:hover{text-decoration:underline}abbr[title],acronym[title]{border-bottom:.02667rem dotted;cursor:help}q:after,q:before{content:""}legend{color:#000}fieldset,img{border:none}button,input,select,textarea{font-size:100%}table{border-collapse:collapse;border-spacing:0}hr{border:none;height:.02667rem}body,html{height:100%}.w-100{width:100%}.h-100{height:100%}.text-overflow{white-space:nowrap}.more-overflow,.text-overflow{overflow:hidden;text-overflow:ellipsis}.more-overflow{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

View File

@ -0,0 +1 @@
.van-pagination[data-v-1c160aa0]{position:fixed;bottom:0;width:100%;z-index:999}.box[data-v-1c160aa0]{display:flex;flex-direction:column;height:100%;font-size:.42667rem}.box .add[data-v-1c160aa0]{width:2.13333rem;height:2.13333rem;position:fixed;right:.32rem;bottom:20%}.box[data-v-1c160aa0] .van-tab.van-tab--active{font-size:.42667rem;font-weight:800}.box .tab-contain[data-v-1c160aa0]{padding:.32rem}.box .tab-contain .van-cell[data-v-1c160aa0]{margin-bottom:.37333rem}.box .tab-contain .van-cell .custom-title[data-v-1c160aa0]{font-weight:700;font-size:.42667rem}.box .tab-contain .van-cell .van-icon[data-v-1c160aa0]{color:#333}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.evaluate[data-v-25778477]{margin-top:.8rem;padding:.42667rem .64rem;background:#f8f8f8;border-radius:.21333rem}.evaluate .evaluate-contain[data-v-25778477]{line-height:.53333rem}.evaluate .evaluate-contain .title[data-v-25778477]{color:#0071ff}.evaluate .evaluate-bottom[data-v-25778477]{display:flex;align-items:center;justify-content:space-between;margin-top:.74667rem}.evaluate .evaluate-bottom .date[data-v-25778477]{color:#8e8f9e}.evaluate .evaluate-bottom .more[data-v-25778477]{color:#0071ff}.users[data-v-25778477]{margin-top:-.32rem;padding:.10667rem 0 .21333rem;background-color:#fff;display:flex;flex-wrap:wrap;border-bottom:.02667rem solid #f3f3f3}.users .item[data-v-25778477]{background-color:#fff2f1;padding:0 .26667rem;font-size:.32rem;color:#333;line-height:.61333rem;border-radius:.29333rem;margin-right:.26667rem;margin-top:.26667rem;position:relative}.users .item .van-icon[data-v-25778477]{position:absolute;top:0;right:0;transform:translate(50%,-50%);color:#d03a29}.box[data-v-25778477]{display:flex;flex-direction:column;height:100%;font-size:.37333rem}.box .step .my-swipe .van-swipe-item[data-v-25778477]{height:4rem;box-sizing:border-box;padding:.8rem .8rem .8rem 1.6rem;display:flex}.box .step .my-swipe .van-swipe-item[data-v-25778477]:nth-of-type(2){padding:.8rem 1.6rem .8rem .8rem}.box .step .my-swipe .van-swipe-item .step-item[data-v-25778477]{width:35%;display:inline-block;position:relative;box-sizing:border-box}.box .step .my-swipe .van-swipe-item .step-item.step-three[data-v-25778477]{width:30%}.box .step .my-swipe .van-swipe-item .step-item.negativeDirection[data-v-25778477]{width:40%;text-align:right}.box .step .my-swipe .van-swipe-item .step-item.negativeDirection .line[data-v-25778477]{left:.10667rem;top:.32rem}.box .step .my-swipe .van-swipe-item .step-item.negativeDirection .step-title[data-v-25778477]{font-size:.32rem;line-height:.48rem;margin-top:.32rem;text-align:center;margin-right:-48%;margin-left:20%}.box .step .my-swipe .van-swipe-item .step-item .stepImg[data-v-25778477]{position:relative;width:.72rem;height:.72rem}.box .step .my-swipe .van-swipe-item .step-item .line[data-v-25778477]{width:calc(100% - .90667rem);height:.02667rem;border-bottom:.02667rem dashed #dcdcdc;position:absolute;left:.8rem;top:.32rem}.box .step .my-swipe .van-swipe-item .step-item .line.completedLine[data-v-25778477]{border-bottom-color:#8ccf8c!important}.box .step .my-swipe .van-swipe-item .step-item .step-title[data-v-25778477]{font-size:.32rem;line-height:.48rem;margin-top:.32rem;text-align:center;margin-right:8%;margin-left:-70%}.box .step .my-swipe[data-v-25778477] .van-swipe__indicators .van-swipe__indicator{width:.26667rem;height:.10667rem;background:#88bc88;border-radius:.05333rem;opacity:.5}.box .step .my-swipe[data-v-25778477] .van-swipe__indicators .van-swipe__indicator.van-swipe__indicator--active{width:.50667rem;height:.10667rem;background:#55b955;border-radius:.05333rem;opacity:.7}.box .step-contain[data-v-25778477]{flex:1;background:#fff;border-top-right-radius:.8rem;border-top-left-radius:.8rem;padding:.42667rem;padding-bottom:2.13333rem}.box .step-contain .form-ele[data-v-25778477]{display:flex;align-items:center;padding:.32rem 0;border-bottom:.02667rem solid #f3f3f3;position:relative}.box .step-contain .form-ele .title[data-v-25778477]{width:3.2rem;font-size:.42667rem;line-height:.53333rem;flex-shrink:0}.box .step-contain .form-ele .notice-contain[data-v-25778477]{font-size:.42667rem}.box .step-contain .form-ele .input-ele[data-v-25778477]{flex:1;border:none;outline:none;background:#f8f8f8;padding:.21333rem 1.06667rem .21333rem .53333rem;border-radius:.45333rem}.box .step-contain .form-ele .downIcon[data-v-25778477]{position:absolute;right:.42667rem;top:.58667rem;z-index:10}.box .step-contain .form-ele .enclosure[data-v-25778477]{flex:1}.box .step-contain .btn[data-v-25778477]{margin:0 .42667rem;margin-top:1.6rem;background:#d03a29;border-radius:.53333rem;height:1.06667rem;line-height:1.06667rem;text-align:center;color:#fff}.box .step-contain .btn .enclosureEnd[data-v-25778477]{width:.48rem;height:.42667rem;margin-right:.16rem;vertical-align:middle}

View File

@ -0,0 +1 @@
.collapseFirstTitle[data-v-4caccde5]{display:flex}.collapseFirstTitle .collapseImg[data-v-4caccde5]{height:1.06667rem;margin-right:.26667rem}.collapseFirstTitle .collapseTitle .startTime[data-v-4caccde5]{font-size:.32rem;color:#999}.box[data-v-4caccde5]{font-size:.42667rem}.box .btnTab[data-v-4caccde5]{padding-top:.16rem 0;text-align:center;background:#fff}.box .btnTab .btn-group[data-v-4caccde5]{background:#f8f8f8;display:inline-block;padding:.16rem;border-radius:.21333rem}.box .btnTab .btn-group p[data-v-4caccde5]{padding:.26667rem .8rem;display:inline-block}.box .btnTab .btn-group p.selected[data-v-4caccde5]{background:#d03a29;color:#fff;border-radius:.21333rem}.list[data-v-4caccde5]{flex:1}.list .van-collapse[data-v-4caccde5] .van-collapse-item__content{padding:0}.list .van-collapse[data-v-4caccde5] .van-collapse{padding-left:.53333rem}.list .van-collapse[data-v-4caccde5] .van-collapse .van-cell{padding-top:.13333rem;padding-bottom:.13333rem}.fileUl li[data-v-4caccde5]{position:relative;padding:.42667rem .26667rem}.fileUl li[data-v-4caccde5]:not(:last-child):after{content:"";position:absolute;left:1.81333rem;right:.26667rem;bottom:0;height:.02667rem;background-color:#f3f3f3}.fileUl li .filediv[data-v-4caccde5]{display:flex;align-items:center}.fileUl li .filediv .p3[data-v-4caccde5]{font-size:.32rem;font-family:PingFang SC,PingFang SC-Regular;font-weight:400;color:#999;position:absolute;right:0;top:.13333rem}.fileUl li .filediv .icon[data-v-4caccde5]{width:1.49333rem;height:1.49333rem;margin-right:.32rem}.fileUl li .filediv .right[data-v-4caccde5]{flex:1}.fileUl li .filediv .right .row[data-v-4caccde5]{margin-top:.10667rem;font-size:.32rem;font-family:PingFang SC,PingFang SC-Regular;color:#999;line-height:.42667rem}.fileUl li .filediv .right .row[data-v-4caccde5]:first-of-type{display:flex;align-items:center}.fileUl li .filediv .right .row:first-of-type .title[data-v-4caccde5]{flex:1;font-size:.42667rem;font-family:PingFang SC,PingFang SC-Bold;font-weight:700;line-height:.53333rem;color:#333;word-break:break-all}.fileUl li .filediv .right .row:first-of-type .btn[data-v-4caccde5]{position:relative}.fileUl li .filediv .right .row:first-of-type .btn .van-icon[data-v-4caccde5]{font-size:.53333rem;color:#333;font-weight:700;display:block}.fileUl li .filediv .right .row:first-of-type .btn .deldiv[data-v-4caccde5]{position:absolute;top:100%;right:0;width:2.58667rem;background-color:#4f5052;border-radius:.10667rem;padding:.29333rem .53333rem;font-size:.37333rem;color:#fff;line-height:.53333rem;display:flex;align-items:center}.fileUl li .filediv .right .row:first-of-type .btn .deldiv img[data-v-4caccde5]{width:.48rem;margin-right:.29333rem}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-157caa60"],{"0e80":function(t,a,s){"use strict";s.r(a);var e=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("van-sticky",{attrs:{"offset-top":0}},[e("nav-bar",{attrs:{"left-arrow":"",title:"上报信息详情"}})],1),e("div",{staticClass:"top commonEle"},[e("h5",[t._v(t._s(t.obj.title))]),e("p",[t._v(t._s(t.obj.content))]),e("p",{staticClass:"statusP"},[t._v(" 当前状态: "),0==t.obj.hireStatus?e("span",{staticStyle:{color:"#5995d1"}},[t._v("待审核")]):t._e(),1==t.obj.hireStatus?e("span",{staticStyle:{color:"#67c23a"}},[t._v("已通过")]):t._e(),2==t.obj.hireStatus?e("span",{staticStyle:{color:"#F56C6C"}},[t._v("已拒绝")]):t._e()])]),e("div",{staticClass:"middle commonEle"},[e("p",{staticClass:"date item"},[t._v("上报时间")]),e("p",{staticClass:"dateContent"},[t._v(t._s(t.obj.createdAt))]),e("p",{staticClass:"town item"},[t._v("上报乡镇")]),e("p",{staticClass:"towncontent"},[t._v(t._s(t.obj.streetStr))])]),e("div",{staticClass:"commonEle"},[e("p",{staticClass:"uploadTime item"},[t._v("上报附件文件")]),e("div",{staticClass:"enclosureBox"},t._l(t.obj.attachmentNameList,(function(a,i){return e("a",{key:i,staticClass:"singleEnclosure",attrs:{href:t.obj.attachmentPathList[i],download:a}},[e("p",{staticClass:"enclosureTitle text-overflow"},[t._v(t._s(a))]),e("div",{staticClass:"imgBox"},["pdf"==t.obj.fileTypeArr[i]?e("img",{staticClass:"w-100 h-100",attrs:{src:s("139f"),alt:""}}):"ppt"==t.obj.fileTypeArr[i]?e("img",{staticClass:"w-100 h-100",attrs:{src:s("07ba"),alt:""}}):"txt"==t.obj.fileTypeArr[i]?e("img",{staticClass:"w-100 h-100",attrs:{src:s("6835"),alt:""}}):"docx"==t.obj.fileTypeArr[i]||"doc"==t.obj.fileTypeArr[i]?e("img",{staticClass:"w-100 h-100",attrs:{src:s("e739"),alt:""}}):"xlsx"==t.obj.fileTypeArr[i]||"xls"==t.obj.fileTypeArr[i]?e("img",{staticClass:"w-100 h-100",attrs:{src:s("e537"),alt:""}}):e("img",{staticClass:"icon",attrs:{src:s("600a"),alt:""}})])])})),0)])],1)},i=[],c=s("0c6d"),l={data(){return{obj:{}}},created(){this.$toast.loading({message:"正在加载...",duration:0,forbidClick:!0}),Object(c["sb"])(this.$route.params.id).then(t=>{200==t.status?(t.data.data.fileTypeArr=[],t.data.data.attachmentNameList?t.data.data.attachmentNameList.length&&t.data.data.attachmentNameList.forEach(a=>{t.data.data.fileTypeArr.push(a.split(".")[a.split(".").length-1])}):t.data.data.attachmentNameList=[],this.obj=t.data.data,this.$toast.clear()):this.$toast.fail(t.data.msg)}).catch(t=>{this.$toast.fail("加载失败")})}},o=l,r=(s("9f46"),s("2877")),n=Object(r["a"])(o,e,i,!1,null,"7b98c5b3",null);a["default"]=n.exports},"1ec2":function(t,a,s){},"9f46":function(t,a,s){"use strict";var e=s("1ec2"),i=s.n(e);i.a}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More