update
This commit is contained in:
parent
1ab3cdbd67
commit
ae0241666d
2
pom.xml
2
pom.xml
|
@ -38,7 +38,7 @@
|
|||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.58</version>
|
||||
<version>1.2.80</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
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.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.appoint.*;
|
||||
import com.ydool.boot.modules.rddb.entity.request.appoint.state.*;
|
||||
import com.ydool.boot.modules.rddb.service.AppointCommentService;
|
||||
import com.ydool.boot.modules.rddb.service.AppointService;
|
||||
import com.ydool.boot.modules.rddb.wrapper.AppointWrapper;
|
||||
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年05月16日
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/api/appoint")
|
||||
@Api(value = "A任免督职", tags = "A任免督职")
|
||||
public class ApiAppointController extends ApiBaseController {
|
||||
|
||||
@Autowired
|
||||
AppointService appointService;
|
||||
@Autowired
|
||||
AppointCommentService appointCommentService;
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "职务任免", name = "data", dataTypeClass = AppointDto.class)
|
||||
})
|
||||
@ApiOperation("职务任免列表 (被指定的人与创建人可见)")
|
||||
@GetMapping
|
||||
public void appointPage() {
|
||||
QueryWrapper<Appoint> qw = new QueryWrapper<Appoint>()
|
||||
.and(_qw -> _qw
|
||||
.eq("created_id", getApiUserId())
|
||||
.or()
|
||||
.inSql("id", "select appoint_id from t_appoint_user where user_id='" + getApiUserId() + "'"))
|
||||
.orderByDesc("created_at");
|
||||
IPage<Appoint> paged = appointService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(AppointWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "职务任免", name = "data", dataTypeClass = AppointDto.class)
|
||||
})
|
||||
@ApiOperation("公告栏 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage() {
|
||||
QueryWrapper<Appoint> qw = new QueryWrapper<Appoint>()
|
||||
.ge("state", Appoint.STATE_PUBLIC)
|
||||
.orderByDesc("created_at");
|
||||
IPage<Appoint> paged = appointService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(AppointWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("{id}")
|
||||
@ResponseBody
|
||||
@ApiImplicitParam(name = "id", value = "职务任免id")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "职务任免", dataTypeClass = AppointDto.class)
|
||||
})
|
||||
public void appointDetail(@PathVariable String id) {
|
||||
Appoint appoint = appointService.getById(id);
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
render(Ret.ok().data(AppointWrapper.build().entityVO(appoint)));
|
||||
}
|
||||
|
||||
@ApiOperation("提名环节")
|
||||
@PostMapping("state/propose")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "职务任免", dataTypeClass = AppointDto.class)
|
||||
})
|
||||
public void stateProposeSave(@Validated AppointProposeStateRequest appointProposeRequest) {
|
||||
Appoint appoint = appointService.stateProposeSave(appointProposeRequest, getApiUser());
|
||||
render(Ret.ok().data(AppointWrapper.build().entityVO(appoint)));
|
||||
}
|
||||
|
||||
@ApiOperation("主任会议环节")
|
||||
@PostMapping("state/conference")
|
||||
@ResponseBody
|
||||
public void stateConferenceSave(@Validated AppointConferenceStateRequest appointConferenceRequest) {
|
||||
Appoint appoint = appointService.stateConferenceSave(appointConferenceRequest, getApiUser());
|
||||
render(Ret.ok().data(AppointWrapper.build().entityVO(appoint)));
|
||||
}
|
||||
|
||||
@ApiOperation("上传考试成绩环节")
|
||||
@PostMapping("state/score")
|
||||
@ResponseBody
|
||||
public void stateScoreSave(@Validated AppointScoreStateRequest appointScoreRequest) {
|
||||
Appoint appoint = appointService.stateScoreSave(appointScoreRequest, getApiUser());
|
||||
render(Ret.ok().data(AppointWrapper.build().entityVO(appoint)));
|
||||
}
|
||||
|
||||
@ApiOperation("投票会议环节")
|
||||
@PostMapping("state/vote")
|
||||
@ResponseBody
|
||||
public void stateVoteSave(@Validated AppointVoteStateRequest appointVoteRequest) {
|
||||
Appoint appoint = appointService.stateVoteSave(appointVoteRequest, getApiUser());
|
||||
render(Ret.ok().data(AppointWrapper.build().entityVO(appoint)));
|
||||
}
|
||||
|
||||
@ApiOperation("投票")
|
||||
@PostMapping("vote")
|
||||
@ResponseBody
|
||||
public void vote(@Validated AppointVoteRequest voteRequest) {
|
||||
Ret ret = appointService.vote(voteRequest, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiOperation("投票结束")
|
||||
@PostMapping("vote/end/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "职务任免id")
|
||||
@ResponseBody
|
||||
public void voteEnd(@PathVariable String id) {
|
||||
Ret ret = appointService.voteEnd(id, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
//公开环节自动跳过
|
||||
|
||||
@ApiOperation("履职环节")
|
||||
@PostMapping("state/perform")
|
||||
@ResponseBody
|
||||
public void statePerformSave(@Validated AppointPerformStateRequest appointPerformRequest) {
|
||||
Appoint appoint = appointService.statePerformSave(appointPerformRequest, getApiUser());
|
||||
render(Ret.ok().data(AppointWrapper.build().entityVO(appoint)));
|
||||
}
|
||||
|
||||
@ApiOperation("打分")
|
||||
@PostMapping("perform")
|
||||
@ResponseBody
|
||||
public void perform(@Validated AppointPerformRequest performRequest) {
|
||||
Ret ret = appointService.perform(performRequest, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiOperation("打分结束")
|
||||
@PostMapping("perform/end/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "职务任免id")
|
||||
@ResponseBody
|
||||
public void performEnd(@PathVariable String id) {
|
||||
Ret ret = appointService.performEnd(id, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiOperation("评论")
|
||||
@PostMapping("comment")
|
||||
@ResponseBody
|
||||
public void comment(@Validated AppointCommentRequest commentRequest) {
|
||||
Ret ret = appointService.comment(commentRequest, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "appointId", value = "职务任免id"),
|
||||
@ApiImplicitParam(name = "type", value = "职务任免环节 1-6")
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "职务任免", name = "data", dataTypeClass = AppointComment.class)
|
||||
})
|
||||
@ApiOperation("评论列表")
|
||||
@GetMapping("comment")
|
||||
public void commentPage(String appointId, Integer type) {
|
||||
LambdaQueryWrapper<AppointComment> qw = new LambdaQueryWrapper<AppointComment>()
|
||||
.eq(StrUtil.isNotBlank(appointId), AppointComment::getAppointId, appointId)
|
||||
.eq(type != null, AppointComment::getType, type)
|
||||
.orderByDesc(AppointComment::getCreatedAt);
|
||||
IPage<AppointComment> paged = appointCommentService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(paged));
|
||||
}
|
||||
|
||||
}
|
|
@ -49,6 +49,7 @@ public class ApiDataBankController extends ApiBaseController {
|
|||
if (StringUtils.isNotBlank(dataBank.getUploadUser()))
|
||||
queryWrapper.like("upload_user", dataBank.getUploadUser());
|
||||
if (StringUtils.isNotBlank(dataBank.getFileType())) queryWrapper.eq("file_type", dataBank.getFileType());
|
||||
queryWrapper.orderByDesc("created_at");
|
||||
IPage<DataBank> paged = dataBankService.page(new Page<>(getPageNum(), getPageSize()), queryWrapper);
|
||||
paged.getRecords().forEach(DataBank::full);
|
||||
render(Ret.ok().paged(paged));
|
||||
|
|
|
@ -0,0 +1,203 @@
|
|||
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.Review;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewComment;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewDto;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.ReviewAuditRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.ReviewCheckRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.ReviewCommentRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewCheckStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewInReportStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewOpinionStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewResultStateRequest;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewCommentService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewService;
|
||||
import com.ydool.boot.modules.rddb.wrapper.ReviewWrapper;
|
||||
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年05月16日
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/api/review")
|
||||
@Api(value = "A评议", tags = "A评议")
|
||||
public class ApiReviewController extends ApiBaseController {
|
||||
|
||||
@Autowired
|
||||
ReviewService reviewService;
|
||||
@Autowired
|
||||
ReviewCommentService reviewCommentService;
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "type", value = "类型 work工作评议/subject专题评议/officer两官评议", required = true),
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
@ApiOperation("评议列表 (被指定的人与创建人可见)")
|
||||
@GetMapping
|
||||
public void reviewPage(String type) {
|
||||
QueryWrapper<Review> qw = new QueryWrapper<Review>()
|
||||
.eq("type", type)
|
||||
.and(_qw -> _qw
|
||||
.eq("created_id", getApiUserId())
|
||||
.or()
|
||||
.inSql("id", "select review_id from t_review_user where user_id='" + getApiUserId() + "'")
|
||||
.or()
|
||||
.inSql("id", "select review_id from t_review_audit where user_id='" + getApiUserId() + "'"))
|
||||
.orderByDesc("created_at");
|
||||
IPage<Review> paged = reviewService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ReviewWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "type", value = "类型 work工作评议/subject专题评议/officer两官评议", required = true),
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "评议", name = "data", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
@ApiOperation("公告栏 (所有人可见)")
|
||||
@GetMapping("public")
|
||||
public void publicPage(String type) {
|
||||
QueryWrapper<Review> qw = new QueryWrapper<Review>()
|
||||
.ge("type", type)
|
||||
.ge("state", Review.STATE_PUBLIC)
|
||||
.orderByDesc("created_at");
|
||||
IPage<Review> paged = reviewService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(ReviewWrapper.build().pageVO(paged)));
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("{id}")
|
||||
@ResponseBody
|
||||
@ApiImplicitParam(name = "id", value = "评议id")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
public void reviewDetail(@PathVariable String id) {
|
||||
Review review = reviewService.getById(id);
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
render(Ret.ok().data(ReviewWrapper.build().entityVO(review)));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("评论")
|
||||
@PostMapping("comment")
|
||||
@ResponseBody
|
||||
public void comment(@Validated ReviewCommentRequest reviewCommentRequest) {
|
||||
Ret ret = reviewService.comment(reviewCommentRequest, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页"),
|
||||
@ApiImplicitParam(name = "size", value = "显示条数"),
|
||||
@ApiImplicitParam(name = "reviewId", value = "评议id"),
|
||||
@ApiImplicitParam(name = "type", value = "评议环节 1-7")
|
||||
})
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(value = "评议评论", name = "data", dataTypeClass = ReviewComment.class)
|
||||
})
|
||||
@ApiOperation("评论列表")
|
||||
@GetMapping("comment")
|
||||
public void commentPage(String reviewId, Integer type) {
|
||||
LambdaQueryWrapper<ReviewComment> qw = new LambdaQueryWrapper<ReviewComment>()
|
||||
.eq(StrUtil.isNotBlank(reviewId), ReviewComment::getReviewId, reviewId)
|
||||
.eq(type != null, ReviewComment::getType, type)
|
||||
.orderByDesc(ReviewComment::getCreatedAt);
|
||||
IPage<ReviewComment> paged = reviewCommentService.page(new Page<>(getPageNum(), getPageSize()), qw);
|
||||
render(Ret.ok().paged(paged));
|
||||
}
|
||||
|
||||
@ApiOperation("内部上报环节")
|
||||
@PostMapping("state/in_report")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
public void stateInReportSave(@Validated ReviewInReportStateRequest reviewInReportStateRequest) {
|
||||
Review review = reviewService.stateInReportSave(reviewInReportStateRequest, getApiUser());
|
||||
render(Ret.ok().data(ReviewWrapper.build().entityVO(review)));
|
||||
}
|
||||
|
||||
@ApiOperation("审批")
|
||||
@PostMapping("audit")
|
||||
@ResponseBody
|
||||
public void audit(@Validated ReviewAuditRequest reviewAuditRequest) {
|
||||
Ret ret = reviewService.audit(reviewAuditRequest, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiOperation("上传自查/调查报告环节")
|
||||
@PostMapping("state/check")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
public void stateCheckSave(@Validated ReviewCheckStateRequest reviewCheckStateRequest) {
|
||||
Review review = reviewService.stateCheckSave(reviewCheckStateRequest, getApiUser());
|
||||
render(Ret.ok().data(ReviewWrapper.build().entityVO(review)));
|
||||
}
|
||||
|
||||
@ApiOperation("打分")
|
||||
@PostMapping("check")
|
||||
@ResponseBody
|
||||
public void check(@Validated ReviewCheckRequest reviewCheckRequest) {
|
||||
Ret ret = reviewService.check(reviewCheckRequest, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiOperation("打分结束")
|
||||
@PostMapping("check/end/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "评议id")
|
||||
@ResponseBody
|
||||
public void checkEnd(@PathVariable String id) {
|
||||
Ret ret = reviewService.checkEnd(id, getApiUser());
|
||||
render(ret);
|
||||
}
|
||||
|
||||
@ApiOperation("上传评议意见环节")
|
||||
@PostMapping("state/opinion")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
public void stateOpinionSave(@Validated ReviewOpinionStateRequest reviewOpinionStateRequest) {
|
||||
Review review = reviewService.stateOpinionSave(reviewOpinionStateRequest, getApiUser());
|
||||
render(Ret.ok().data(ReviewWrapper.build().entityVO(review)));
|
||||
}
|
||||
|
||||
@ApiOperation("上传整改结果环节")
|
||||
@PostMapping("state/result")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewDto.class)
|
||||
})
|
||||
public void stateResultSave(@Validated ReviewResultStateRequest reviewResultStateRequest) {
|
||||
Review review = reviewService.stateResultSave(reviewResultStateRequest, getApiUser());
|
||||
render(Ret.ok().data(ReviewWrapper.build().entityVO(review)));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
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-05-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_appoint")
|
||||
public class Appoint extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//当前环节 (上传提名信息propose:1 会议讨论结果conference:2 上传成绩score:3 投票vote:4 公告public:5 履职perform:6)
|
||||
public static Integer STATE_PROPOSE = 1;
|
||||
public static Integer STATE_CONFERENCE = 2;
|
||||
public static Integer STATE_SCORE = 3;
|
||||
public static Integer STATE_VOTE = 4;
|
||||
public static Integer STATE_PUBLIC = 5;
|
||||
public static Integer STATE_PERFORM = 6;
|
||||
//结束标记
|
||||
public static Integer STATE_END = 7;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 提名人
|
||||
*/
|
||||
@ApiModelProperty(value = "提名人")
|
||||
private String proposeName;
|
||||
|
||||
|
||||
/**
|
||||
* 原职位
|
||||
*/
|
||||
@ApiModelProperty(value = "原职位")
|
||||
private String proposeOldJob;
|
||||
|
||||
/**
|
||||
* 任职
|
||||
*/
|
||||
@ApiModelProperty(value = "任职")
|
||||
private String proposeNewJob;
|
||||
|
||||
/**
|
||||
* 提名上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "提名上传时间")
|
||||
private LocalDateTime proposeUploadAt;
|
||||
|
||||
/**
|
||||
* 会议时间
|
||||
*/
|
||||
@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 conferenceAddress;
|
||||
|
||||
/**
|
||||
* 会议备注
|
||||
*/
|
||||
@ApiModelProperty(value = "会议备注")
|
||||
private String conferenceRemark;
|
||||
|
||||
/**
|
||||
* 会议上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "会议上传时间")
|
||||
private LocalDateTime conferenceUploadAt;
|
||||
|
||||
/**
|
||||
* 考试时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "考试时间")
|
||||
private LocalDateTime examAt;
|
||||
|
||||
/**
|
||||
* 考试成绩
|
||||
*/
|
||||
@ApiModelProperty(value = "考试成绩")
|
||||
private String examResult;
|
||||
|
||||
/**
|
||||
* 考试上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "考试上传时间")
|
||||
private LocalDateTime examUploadAt;
|
||||
|
||||
/**
|
||||
* 投票会议时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "投票会议时间")
|
||||
private LocalDateTime voteAt;
|
||||
|
||||
/**
|
||||
* 投票会议地址
|
||||
*/
|
||||
@ApiModelProperty(value = "投票会议地址")
|
||||
private String voteAddress;
|
||||
|
||||
/**
|
||||
* 履职上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "履职上传时间")
|
||||
private LocalDateTime performUploadAt;
|
||||
|
||||
/**
|
||||
* 当前环节
|
||||
*/
|
||||
@ApiModelProperty(value = "当前环节 1-6")
|
||||
private Integer state;
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package com.ydool.boot.modules.rddb.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ydool.boot.core.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职附件
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_appoint_attachment")
|
||||
@Accessors(chain = true)
|
||||
public class AppointAttachment extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 附件类型 与任免督职的state环节对应
|
||||
*/
|
||||
@ApiModelProperty(value = "类型 (与任免督职环节相对应)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 任免督职id
|
||||
*/
|
||||
private String appointId;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
@ApiModelProperty(value = "附件名")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 附件路径
|
||||
*/
|
||||
@ApiModelProperty(value = "附件路径")
|
||||
private String attachment;
|
||||
|
||||
/**
|
||||
* 文件大小
|
||||
*/
|
||||
private String size;
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.ydool.boot.modules.rddb.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ydool.boot.core.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职评论
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_appoint_comment")
|
||||
public class AppointComment extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 类型 (与任免督职环节相对应)
|
||||
*/
|
||||
@ApiModelProperty(value = "类型 (与任免督职环节相对应)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 任免督职id
|
||||
*/
|
||||
@ApiModelProperty(value = "任免督职id")
|
||||
private String appointId;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职人员
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_appoint_user")
|
||||
public class AppointUser extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//投票 (0待投票 1赞成 2反对 3弃权)
|
||||
public static Integer VOTE_WAIT = 0;
|
||||
public static Integer VOTE_AGREE = 1;
|
||||
public static Integer VOTE_REFUSE = 2;
|
||||
public static Integer VOTE_ABANDON = 3;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 任免督职id
|
||||
*/
|
||||
@ApiModelProperty(value = "任免督职id")
|
||||
private String appointId;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
@ApiModelProperty(value = "人员名称")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 投票
|
||||
*/
|
||||
@ApiModelProperty(value = "投的票")
|
||||
private Integer vote;
|
||||
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "投票时间")
|
||||
private LocalDateTime voteAt;
|
||||
|
||||
/**
|
||||
* 分数 1-100
|
||||
*/
|
||||
@ApiModelProperty(value = "分数 1-100")
|
||||
private BigDecimal score;
|
||||
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "打分时间")
|
||||
private LocalDateTime scoreAt;
|
||||
|
||||
/**
|
||||
* 类型 与任免督职的state环节对应
|
||||
*/
|
||||
@ApiModelProperty(value = "类型 (与任免督职环节相对应)")
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
|
@ -53,9 +53,9 @@ public class Audit extends BaseEntity {
|
|||
private String content;
|
||||
|
||||
/**
|
||||
* 总的状态 0待审批 1已审批通过 2已审批未通过
|
||||
* 总的状态 0待审批 1已通过 2未通过
|
||||
*/
|
||||
@ApiModelProperty(value = "总的状态 0待审批 1已审批通过 2已审批未通过")
|
||||
@ApiModelProperty(value = "总的状态 0待审批 1已通过 2未通过")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,9 +61,9 @@ public class AuditUser extends BaseEntity {
|
|||
private String userName;
|
||||
|
||||
/**
|
||||
* 单条状态 0待审批 1已审批通过 2已审批未通过
|
||||
* 单条状态 0待审批 1已通过 2未通过
|
||||
*/
|
||||
@ApiModelProperty(value = "单条状态 0待审批 1已审批通过 2已审批未通过")
|
||||
@ApiModelProperty(value = "单条状态 0待审批 1已通过 2未通过")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,159 @@
|
|||
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-05-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review")
|
||||
public class Review extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//当前环节 (内部上报拟评议部门inReport:1 上报评议部门report:2 向社会征求被评议部门意见ask:3
|
||||
//调查报告check:4 评议意见opinion:5 整改结果result:6 公示public:7)
|
||||
public static Integer STATE_IN_REPORT = 1;
|
||||
public static Integer STATE_REPORT = 2;
|
||||
public static Integer STATE_ASK = 3;
|
||||
public static Integer STATE_CHECK = 4;
|
||||
public static Integer STATE_OPINION = 5;
|
||||
public static Integer STATE_RESULT = 6;
|
||||
public static Integer STATE_PUBLIC = 7;
|
||||
|
||||
//评议类型(work工作评议/subject专题评议/officer两官评议)
|
||||
public static String TYPE_WORK = "work";
|
||||
public static String TYPE_SUBJECT = "subject";
|
||||
public static String TYPE_OFFICER = "officer";
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@ApiModelProperty(value = "类型 work工作评议/subject专题评议/officer两官评议")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 评议主题
|
||||
*/
|
||||
@ApiModelProperty(value = "评议主题(评议部门,评议专题,评议对象)")
|
||||
private String reviewSubject;
|
||||
|
||||
/**
|
||||
* 评议描述
|
||||
*/
|
||||
@ApiModelProperty(value = "评议描述(评议部门描述,评议专题描述,评议对象职位)")
|
||||
private String reviewDesc;
|
||||
|
||||
/**
|
||||
* 提名上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "提名上传时间")
|
||||
private LocalDateTime reviewUploadAt;
|
||||
|
||||
/**
|
||||
* 调查备注
|
||||
*/
|
||||
@ApiModelProperty(value = "调查备注")
|
||||
private String checkRemark;
|
||||
|
||||
/**
|
||||
* 调查上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "调查上传时间")
|
||||
private LocalDateTime checkUploadAt;
|
||||
|
||||
/**
|
||||
* 调查分数是否公开
|
||||
*/
|
||||
@ApiModelProperty(value = "调查分数是否公开 0不公开 1公开")
|
||||
private Integer checkScoreState;
|
||||
|
||||
/**
|
||||
* 评议意见备注
|
||||
*/
|
||||
@ApiModelProperty(value = "评议意见备注")
|
||||
private String opinionRemark;
|
||||
|
||||
/**
|
||||
* 评议意见上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "评议意见上传时间")
|
||||
private LocalDateTime opinionUploadAt;
|
||||
|
||||
/**
|
||||
* 整改备注
|
||||
*/
|
||||
@ApiModelProperty(value = "整改备注")
|
||||
private String alterRemark;
|
||||
|
||||
/**
|
||||
* 整改上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "整改上传时间")
|
||||
private LocalDateTime alterUploadAt;
|
||||
|
||||
/**
|
||||
* 审核状态 0待审批 1已通过 2已拒绝
|
||||
*/
|
||||
@ApiModelProperty(value = " 审核状态 0审批中 1已通过 2已拒绝")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 当前环节
|
||||
*/
|
||||
@ApiModelProperty(value = " 当前环节 1-7")
|
||||
private Integer state;
|
||||
|
||||
public Review() {
|
||||
//默认公开分数
|
||||
this.checkScoreState=1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
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-05-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review_attachment")
|
||||
@Accessors(chain = true)
|
||||
public class ReviewAttachment extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 附件类型 与评议的state环节对应
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 评议id
|
||||
*/
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 附件名
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 附件路径
|
||||
*/
|
||||
private String attachment;
|
||||
|
||||
/**
|
||||
* 文件大小
|
||||
*/
|
||||
private String size;
|
||||
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
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.time.LocalDateTime;
|
||||
/**
|
||||
* <p>
|
||||
* 评议审批
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review_audit")
|
||||
public class ReviewAudit extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 评议id
|
||||
*/
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private String userId;
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 单条状态 0待审批 1已通过 2未通过
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 未通过原因
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime auditAt;
|
||||
|
||||
/**
|
||||
* 审批顺序,从1开始
|
||||
*/
|
||||
private Integer sortNo;
|
||||
|
||||
/**
|
||||
* 审批级别 共2级,从1开始
|
||||
*/
|
||||
private Integer level;
|
||||
|
||||
}
|
|
@ -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-05-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review_comment")
|
||||
public class ReviewComment extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 评论类型 与评议的state环节对应
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 评议id
|
||||
*/
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
}
|
|
@ -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 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-05-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review_user")
|
||||
public class ReviewUser extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 评议id
|
||||
*/
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 分数 1-100
|
||||
*/
|
||||
private BigDecimal score;
|
||||
|
||||
/**
|
||||
* 打分时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
private LocalDateTime scoreAt;
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.ydool.boot.modules.rddb.entity.bo;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.Appoint;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 上报
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Data
|
||||
public class AppointBo extends Appoint {
|
||||
String proposeAttachmentArrStr;
|
||||
String conferenceAttachmentArrStr;
|
||||
String performAttachmentArrStr;
|
||||
|
||||
String conferenceUserIds;
|
||||
String voteUserIds;
|
||||
String performUserIds;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.ydool.boot.modules.rddb.entity.bo;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.Review;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 上报
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Data
|
||||
public class ReviewBo extends Review {
|
||||
String inReportAttachmentArrStr;
|
||||
String checkAttachmentArrStr;
|
||||
String opinionAttachmentArrStr;
|
||||
String resultAttachmentArrStr;
|
||||
|
||||
String inReportAudit1Ids;
|
||||
String inReportAudit2Ids;
|
||||
String checkUserIds;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.ydool.boot.modules.rddb.entity.dto;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.Appoint;
|
||||
import com.ydool.boot.modules.rddb.entity.AppointAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.AppointUser;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AppointDto extends Appoint {
|
||||
|
||||
@ApiModelProperty(value = "提名附件")
|
||||
List<AppointAttachment> proposeAttachmentList;
|
||||
@ApiModelProperty(value = "会议附件")
|
||||
List <AppointAttachment>conferenceAttachmentList;
|
||||
@ApiModelProperty(value = "履职附件")
|
||||
List<AppointAttachment> performAttachmentList;
|
||||
|
||||
@ApiModelProperty(value = "会议人员")
|
||||
List <AppointUser>conferenceUserList;
|
||||
@ApiModelProperty(value = "投票人员")
|
||||
List <AppointUser>voteUserList;
|
||||
@ApiModelProperty(value = "打分人员")
|
||||
List <AppointUser>performUserList;
|
||||
|
||||
@ApiModelProperty(value = "平均分")
|
||||
BigDecimal averageScore;
|
||||
@ApiModelProperty(value = "同意票数")
|
||||
Integer agreeVoteCount;
|
||||
@ApiModelProperty(value = "拒绝票数")
|
||||
Integer refuseVoteCount;
|
||||
@ApiModelProperty(value = "弃权票数")
|
||||
Integer abandonVoteCount;
|
||||
|
||||
@ApiModelProperty(value = "当前用户是否是创建人")
|
||||
Boolean isCreator;
|
||||
@ApiModelProperty(value = "当前用户是否可以投票")
|
||||
Boolean isCanVote;
|
||||
@ApiModelProperty(value = "当前用户是否可以打分")
|
||||
Boolean isCanPerform;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
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;
|
||||
|
||||
@Data
|
||||
public class ReviewDto extends Review {
|
||||
|
||||
@ApiModelProperty(value = "评议附件")
|
||||
List<ReviewAttachment> inReportAttachmentList;
|
||||
@ApiModelProperty(value = "自查/调查报告")
|
||||
List<ReviewAttachment> checkAttachmentList;
|
||||
@ApiModelProperty(value = "评议意见附件")
|
||||
List<ReviewAttachment> opinionAttachmentList;
|
||||
@ApiModelProperty(value = "整改结果附件")
|
||||
List<ReviewAttachment> resultAttachmentList;
|
||||
|
||||
@ApiModelProperty(value = "一级审批人员")
|
||||
List<ReviewAudit> inReportAudit1List;
|
||||
@ApiModelProperty(value = "二级审批人员")
|
||||
List<ReviewAudit> inReportAudit2List;
|
||||
@ApiModelProperty(value = "打分人员")
|
||||
List<ReviewUser> checkUserList;
|
||||
|
||||
@ApiModelProperty(value = "平均分")
|
||||
BigDecimal averageScore;
|
||||
@ApiModelProperty(value = "当前用户是否是创建人")
|
||||
Boolean isCreator;
|
||||
@ApiModelProperty(value = "当前用户是否可以评分")
|
||||
Boolean isCanCheck;
|
||||
@ApiModelProperty(value = "当前用户是否可以一级审批")
|
||||
Boolean isCanAudit1;
|
||||
@ApiModelProperty(value = "当前用户是否可以二级审批")
|
||||
Boolean isCanAudit2;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
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;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
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;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.appoint;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class AppointVoteRequest {
|
||||
|
||||
@ApiModelProperty(value = "任免督职id", required = true)
|
||||
private String appointId;
|
||||
|
||||
@ApiModelProperty(value = "投票 (0待投票 1赞成 2反对 3弃权)", required = true)
|
||||
private Integer vote;
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.appoint.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class AppointConferenceStateRequest {
|
||||
|
||||
@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 = "会议时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime conferenceAt;
|
||||
|
||||
/**
|
||||
* 会议地址
|
||||
*/
|
||||
@ApiModelProperty(value = "会议地址")
|
||||
private String conferenceAddress;
|
||||
|
||||
/**
|
||||
* 会议备注
|
||||
*/
|
||||
@ApiModelProperty(value = "会议备注")
|
||||
private String conferenceRemark;
|
||||
|
||||
/**
|
||||
* 会议上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "会议上传时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime conferenceUploadAt;
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String conferenceAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String conferenceAttachmentPath;
|
||||
|
||||
@ApiModelProperty(value = "会议人员id,英文逗号间隔")
|
||||
String conferenceUserIds;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.appoint.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class AppointPerformStateRequest {
|
||||
|
||||
@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 = "履职上传时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime performUploadAt;
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String performAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String performAttachmentPath;
|
||||
|
||||
@ApiModelProperty(value = "打分人员id,英文逗号间隔")
|
||||
String performUserIds;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.appoint.state;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
public class AppointProposeStateRequest {
|
||||
|
||||
/**
|
||||
* 提名人
|
||||
*/
|
||||
@ApiModelProperty(value = "提名人")
|
||||
@NotBlank(message = "提名人不能为空")
|
||||
private String proposeName;
|
||||
|
||||
/**
|
||||
* 原职位
|
||||
*/
|
||||
@ApiModelProperty(value = "原职位")
|
||||
private String proposeOldJob;
|
||||
|
||||
/**
|
||||
* 任职
|
||||
*/
|
||||
@ApiModelProperty(value = "任职")
|
||||
private String proposeNewJob;
|
||||
|
||||
/**
|
||||
* 提名上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "提名上传时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime proposeUploadAt;
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String proposeAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String proposeAttachmentPath;
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.appoint.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class AppointScoreStateRequest {
|
||||
|
||||
@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 = "考试时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime examAt;
|
||||
|
||||
/**
|
||||
* 考试成绩
|
||||
*/
|
||||
@ApiModelProperty(value = "考试成绩")
|
||||
private String examResult;
|
||||
|
||||
/**
|
||||
* 考试上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "考试上传时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime examUploadAt;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.appoint.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class AppointVoteStateRequest {
|
||||
|
||||
@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 = "投票会议时间yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime voteAt;
|
||||
|
||||
/**
|
||||
* 投票会议地址
|
||||
*/
|
||||
@ApiModelProperty(value = "投票会议地址")
|
||||
private String voteAddress;
|
||||
|
||||
@ApiModelProperty(value = "投票会议人员id,英文逗号间隔")
|
||||
String voteUserIds;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewAuditRequest {
|
||||
|
||||
@ApiModelProperty(value = "评议id", required = true)
|
||||
private String reviewId;
|
||||
|
||||
@ApiModelProperty(value = "审批状态 1已通过 2未通过", required = true)
|
||||
private int status;
|
||||
|
||||
@ApiModelProperty(value = "未通过原因")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "审批级别 共2级,从1开始", required = true)
|
||||
private int level;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewCheckRequest {
|
||||
|
||||
@ApiModelProperty(value = "评议id", required = true)
|
||||
private String reviewId;
|
||||
|
||||
@ApiModelProperty(value = "分数 (1-100)", required = true)
|
||||
private BigDecimal score;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewCommentRequest {
|
||||
|
||||
@ApiModelProperty(value = "评议id", required = true)
|
||||
private String reviewId;
|
||||
|
||||
@ApiModelProperty(value = "评论内容", required = true)
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "环节 (1-7)", required = true)
|
||||
private int type;
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewCheckStateRequest {
|
||||
|
||||
@ApiModelProperty(value = "评议id", required = true)
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 调查备注
|
||||
*/
|
||||
@ApiModelProperty(value = "调查备注")
|
||||
private String checkRemark;
|
||||
|
||||
/**
|
||||
* 调查上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "调查上传时间")
|
||||
private LocalDateTime checkUploadAt;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String checkAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String checkAttachmentPath;
|
||||
@ApiModelProperty(value = "打分人员 英文逗号间隔")
|
||||
String checkUserIds;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewInReportStateRequest {
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@ApiModelProperty(value = "类型 work工作评议/subject专题评议/officer两官评议",required = true)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 评议主题
|
||||
*/
|
||||
@ApiModelProperty(value = "评议主题(评议部门,评议专题,评议对象)",required = true)
|
||||
private String reviewSubject;
|
||||
|
||||
/**
|
||||
* 评议描述
|
||||
*/
|
||||
@ApiModelProperty(value = "评议描述(评议部门描述,评议专题描述,评议对象职位)")
|
||||
private String reviewDesc;
|
||||
|
||||
/**
|
||||
* 提名上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "提名上传时间")
|
||||
private LocalDateTime reviewUploadAt;
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String inReportAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String inReportAttachmentPath;
|
||||
@ApiModelProperty(value = "一级审批人 英文逗号间隔")
|
||||
String inReportAudit1Ids;
|
||||
@ApiModelProperty(value = "二级审批人 英文逗号间隔")
|
||||
String inReportAudit2Ids;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewOpinionStateRequest {
|
||||
|
||||
@ApiModelProperty(value = "评议id", required = true)
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 评议意见备注
|
||||
*/
|
||||
@ApiModelProperty(value = "评议意见备注")
|
||||
private String opinionRemark;
|
||||
|
||||
/**
|
||||
* 评议意见上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "评议意见上传时间")
|
||||
private LocalDateTime opinionUploadAt;
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String opinionAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String opinionAttachmentPath;
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review.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;
|
||||
|
||||
|
||||
@Data
|
||||
public class ReviewResultStateRequest {
|
||||
|
||||
@ApiModelProperty(value = "评议id", required = true)
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 整改备注
|
||||
*/
|
||||
@ApiModelProperty(value = "整改备注")
|
||||
private String alterRemark;
|
||||
|
||||
/**
|
||||
* 整改上传时间
|
||||
*/
|
||||
@DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@JsonFormat(
|
||||
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||
)
|
||||
@ApiModelProperty(value = "整改上传时间")
|
||||
private LocalDateTime alterUploadAt;
|
||||
|
||||
@ApiModelProperty(value = "附件名 英文逗号间隔")
|
||||
String resultAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径 英文逗号间隔")
|
||||
String resultAttachmentPath;
|
||||
|
||||
}
|
|
@ -29,18 +29,18 @@ public class DbReadHead {
|
|||
/**
|
||||
* 出生年月
|
||||
*/
|
||||
@ExcelProperty("出生年月")
|
||||
private String birthday;
|
||||
// @ExcelProperty("出生年月")
|
||||
// private String birthday;
|
||||
/**
|
||||
* 党派
|
||||
*/
|
||||
@ExcelProperty("党派")
|
||||
private String partyCadre;
|
||||
// @ExcelProperty("党派")
|
||||
// private String partyCadre;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ExcelProperty("民族")
|
||||
private String nation;
|
||||
// @ExcelProperty("民族")
|
||||
// private String nation;
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
|
@ -49,8 +49,8 @@ public class DbReadHead {
|
|||
/**
|
||||
* 学历
|
||||
*/
|
||||
@ExcelProperty("学历")
|
||||
private String culture;
|
||||
// @ExcelProperty("学历")
|
||||
// private String culture;
|
||||
/**
|
||||
* 工作单位及职务
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ public class DbReadHead {
|
|||
/**
|
||||
* 是否连任
|
||||
*/
|
||||
@ExcelProperty("是否连任")
|
||||
private String isReappointment;
|
||||
// @ExcelProperty("是否连任")
|
||||
// private String isReappointment;
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class MyGenerator {
|
|||
public static void main(String[] args) {
|
||||
|
||||
//表名
|
||||
String tableName = "t_report";
|
||||
String tableName = "t_appoint_comment";
|
||||
//表前缀
|
||||
String tablePrefix = "t_";
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.AppointAttachment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职附件 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
public interface AppointAttachmentMapper extends BaseMapper<AppointAttachment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.AppointComment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职评论 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-17
|
||||
*/
|
||||
public interface AppointCommentMapper extends BaseMapper<AppointComment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.Appoint;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
public interface AppointMapper extends BaseMapper<Appoint> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.AppointUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职人员 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
public interface AppointUserMapper extends BaseMapper<AppointUser> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewAttachment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职附件 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
public interface ReviewAttachmentMapper extends BaseMapper<ReviewAttachment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewAudit;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评议审批 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
public interface ReviewAuditMapper extends BaseMapper<ReviewAudit> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewComment;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议评论 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
public interface ReviewCommentMapper extends BaseMapper<ReviewComment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.Review;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评议 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
public interface ReviewMapper extends BaseMapper<Review> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议人员 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
public interface ReviewUserMapper extends BaseMapper<ReviewUser> {
|
||||
|
||||
}
|
|
@ -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.AppointAttachmentMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.AppointCommentMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.AppointMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.AppointUserMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.ReviewAttachmentMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.ReviewAuditMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.ReviewCommentMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.ReviewMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.ReviewUserMapper">
|
||||
|
||||
</mapper>
|
|
@ -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.AppointAttachment;
|
||||
import com.ydool.boot.modules.rddb.mapper.AppointAttachmentMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职附件 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Service
|
||||
public class AppointAttachmentService extends BaseService<AppointAttachmentMapper, AppointAttachment> {
|
||||
|
||||
}
|
|
@ -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.AppointComment;
|
||||
import com.ydool.boot.modules.rddb.mapper.AppointCommentMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职评论 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-17
|
||||
*/
|
||||
@Service
|
||||
public class AppointCommentService extends BaseService<AppointCommentMapper, AppointComment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,331 @@
|
|||
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.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.Appoint;
|
||||
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.appoint.AppointVoteRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.appoint.state.*;
|
||||
import com.ydool.boot.modules.rddb.mapper.AppointMapper;
|
||||
import com.ydool.boot.modules.rddb.wrapper.AppointWrapper;
|
||||
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 org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Service
|
||||
public class AppointService extends BaseService<AppointMapper, Appoint> {
|
||||
|
||||
@Autowired
|
||||
AppointUserService appointUserService;
|
||||
@Autowired
|
||||
AppointAttachmentService appointAttachmentService;
|
||||
@Autowired
|
||||
AppointCommentService appointCommentService;
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
/*后台*/
|
||||
@Transactional
|
||||
public boolean del(String id) {
|
||||
appointUserService.remove(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, id));
|
||||
appointAttachmentService.remove(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, id));
|
||||
return removeById(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Ret adminSaveOrUpdate(AppointBo appointBo, User loginUser) {
|
||||
Appoint appoint = BeanUtil.copyProperties(appointBo, Appoint.class);
|
||||
if (StrUtil.isNotBlank(appoint.getId())) {
|
||||
appoint.setUpdatedId(loginUser.getId());
|
||||
} else {
|
||||
appoint.setCreatedId(loginUser.getId());
|
||||
appoint.setState(Appoint.STATE_CONFERENCE);
|
||||
}
|
||||
saveOrUpdate(appoint);
|
||||
appointBo.setId(appoint.getId());
|
||||
|
||||
//指定人员
|
||||
String conferenceUserIds = appointBo.getConferenceUserIds();
|
||||
String voteUserIds = appointBo.getVoteUserIds();
|
||||
String performUserIds = appointBo.getPerformUserIds();
|
||||
saveAppointUser(appointBo.getId(), conferenceUserIds, loginUser, Appoint.STATE_CONFERENCE);
|
||||
saveAppointUser(appointBo.getId(), voteUserIds, loginUser, Appoint.STATE_VOTE);
|
||||
saveAppointUser(appointBo.getId(), performUserIds, loginUser, Appoint.STATE_PERFORM);
|
||||
|
||||
//保存附件
|
||||
saveAppointAttachment(appointBo.getId(), appointBo.getProposeAttachmentArrStr(), loginUser, Appoint.STATE_PROPOSE);
|
||||
saveAppointAttachment(appointBo.getId(), appointBo.getConferenceAttachmentArrStr(), loginUser, Appoint.STATE_CONFERENCE);
|
||||
saveAppointAttachment(appointBo.getId(), appointBo.getPerformAttachmentArrStr(), loginUser, Appoint.STATE_PERFORM);
|
||||
return Ret.ok();
|
||||
}
|
||||
|
||||
|
||||
/*接口*/
|
||||
@Transactional
|
||||
public Appoint stateProposeSave(AppointProposeStateRequest appointProposeRequest, User loginUser) {
|
||||
Appoint appoint = BeanUtil.copyProperties(appointProposeRequest, Appoint.class);
|
||||
appoint.setState(Appoint.STATE_CONFERENCE);
|
||||
appoint.setCreatedId(loginUser.getId());
|
||||
saveOrUpdate(appoint);
|
||||
saveAppointAttachment(appoint.getId(), appointProposeRequest.getProposeAttachmentName(), appointProposeRequest.getProposeAttachmentPath(), loginUser, Appoint.STATE_PROPOSE);
|
||||
return appoint;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Appoint stateConferenceSave(AppointConferenceStateRequest appointConferenceRequest, User loginUser) {
|
||||
Appoint appoint = getById(appointConferenceRequest.getId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
if (Appoint.STATE_CONFERENCE != appoint.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(appointConferenceRequest, appoint);
|
||||
appoint.setState(Appoint.STATE_SCORE);
|
||||
appoint.setUpdatedId(loginUser.getId());
|
||||
saveOrUpdate(appoint);
|
||||
saveAppointAttachment(appoint.getId(), appointConferenceRequest.getConferenceAttachmentName(), appointConferenceRequest.getConferenceAttachmentPath(), loginUser, Appoint.STATE_CONFERENCE);
|
||||
saveAppointUser(appoint.getId(), appointConferenceRequest.getConferenceUserIds(), loginUser, Appoint.STATE_CONFERENCE);
|
||||
return appoint;
|
||||
}
|
||||
|
||||
public Appoint stateScoreSave(AppointScoreStateRequest appointScoreRequest, User loginUser) {
|
||||
Appoint appoint = getById(appointScoreRequest.getId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
if (Appoint.STATE_SCORE != appoint.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(appointScoreRequest, appoint);
|
||||
appoint.setState(Appoint.STATE_VOTE);
|
||||
appoint.setUpdatedId(loginUser.getId());
|
||||
saveOrUpdate(appoint);
|
||||
return appoint;
|
||||
}
|
||||
|
||||
public Appoint stateVoteSave(AppointVoteStateRequest appointVoteRequest, User loginUser) {
|
||||
Appoint appoint = getById(appointVoteRequest.getId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
BeanUtil.copyProperties(appointVoteRequest, appoint);
|
||||
appoint.setUpdatedId(loginUser.getId());
|
||||
saveOrUpdate(appoint);
|
||||
saveAppointUser(appoint.getId(), appointVoteRequest.getVoteUserIds(), loginUser, Appoint.STATE_VOTE);
|
||||
return appoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* 投票
|
||||
*
|
||||
* @param voteRequest
|
||||
* @param loginUser
|
||||
* @return
|
||||
*/
|
||||
public Ret vote(AppointVoteRequest voteRequest, User loginUser) {
|
||||
Appoint appoint = getById(voteRequest.getAppointId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
AppointUser appointUser = appointUserService.getOne(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, voteRequest.getAppointId())
|
||||
.eq(AppointUser::getType, Appoint.STATE_VOTE)
|
||||
.eq(AppointUser::getUserId, loginUser.getId()));
|
||||
if (appointUser == null) return Ret.fail("您没有投票的权限");
|
||||
if (appointUser.getVote() != 0) return Ret.fail("您已投过票");
|
||||
if (appoint.getState() > Appoint.STATE_VOTE) return Ret.fail("投票已结束,不能操作");
|
||||
appointUser.setVote(voteRequest.getVote());
|
||||
appointUser.setVoteAt(LocalDateTime.now());
|
||||
boolean flag = appointUserService.saveOrUpdate(appointUser);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 投票结束,进入履职环节
|
||||
*
|
||||
* @param id
|
||||
* @param loginUser
|
||||
* @return
|
||||
*/
|
||||
public Ret voteEnd(String id, User loginUser) {
|
||||
Appoint appoint = getById(id);
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
if (!loginUser.getId().equals(appoint.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
|
||||
if (Appoint.STATE_VOTE != appoint.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
// appoint.setState(Appoint.STATE_PUBLIC); 跳过公开环节
|
||||
appoint.setState(Appoint.STATE_PERFORM);
|
||||
boolean flag = saveOrUpdate(appoint);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok().data(AppointWrapper.build().entityVO(appoint));
|
||||
}
|
||||
|
||||
public Appoint statePerformSave(AppointPerformStateRequest appointPerformRequest, User loginUser) {
|
||||
Appoint appoint = getById(appointPerformRequest.getId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
BeanUtil.copyProperties(appointPerformRequest, appoint);
|
||||
appoint.setUpdatedId(loginUser.getId());
|
||||
saveOrUpdate(appoint);
|
||||
saveAppointAttachment(appoint.getId(), appointPerformRequest.getPerformAttachmentName(), appointPerformRequest.getPerformAttachmentPath(), loginUser, Appoint.STATE_PERFORM);
|
||||
saveAppointUser(appoint.getId(), appointPerformRequest.getPerformUserIds(), loginUser, Appoint.STATE_PERFORM);
|
||||
return appoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* 履职打分
|
||||
*
|
||||
* @param performRequest
|
||||
* @param loginUser
|
||||
* @return
|
||||
*/
|
||||
public Ret perform(AppointPerformRequest performRequest, User loginUser) {
|
||||
Appoint appoint = getById(performRequest.getAppointId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
AppointUser appointUser = appointUserService.getOne(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, performRequest.getAppointId())
|
||||
.eq(AppointUser::getType, Appoint.STATE_PERFORM)
|
||||
.eq(AppointUser::getUserId, loginUser.getId()));
|
||||
if (appointUser == null) return Ret.fail("您没有打分的权限");
|
||||
if (appointUser.getScore() != null) return Ret.fail("您已打过分");
|
||||
if (appoint.getState() > Appoint.STATE_PERFORM) return Ret.fail("打分已结束,不能操作");
|
||||
appointUser.setScore(performRequest.getScore());
|
||||
appointUser.setScoreAt(LocalDateTime.now());
|
||||
boolean flag = appointUserService.saveOrUpdate(appointUser);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok();
|
||||
}
|
||||
|
||||
public Ret performEnd(String id, User loginUser) {
|
||||
Appoint appoint = getById(id);
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
if (!loginUser.getId().equals(appoint.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
|
||||
if (Appoint.STATE_PERFORM != appoint.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
appoint.setState(Appoint.STATE_END);
|
||||
boolean flag = saveOrUpdate(appoint);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok().data(AppointWrapper.build().entityVO(appoint));
|
||||
}
|
||||
|
||||
public Ret comment(AppointCommentRequest commentRequest, User loginUser) {
|
||||
Appoint appoint = getById(commentRequest.getAppointId());
|
||||
Assert.notNull(appoint, "未找到该记录");
|
||||
AppointComment appointComment = BeanUtil.copyProperties(commentRequest, AppointComment.class);
|
||||
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
|
||||
* @param loginUser
|
||||
* @param state
|
||||
*/
|
||||
private void saveAppointUser(String appointId, String userIds, User loginUser, Integer state) {
|
||||
if (StrUtil.isNotBlank(userIds)) {
|
||||
List<String> userIdList = Arrays.asList(userIds.split(","));
|
||||
List<AppointUser> userList = new ArrayList<>();
|
||||
userIdList.forEach(userId -> {
|
||||
//1.已存在的不管
|
||||
int count = appointUserService.count(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, appointId)
|
||||
.eq(AppointUser::getUserId, userId)
|
||||
.eq(AppointUser::getType, state));
|
||||
if (count == 0) {
|
||||
//2.只插入新的
|
||||
User user = userService.getById(userId);
|
||||
AppointUser item = new AppointUser();
|
||||
item.setUserId(userId);
|
||||
item.setUserName(user != null ? user.getUserName() : "");
|
||||
item.setType(state);
|
||||
item.setAppointId(appointId);
|
||||
item.setCreatedId(loginUser.getId());
|
||||
item.setCreatedAt(LocalDateTime.now());
|
||||
|
||||
//如果是投票人员默认待投票状态
|
||||
if (Appoint.STATE_VOTE.equals(state)) item.setVote(0);
|
||||
userList.add(item);
|
||||
}
|
||||
});
|
||||
//3.删除本来有而现在没有的
|
||||
appointUserService.remove(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, appointId)
|
||||
.eq(AppointUser::getType, state)
|
||||
.notIn(AppointUser::getUserId, userIdList)
|
||||
);
|
||||
appointUserService.saveBatch(userList);
|
||||
} else {
|
||||
//4.删除全部
|
||||
appointUserService.remove(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, appointId)
|
||||
.eq(AppointUser::getType, state)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param appointId
|
||||
* @param appointAttachmentArrStr
|
||||
* @param loginUser
|
||||
* @param state
|
||||
*/
|
||||
private void saveAppointAttachment(String appointId, String appointAttachmentArrStr, User loginUser, Integer state) {
|
||||
appointAttachmentService.remove(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, appointId)
|
||||
.eq(AppointAttachment::getType, state));
|
||||
if (StrUtil.isNotBlank(appointAttachmentArrStr)) {
|
||||
List<AppointAttachment> appointAttachmentList = JSONObject.parseArray(appointAttachmentArrStr, AppointAttachment.class);
|
||||
appointAttachmentList.forEach(item -> {
|
||||
item.setAppointId(appointId);
|
||||
item.setType(state);
|
||||
item.setCreatedId(loginUser.getId());
|
||||
item.setCreatedAt(LocalDateTime.now());
|
||||
});
|
||||
appointAttachmentService.saveBatch(appointAttachmentList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param appointId
|
||||
* @param attachmentName
|
||||
* @param attachmentPath
|
||||
* @param loginUser
|
||||
* @param state
|
||||
*/
|
||||
private void saveAppointAttachment(String appointId, String attachmentName, String attachmentPath, User loginUser, Integer state) {
|
||||
appointAttachmentService.remove(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, appointId)
|
||||
.eq(AppointAttachment::getType, state));
|
||||
if (StrUtil.isNotBlank(attachmentName)) {
|
||||
String[] nameArr = attachmentName.split(",");
|
||||
String[] pathArr = attachmentPath.split(",");
|
||||
for (int i = 0; i < nameArr.length; i++) {
|
||||
AppointAttachment appointAttachment = new AppointAttachment();
|
||||
appointAttachment.setType(state)
|
||||
.setAppointId(appointId)
|
||||
.setTitle(nameArr[i])
|
||||
.setAttachment(pathArr[i])
|
||||
.setCreatedId(loginUser.getId())
|
||||
.setCreatedAt(LocalDateTime.now());
|
||||
appointAttachmentService.save(appointAttachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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.AppointUser;
|
||||
import com.ydool.boot.modules.rddb.mapper.AppointUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职人员 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Service
|
||||
public class AppointUserService extends BaseService<AppointUserMapper, AppointUser> {
|
||||
|
||||
}
|
|
@ -57,8 +57,8 @@ public class NoticeService extends ServiceImpl<NoticeMapper, Notice> {
|
|||
userIds.forEach(userId -> {
|
||||
Message message = new Message();
|
||||
message.setActionId(entity.getId());
|
||||
message.setTitle(entity.getTitle());
|
||||
message.setContent(entity.getContent());
|
||||
message.setTitle("您有一个新的通知,请前往查看!");
|
||||
message.setContent(entity.getTitle());
|
||||
message.setType(Message.TYPE_NOTICE);
|
||||
message.setStatus(Message.STATUS_UNREAD);
|
||||
message.setUserId(userId);
|
||||
|
|
|
@ -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.ReviewAttachment;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewAttachmentMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职附件 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Service
|
||||
public class ReviewAttachmentService extends BaseService<ReviewAttachmentMapper, ReviewAttachment> {
|
||||
|
||||
}
|
|
@ -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.ReviewAudit;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewAuditMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评议审批 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Service
|
||||
public class ReviewAuditService extends BaseService<ReviewAuditMapper, ReviewAudit> {
|
||||
|
||||
}
|
|
@ -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.ReviewComment;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewCommentMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议评论 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Service
|
||||
public class ReviewCommentService extends BaseService<ReviewCommentMapper, ReviewComment> {
|
||||
|
||||
}
|
|
@ -0,0 +1,381 @@
|
|||
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.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.ReviewBo;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.ReviewAuditRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.ReviewCheckRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.ReviewCommentRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewCheckStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewInReportStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewOpinionStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review.state.ReviewResultStateRequest;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewMapper;
|
||||
import com.ydool.boot.modules.rddb.wrapper.ReviewWrapper;
|
||||
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 org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评议 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Service
|
||||
public class ReviewService extends BaseService<ReviewMapper, Review> {
|
||||
|
||||
@Autowired
|
||||
ReviewAttachmentService reviewAttachmentService;
|
||||
@Autowired
|
||||
ReviewCommentService reviewCommentService;
|
||||
@Autowired
|
||||
ReviewAuditService reviewAuditService;
|
||||
@Autowired
|
||||
ReviewUserService reviewUserService;
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
/*后台*/
|
||||
@Transactional
|
||||
public boolean del(String id) {
|
||||
reviewAttachmentService.remove(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, id));
|
||||
reviewCommentService.remove(new LambdaQueryWrapper<ReviewComment>()
|
||||
.eq(ReviewComment::getReviewId, id));
|
||||
reviewAuditService.remove(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, id));
|
||||
reviewUserService.remove(new LambdaQueryWrapper<ReviewUser>()
|
||||
.eq(ReviewUser::getReviewId, id));
|
||||
return removeById(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Ret adminSaveOrUpdate(ReviewBo reviewBo, User loginUser) {
|
||||
Review review = BeanUtil.copyProperties(reviewBo, Review.class);
|
||||
if (StrUtil.isNotBlank(review.getId())) {
|
||||
review.setUpdatedId(loginUser.getId());
|
||||
} else {
|
||||
review.setState(Review.STATE_IN_REPORT);
|
||||
review.setStatus(0);
|
||||
review.setCreatedId(loginUser.getId());
|
||||
}
|
||||
saveOrUpdate(review);
|
||||
reviewBo.setId(review.getId());
|
||||
|
||||
//指定人员
|
||||
String checkUserIds = reviewBo.getCheckUserIds();
|
||||
String inReportAudit1Ids = reviewBo.getInReportAudit1Ids();
|
||||
String inReportAudit2Ids = reviewBo.getInReportAudit2Ids();
|
||||
saveReviewUser(reviewBo.getId(), checkUserIds, loginUser);
|
||||
saveReviewAudit(reviewBo.getId(), inReportAudit1Ids, loginUser, 1);
|
||||
saveReviewAudit(reviewBo.getId(), inReportAudit2Ids, loginUser, 2);
|
||||
|
||||
//保存附件
|
||||
saveReviewAttachment(reviewBo.getId(), reviewBo.getInReportAttachmentArrStr(), loginUser, Review.STATE_IN_REPORT);
|
||||
saveReviewAttachment(reviewBo.getId(), reviewBo.getCheckAttachmentArrStr(), loginUser, Review.STATE_CHECK);
|
||||
saveReviewAttachment(reviewBo.getId(), reviewBo.getOpinionAttachmentArrStr(), loginUser, Review.STATE_OPINION);
|
||||
saveReviewAttachment(reviewBo.getId(), reviewBo.getResultAttachmentArrStr(), loginUser, Review.STATE_RESULT);
|
||||
return Ret.ok();
|
||||
}
|
||||
|
||||
/*接口*/
|
||||
|
||||
public Ret comment(ReviewCommentRequest reviewCommentRequest, User loginUser) {
|
||||
Review review = getById(reviewCommentRequest.getReviewId());
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
ReviewComment reviewComment = BeanUtil.copyProperties(reviewCommentRequest, ReviewComment.class);
|
||||
reviewComment.setCreatedId(loginUser.getId());
|
||||
reviewComment.setUserId(loginUser.getId());
|
||||
reviewComment.setUserName(loginUser.getUserName());
|
||||
boolean flag = reviewCommentService.saveOrUpdate(reviewComment);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ReviewWrapper.build().entityVO(review));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Review stateInReportSave(ReviewInReportStateRequest reviewInReportStateRequest, User loginUser) {
|
||||
Review review = BeanUtil.copyProperties(reviewInReportStateRequest, Review.class);
|
||||
review.setState(Review.STATE_IN_REPORT);
|
||||
review.setStatus(0);
|
||||
review.setCreatedId(loginUser.getId());
|
||||
saveOrUpdate(review);
|
||||
saveReviewAttachment(review.getId(), reviewInReportStateRequest.getInReportAttachmentName(), reviewInReportStateRequest.getInReportAttachmentPath(), loginUser, Review.STATE_IN_REPORT);
|
||||
saveReviewAudit(review.getId(), reviewInReportStateRequest.getInReportAudit1Ids(), loginUser, 1);
|
||||
saveReviewAudit(review.getId(), reviewInReportStateRequest.getInReportAudit2Ids(), loginUser, 2);
|
||||
return review;
|
||||
}
|
||||
|
||||
public Ret audit(ReviewAuditRequest reviewAuditRequest, User loginUser) {
|
||||
ReviewAudit reviewAudit = reviewAuditService.getOne(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewAuditRequest.getReviewId())
|
||||
.eq(ReviewAudit::getLevel, reviewAuditRequest.getLevel())
|
||||
.eq(ReviewAudit::getUserId, loginUser.getId()));
|
||||
if (reviewAudit == null) return Ret.fail("未找到该记录");
|
||||
if (reviewAudit.getStatus() != 0) return Ret.fail("您已审核过");
|
||||
|
||||
Review review = getById(reviewAuditRequest.getReviewId());
|
||||
if (review == null) return Ret.fail("未找到该记录");
|
||||
if (review.getStatus() != 0) return Ret.fail("该评议不是已不是待审批状态");
|
||||
|
||||
//本人前面还有待审批的
|
||||
int beforeWaitCount = reviewAuditService.count(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewAuditRequest.getReviewId())
|
||||
.lt(ReviewAudit::getSortNo, reviewAudit.getSortNo())
|
||||
.eq(ReviewAudit::getStatus, 0));
|
||||
if (beforeWaitCount != 0) return Ret.fail("还未轮到您审批");
|
||||
|
||||
reviewAudit.setStatus(reviewAuditRequest.getStatus());
|
||||
reviewAudit.setReason(reviewAuditRequest.getReason());
|
||||
reviewAudit.setAuditAt(LocalDateTime.now());
|
||||
boolean flag = reviewAuditService.saveOrUpdate(reviewAudit);
|
||||
|
||||
//如果拒绝就整个拒绝
|
||||
if (reviewAudit.getStatus() == 2) {
|
||||
review.setStatus(2);
|
||||
saveOrUpdate(review);
|
||||
}
|
||||
//如果没有待审批的,进入下一阶段
|
||||
int waitAuditCount = reviewAuditService.count(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewAuditRequest.getReviewId())
|
||||
.eq(ReviewAudit::getStatus, 0));
|
||||
if (waitAuditCount == 0) {
|
||||
review.setStatus(1);
|
||||
// review.setState(Review.STATE_REPORT); 直接跳过
|
||||
// review.setState(Review.STATE_ASK); 直接跳过
|
||||
review.setState(Review.STATE_CHECK);
|
||||
saveOrUpdate(review);
|
||||
}
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok();
|
||||
}
|
||||
|
||||
|
||||
public Review stateCheckSave(ReviewCheckStateRequest reviewCheckStateRequest, User loginUser) {
|
||||
Review review = getById(reviewCheckStateRequest.getReviewId());
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
if(Review.STATE_CHECK!=review.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(reviewCheckStateRequest, review);
|
||||
saveOrUpdate(review);
|
||||
|
||||
saveReviewAttachment(review.getId(), reviewCheckStateRequest.getCheckAttachmentName(), reviewCheckStateRequest.getCheckAttachmentPath(), loginUser, Review.STATE_CHECK);
|
||||
saveReviewUser(review.getId(), reviewCheckStateRequest.getCheckUserIds(), loginUser);
|
||||
return review;
|
||||
}
|
||||
|
||||
public Ret check(ReviewCheckRequest reviewCheckRequest, User loginUser) {
|
||||
Review review = getById(reviewCheckRequest.getReviewId());
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
ReviewUser reviewUser = reviewUserService.getOne(new LambdaQueryWrapper<ReviewUser>()
|
||||
.eq(ReviewUser::getReviewId, reviewCheckRequest.getReviewId())
|
||||
.eq(ReviewUser::getUserId, loginUser.getId()));
|
||||
if (reviewUser == null) return Ret.fail("您没有打分的权限");
|
||||
if (reviewUser.getScore() != null) return Ret.fail("您已打过分");
|
||||
if (review.getState() > Review.STATE_CHECK) return Ret.fail("打分已结束,不能操作");
|
||||
reviewUser.setScore(reviewCheckRequest.getScore());
|
||||
reviewUser.setScoreAt(LocalDateTime.now());
|
||||
boolean flag = reviewUserService.saveOrUpdate(reviewUser);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok();
|
||||
}
|
||||
|
||||
public Ret checkEnd(String id, User loginUser) {
|
||||
Review review = getById(id);
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
if(Review.STATE_CHECK!=review.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
if (!loginUser.getId().equals(review.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
|
||||
review.setState(Review.STATE_OPINION);
|
||||
boolean flag = saveOrUpdate(review);
|
||||
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ReviewWrapper.build().entityVO(review));
|
||||
}
|
||||
|
||||
public Review stateOpinionSave(ReviewOpinionStateRequest reviewOpinionStateRequest, User loginUser) {
|
||||
Review review = getById(reviewOpinionStateRequest.getReviewId());
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
if(Review.STATE_OPINION!=review.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(reviewOpinionStateRequest, review);
|
||||
review.setState(Review.STATE_RESULT);
|
||||
saveOrUpdate(review);
|
||||
|
||||
saveReviewAttachment(review.getId(), reviewOpinionStateRequest.getOpinionAttachmentName(), reviewOpinionStateRequest.getOpinionAttachmentPath(), loginUser, Review.STATE_OPINION);
|
||||
return review;
|
||||
}
|
||||
|
||||
public Review stateResultSave(ReviewResultStateRequest reviewResultStateRequest, User loginUser) {
|
||||
Review review = getById(reviewResultStateRequest.getReviewId());
|
||||
Assert.notNull(review, "未找到该记录");
|
||||
if(Review.STATE_RESULT!=review.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(reviewResultStateRequest, review);
|
||||
review.setState(Review.STATE_PUBLIC);
|
||||
saveOrUpdate(review);
|
||||
|
||||
saveReviewAttachment(review.getId(), reviewResultStateRequest.getResultAttachmentName(), reviewResultStateRequest.getResultAttachmentPath(), loginUser, Review.STATE_RESULT);
|
||||
return review;
|
||||
}
|
||||
|
||||
/*公用*/
|
||||
|
||||
/**
|
||||
* @param reviewId
|
||||
* @param userIds
|
||||
* @param loginUser
|
||||
*/
|
||||
private void saveReviewUser(String reviewId, String userIds, User loginUser) {
|
||||
if (StrUtil.isNotBlank(userIds)) {
|
||||
List<String> userIdList = Arrays.asList(userIds.split(","));
|
||||
List<ReviewUser> userList = new ArrayList<>();
|
||||
userIdList.forEach(userId -> {
|
||||
//1.已存在的不管
|
||||
int count = reviewUserService.count(new LambdaQueryWrapper<ReviewUser>()
|
||||
.eq(ReviewUser::getReviewId, reviewId)
|
||||
.eq(ReviewUser::getUserId, userId)
|
||||
);
|
||||
if (count == 0) {
|
||||
//2.只插入新的
|
||||
User user = userService.getById(userId);
|
||||
ReviewUser item = new ReviewUser();
|
||||
item.setUserId(userId);
|
||||
item.setUserName(user != null ? user.getUserName() : "");
|
||||
item.setReviewId(reviewId);
|
||||
item.setCreatedId(loginUser.getId());
|
||||
item.setCreatedAt(LocalDateTime.now());
|
||||
userList.add(item);
|
||||
}
|
||||
});
|
||||
//3.删除本来有而现在没有的
|
||||
reviewUserService.remove(new LambdaQueryWrapper<ReviewUser>()
|
||||
.eq(ReviewUser::getReviewId, reviewId)
|
||||
.notIn(ReviewUser::getUserId, userIdList)
|
||||
);
|
||||
reviewUserService.saveBatch(userList);
|
||||
} else {
|
||||
//4.删除全部
|
||||
reviewUserService.remove(new LambdaQueryWrapper<ReviewUser>()
|
||||
.eq(ReviewUser::getReviewId, reviewId)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reviewId
|
||||
* @param userIds
|
||||
* @param loginUser
|
||||
* @param level
|
||||
*/
|
||||
private void saveReviewAudit(String reviewId, String userIds, User loginUser, Integer level) {
|
||||
if (StrUtil.isNotBlank(userIds)) {
|
||||
List<String> userIdList = Arrays.asList(userIds.split(","));
|
||||
List<ReviewAudit> userList = new ArrayList<>();
|
||||
Iterator<String> iterator = userIdList.iterator();
|
||||
int sortNo;
|
||||
if (level == 1) {
|
||||
sortNo = 1;
|
||||
} else {
|
||||
int level1Count = reviewAuditService.count(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewId)
|
||||
.eq(ReviewAudit::getLevel, 1));
|
||||
sortNo = level1Count + 1;
|
||||
}
|
||||
while (iterator.hasNext()) {
|
||||
String userId = iterator.next();
|
||||
//1.已存在的不管
|
||||
int count = reviewAuditService.count(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewId)
|
||||
.eq(ReviewAudit::getLevel, level)
|
||||
.eq(ReviewAudit::getUserId, userId)
|
||||
);
|
||||
if (count == 0) {
|
||||
//2.只插入新的
|
||||
User user = userService.getById(userId);
|
||||
ReviewAudit item = new ReviewAudit();
|
||||
item.setUserId(userId);
|
||||
item.setUserName(user != null ? user.getUserName() : "");
|
||||
item.setReviewId(reviewId);
|
||||
item.setStatus(0);
|
||||
item.setLevel(level);
|
||||
item.setSortNo(sortNo++);
|
||||
item.setCreatedId(loginUser.getId());
|
||||
item.setCreatedAt(LocalDateTime.now());
|
||||
userList.add(item);
|
||||
}
|
||||
}
|
||||
//3.删除本来有而现在没有的
|
||||
reviewAuditService.remove(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewId)
|
||||
.eq(ReviewAudit::getLevel, level)
|
||||
.notIn(ReviewAudit::getUserId, userIdList)
|
||||
);
|
||||
reviewAuditService.saveBatch(userList);
|
||||
} else {
|
||||
//4.删除全部
|
||||
reviewAuditService.remove(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, reviewId)
|
||||
.eq(ReviewAudit::getLevel, level)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reviewId
|
||||
* @param reviewAttachmentArrStr
|
||||
* @param loginUser
|
||||
* @param state
|
||||
*/
|
||||
private void saveReviewAttachment(String reviewId, String reviewAttachmentArrStr, User loginUser, Integer state) {
|
||||
reviewAttachmentService.remove(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, reviewId)
|
||||
.eq(ReviewAttachment::getType, state));
|
||||
if (StrUtil.isNotBlank(reviewAttachmentArrStr)) {
|
||||
List<ReviewAttachment> reviewAttachmentList = JSONObject.parseArray(reviewAttachmentArrStr, ReviewAttachment.class);
|
||||
reviewAttachmentList.forEach(item -> {
|
||||
item.setReviewId(reviewId);
|
||||
item.setType(state);
|
||||
item.setCreatedId(loginUser.getId());
|
||||
item.setCreatedAt(LocalDateTime.now());
|
||||
});
|
||||
reviewAttachmentService.saveBatch(reviewAttachmentList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reviewId
|
||||
* @param attachmentName
|
||||
* @param attachmentPath
|
||||
* @param loginUser
|
||||
* @param state
|
||||
*/
|
||||
private void saveReviewAttachment(String reviewId, String attachmentName, String attachmentPath, User loginUser, Integer state) {
|
||||
reviewAttachmentService.remove(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, reviewId)
|
||||
.eq(ReviewAttachment::getType, state));
|
||||
if (StrUtil.isNotBlank(attachmentName)) {
|
||||
String[] nameArr = attachmentName.split(",");
|
||||
String[] pathArr = attachmentPath.split(",");
|
||||
for (int i = 0; i < nameArr.length; i++) {
|
||||
ReviewAttachment reviewAttachment = new ReviewAttachment();
|
||||
reviewAttachment.setType(state)
|
||||
.setReviewId(reviewId)
|
||||
.setTitle(nameArr[i])
|
||||
.setAttachment(pathArr[i])
|
||||
.setCreatedId(loginUser.getId())
|
||||
.setCreatedAt(LocalDateTime.now());
|
||||
reviewAttachmentService.save(reviewAttachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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.ReviewUser;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议人员 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Service
|
||||
public class ReviewUserService extends BaseService<ReviewUserMapper, ReviewUser> {
|
||||
|
||||
}
|
|
@ -34,47 +34,66 @@ public class SyncNameService {
|
|||
private ConferenceService conferenceService;
|
||||
@Autowired
|
||||
private ConferenceUserService conferenceUserService;
|
||||
@Autowired
|
||||
AppointUserService appointUserService;
|
||||
@Autowired
|
||||
AppointCommentService appointCommentService;
|
||||
@Autowired
|
||||
ReviewUserService reviewUserService;
|
||||
@Autowired
|
||||
ReviewAuditService reviewAuditService;
|
||||
@Autowired
|
||||
ReviewCommentService reviewCommentService;
|
||||
|
||||
@Transactional
|
||||
public void sync(User user) {
|
||||
List<ReadFile> readFileList = readFileService.list(new QueryWrapper<ReadFile>().eq("created_id", user.getId()));
|
||||
readFileList.forEach(item -> {
|
||||
item.setUploadUser(user.getUserName());
|
||||
readFileService.updateById(item);
|
||||
});
|
||||
readFileList.forEach(item -> item.setUploadUser(user.getUserName()));
|
||||
readFileService.updateBatchById(readFileList);
|
||||
|
||||
List<ReadFileUser> readFileUserList = readFileUserService.list(new QueryWrapper<ReadFileUser>().eq("user_id", user.getId()));
|
||||
readFileUserList.forEach(item -> {
|
||||
item.setUserName(user.getUserName());
|
||||
readFileUserService.updateById(item);
|
||||
});
|
||||
readFileUserList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
readFileUserService.updateBatchById(readFileUserList);
|
||||
|
||||
List<AuditUser> auditUserList = auditUserService.list(new QueryWrapper<AuditUser>().eq("user_id", user.getId()));
|
||||
auditUserList.forEach(item -> {
|
||||
item.setUserName(user.getUserName());
|
||||
auditUserService.updateById(item);
|
||||
});
|
||||
auditUserList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
auditUserService.updateBatchById(auditUserList);
|
||||
|
||||
List<SuperviseThingUser> superviseThingUserList = superviseThingUserService.list(new QueryWrapper<SuperviseThingUser>().eq("user_id", user.getId()));
|
||||
superviseThingUserList.forEach(item -> {
|
||||
item.setUserName(user.getUserName());
|
||||
superviseThingUserService.updateById(item);
|
||||
});
|
||||
superviseThingUserList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
superviseThingUserService.updateBatchById(superviseThingUserList);
|
||||
|
||||
List<SuperviseThingComment> superviseThingCommentList = superviseThingCommentService.list(new QueryWrapper<SuperviseThingComment>().eq("created_id", user.getId()));
|
||||
superviseThingCommentList.forEach(item -> {
|
||||
item.setName(user.getUserName());
|
||||
superviseThingCommentService.updateById(item);
|
||||
});
|
||||
superviseThingCommentList.forEach(item -> item.setName(user.getUserName()));
|
||||
superviseThingCommentService.updateBatchById(superviseThingCommentList);
|
||||
|
||||
List<Conference> conferenceList = conferenceService.list(new QueryWrapper<Conference>().eq("created_id", user.getId()));
|
||||
conferenceList.forEach(item -> {
|
||||
item.setCreatedUser(user.getUserName());
|
||||
conferenceService.updateById(item);
|
||||
});
|
||||
conferenceList.forEach(item -> item.setCreatedUser(user.getUserName()));
|
||||
conferenceService.updateBatchById(conferenceList);
|
||||
|
||||
List<ConferenceUser> conferenceUserList = conferenceUserService.list(new QueryWrapper<ConferenceUser>().eq("user_id", user.getId()));
|
||||
conferenceUserList.forEach(item -> {
|
||||
item.setUserName(user.getUserName());
|
||||
conferenceUserService.updateById(item);
|
||||
});
|
||||
conferenceUserList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
conferenceUserService.updateBatchById(conferenceUserList);
|
||||
|
||||
List<AppointUser> appointUserList = appointUserService.list(new QueryWrapper<AppointUser>().eq("user_id", user.getId()));
|
||||
appointUserList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
appointUserService.updateBatchById(appointUserList);
|
||||
|
||||
List<AppointComment> appointCommentList = appointCommentService.list(new QueryWrapper<AppointComment>().eq("user_id", user.getId()));
|
||||
appointCommentList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
appointCommentService.updateBatchById(appointCommentList);
|
||||
|
||||
List<ReviewUser> reviewUserList = reviewUserService.list(new QueryWrapper<ReviewUser>().eq("user_id", user.getId()));
|
||||
reviewUserList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
reviewUserService.updateBatchById(reviewUserList);
|
||||
|
||||
List<ReviewAudit> reviewAuditList = reviewAuditService.list(new QueryWrapper<ReviewAudit>().eq("user_id", user.getId()));
|
||||
reviewAuditList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
reviewAuditService.updateBatchById(reviewAuditList);
|
||||
|
||||
List<ReviewComment> reviewCommentList = reviewCommentService.list(new QueryWrapper<ReviewComment>().eq("user_id", user.getId()));
|
||||
reviewCommentList.forEach(item -> item.setUserName(user.getUserName()));
|
||||
reviewCommentService.updateBatchById(reviewCommentList);
|
||||
}
|
||||
|
||||
}
|
|
@ -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.html";
|
||||
return "modules/rddb/activity/assign_user.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.ydool.boot.modules.rddb.web;
|
||||
|
||||
|
||||
import com.ydool.boot.modules.sys.web.BaseAdminController;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职附件 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/appointAttachment")
|
||||
public class AppointAttachmentController extends BaseAdminController {
|
||||
|
||||
}
|
|
@ -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-05-17
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/appointComment")
|
||||
public class AppointCommentController extends BaseController {
|
||||
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
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.Appoint;
|
||||
import com.ydool.boot.modules.rddb.entity.AppointAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.bo.AppointBo;
|
||||
import com.ydool.boot.modules.rddb.service.AppointAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.AppointService;
|
||||
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-05-05
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${ydool.path}/rddb/appoint")
|
||||
public class AppointController extends BaseAdminController {
|
||||
@Autowired
|
||||
private AppointService appointService;
|
||||
@Autowired
|
||||
AppointAttachmentService appointAttachmentService;
|
||||
|
||||
@GetMapping
|
||||
public String index() {
|
||||
return "modules/rddb/appoint/index.html";
|
||||
}
|
||||
|
||||
@PostMapping("list")
|
||||
@ResponseBody
|
||||
public void list(Appoint appoint) {
|
||||
QueryWrapper<Appoint> wrapper = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(appoint.getProposeName())) wrapper.like("propose_name", appoint.getProposeName());
|
||||
wrapper.orderByDesc("created_at");
|
||||
Page page = appointService.page(new Page(getPageNum(), getPageSize()), wrapper);
|
||||
render(Ret.ok().paged(page));
|
||||
}
|
||||
|
||||
@PreAuth("rddb:appoint:form")
|
||||
@GetMapping("form")
|
||||
public String form(String id, Model model)throws Exception {
|
||||
Appoint appoint = new Appoint();
|
||||
if (ObjectUtil.isNotEmpty(id)) {
|
||||
appoint = appointService.getById(id);
|
||||
List<AppointAttachment> proposeAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, id)
|
||||
.eq(AppointAttachment::getType,Appoint.STATE_PROPOSE));
|
||||
List<AppointAttachment> conferenceAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, id)
|
||||
.eq(AppointAttachment::getType,Appoint.STATE_CONFERENCE));
|
||||
List<AppointAttachment> performAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, id)
|
||||
.eq(AppointAttachment::getType,Appoint.STATE_PERFORM));
|
||||
model.addAttribute("proposeAttachmentListStr", JsonMapper.getInstance().writeValueAsString(proposeAttachmentList));
|
||||
model.addAttribute("conferenceAttachmentListStr", JsonMapper.getInstance().writeValueAsString(conferenceAttachmentList));
|
||||
model.addAttribute("performAttachmentListStr", JsonMapper.getInstance().writeValueAsString(performAttachmentList));
|
||||
}
|
||||
model.addAttribute("appoint", appoint);
|
||||
return "modules/rddb/appoint/form.html";
|
||||
}
|
||||
|
||||
@PostMapping("save")
|
||||
@ResponseBody
|
||||
public void save(@Validated AppointBo appointBo) {
|
||||
render(appointService.adminSaveOrUpdate(appointBo, getLoginUser()));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public void delete(String id) {
|
||||
boolean flag = appointService.del(id);
|
||||
renderJson(!flag ? Ret.fail("操作失败") : Ret.ok());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
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.modules.rddb.entity.AppointUser;
|
||||
import com.ydool.boot.modules.rddb.service.AppointUserService;
|
||||
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 com.ydool.boot.modules.sys.web.BaseAdminController;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任免督职人员 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-05
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${ydool.path}/rddb/appoint_user")
|
||||
public class AppointUserController extends BaseAdminController {
|
||||
|
||||
@Autowired
|
||||
private AppointUserService appointUserService;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@RequestMapping("list")
|
||||
@ResponseBody
|
||||
public void list(String id,String type) {
|
||||
QueryWrapper<AppointUser> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("appoint_id", id);
|
||||
wrapper.eq("type", type);
|
||||
wrapper.orderByDesc("created_at");
|
||||
Page page = appointUserService.page(new Page(getPageNum(), getPageSize()), wrapper);
|
||||
render(Ret.ok().paged(page));
|
||||
}
|
||||
|
||||
@GetMapping("to_assign")
|
||||
public String toAssign( Model model) {
|
||||
model.addAllAttributes(WebUtils.getParameters(request));
|
||||
return "modules/rddb/assign.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择user列表,过滤已选中人员
|
||||
*
|
||||
* @param userIds
|
||||
*/
|
||||
@RequestMapping("assign_list")
|
||||
@ResponseBody
|
||||
public void assignList(String userIds,String userName,String loginName) {
|
||||
QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
|
||||
userQueryWrapper.notIn("id", userIds.split(","));
|
||||
if(StrUtil.isNotBlank(userName)) userQueryWrapper.like("user_name",userName);
|
||||
userQueryWrapper.like(StrUtil.isNotBlank(loginName),"AES_DECRYPT(from_base64 (login_name),'"+ CodecUtils.KEY +"')",loginName);
|
||||
Page page = userService.page(new Page(getPageNum(), getPageSize()), userQueryWrapper);
|
||||
render(Ret.ok().paged(UserDtoWrapper.build().pageVO(page)));
|
||||
}
|
||||
}
|
|
@ -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.html";
|
||||
return "modules/rddb/audit/assign_user.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.html";
|
||||
return "modules/rddb/conference/assign_user.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.html";
|
||||
return "modules/rddb/readfile/assign_user.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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-05-12
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/reviewAttachment")
|
||||
public class ReviewAttachmentController extends BaseController {
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
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.modules.rddb.entity.ReviewAudit;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewAuditService;
|
||||
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 com.ydool.boot.modules.sys.web.BaseAdminController;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 评议审批 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${ydool.path}/rddb/review_audit")
|
||||
public class ReviewAuditController extends BaseAdminController {
|
||||
|
||||
@Autowired
|
||||
private ReviewAuditService reviewAuditService;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@RequestMapping("list")
|
||||
@ResponseBody
|
||||
public void list(String id, String type) {
|
||||
QueryWrapper<ReviewAudit> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("review_id", id);
|
||||
wrapper.eq(StrUtil.isNotBlank(type), "level", type);
|
||||
wrapper.orderByAsc("sort_no");
|
||||
Page page = reviewAuditService.page(new Page(getPageNum(), getPageSize()), wrapper);
|
||||
render(Ret.ok().paged(page));
|
||||
}
|
||||
|
||||
@GetMapping("to_assign")
|
||||
public String toAssign( Model model) {
|
||||
model.addAllAttributes(WebUtils.getParameters(request));
|
||||
return "modules/rddb/assign.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择user列表,过滤已选中人员
|
||||
*
|
||||
* @param userIds
|
||||
*/
|
||||
@RequestMapping("assign_list")
|
||||
@ResponseBody
|
||||
public void assignList(String userIds, String userName, String loginName) {
|
||||
QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
|
||||
userQueryWrapper.notIn("id", userIds.split(","));
|
||||
if (StrUtil.isNotBlank(userName)) userQueryWrapper.like("user_name", userName);
|
||||
userQueryWrapper.like(StrUtil.isNotBlank(loginName), "AES_DECRYPT(from_base64 (login_name),'" + CodecUtils.KEY + "')", loginName);
|
||||
Page page = userService.page(new Page(getPageNum(), getPageSize()), userQueryWrapper);
|
||||
render(Ret.ok().paged(UserDtoWrapper.build().pageVO(page)));
|
||||
}
|
||||
|
||||
}
|
|
@ -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-05-12
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/reviewComment")
|
||||
public class ReviewCommentController extends BaseController {
|
||||
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
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.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.Review;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.bo.ReviewBo;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewAuditService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewUserService;
|
||||
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-05-12
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${ydool.path}/rddb/review")
|
||||
public class ReviewController extends BaseAdminController {
|
||||
@Autowired
|
||||
ReviewService reviewService;
|
||||
@Autowired
|
||||
ReviewUserService reviewUserService;
|
||||
@Autowired
|
||||
ReviewAuditService reviewAuditService;
|
||||
@Autowired
|
||||
ReviewAttachmentService reviewAttachmentService;
|
||||
|
||||
@GetMapping
|
||||
public String index() {
|
||||
return "modules/rddb/review/index.html";
|
||||
}
|
||||
|
||||
@PostMapping("list")
|
||||
@ResponseBody
|
||||
public void list(Review review) {
|
||||
LambdaQueryWrapper<Review> wrapper = new LambdaQueryWrapper<Review>();
|
||||
if (StringUtils.isNotBlank(review.getType())) wrapper.eq(Review::getType, review.getType());
|
||||
if (StringUtils.isNotBlank(review.getReviewSubject()))
|
||||
wrapper.like(Review::getReviewSubject, review.getReviewSubject());
|
||||
if (review.getState()!=null) wrapper.eq(Review::getState, review.getState());
|
||||
if (review.getStatus()!=null) wrapper.eq(Review::getStatus, review.getStatus());
|
||||
wrapper.orderByDesc(Review::getCreatedAt);
|
||||
Page page = reviewService.page(new Page(getPageNum(), getPageSize()), wrapper);
|
||||
render(Ret.ok().paged(page));
|
||||
}
|
||||
|
||||
@PreAuth("rddb:review:form")
|
||||
@GetMapping("form")
|
||||
public String form(String id, Model model) throws Exception {
|
||||
Review review = new Review();
|
||||
if (ObjectUtil.isNotEmpty(id)) {
|
||||
review = reviewService.getById(id);
|
||||
List<ReviewAttachment> inReportAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, id)
|
||||
.eq(ReviewAttachment::getType, Review.STATE_IN_REPORT));
|
||||
List<ReviewAttachment> checkAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, id)
|
||||
.eq(ReviewAttachment::getType, Review.STATE_CHECK));
|
||||
List<ReviewAttachment> opinionAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, id)
|
||||
.eq(ReviewAttachment::getType, Review.STATE_OPINION));
|
||||
List<ReviewAttachment> resultAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, id)
|
||||
.eq(ReviewAttachment::getType, Review.STATE_RESULT));
|
||||
model.addAttribute("inReportAttachmentListStr", JsonMapper.getInstance().writeValueAsString(inReportAttachmentList));
|
||||
model.addAttribute("checkAttachmentListStr", JsonMapper.getInstance().writeValueAsString(checkAttachmentList));
|
||||
model.addAttribute("opinionAttachmentListStr", JsonMapper.getInstance().writeValueAsString(opinionAttachmentList));
|
||||
model.addAttribute("resultAttachmentListStr", JsonMapper.getInstance().writeValueAsString(resultAttachmentList));
|
||||
}
|
||||
model.addAttribute("review", review);
|
||||
return "modules/rddb/review/form.html";
|
||||
}
|
||||
|
||||
@PostMapping("save")
|
||||
@ResponseBody
|
||||
public void save(@Validated ReviewBo reviewBo) {
|
||||
render(reviewService.adminSaveOrUpdate(reviewBo, getLoginUser()));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public void delete(String id) {
|
||||
boolean flag = reviewService.del(id);
|
||||
renderJson(!flag ? Ret.fail("操作失败") : Ret.ok());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
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.modules.rddb.entity.ReviewUser;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewUserService;
|
||||
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 com.ydool.boot.modules.sys.web.BaseAdminController;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议人员 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-05-12
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${ydool.path}/rddb/review_user")
|
||||
public class ReviewUserController extends BaseAdminController {
|
||||
|
||||
@Autowired
|
||||
private ReviewUserService reviewUserService;
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@RequestMapping("list")
|
||||
@ResponseBody
|
||||
public void list(String id) {
|
||||
QueryWrapper<ReviewUser> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("review_id", id);
|
||||
wrapper.orderByDesc("created_at");
|
||||
Page page = reviewUserService.page(new Page(getPageNum(), getPageSize()), wrapper);
|
||||
render(Ret.ok().paged(page));
|
||||
}
|
||||
|
||||
@GetMapping("to_assign")
|
||||
public String toAssign(Model model) {
|
||||
model.addAllAttributes(WebUtils.getParameters(request));
|
||||
return "modules/rddb/assign.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择user列表,过滤已选中人员
|
||||
*
|
||||
* @param userIds
|
||||
*/
|
||||
@RequestMapping("assign_list")
|
||||
@ResponseBody
|
||||
public void assignList(String userIds,String userName,String loginName) {
|
||||
QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
|
||||
userQueryWrapper.notIn("id", userIds.split(","));
|
||||
if(StrUtil.isNotBlank(userName)) userQueryWrapper.like("user_name",userName);
|
||||
userQueryWrapper.like(StrUtil.isNotBlank(loginName),"AES_DECRYPT(from_base64 (login_name),'"+ CodecUtils.KEY +"')",loginName);
|
||||
Page page = userService.page(new Page(getPageNum(), getPageSize()), userQueryWrapper);
|
||||
render(Ret.ok().paged(UserDtoWrapper.build().pageVO(page)));
|
||||
}
|
||||
|
||||
}
|
|
@ -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.html";
|
||||
return "modules/rddb/supervise_thing/assign_user.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.html";
|
||||
return "modules/rddb/voter_suggest/assign_user.html";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
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.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.Appoint;
|
||||
import com.ydool.boot.modules.rddb.entity.AppointAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.AppointUser;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.AppointDto;
|
||||
import com.ydool.boot.modules.rddb.service.AppointAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.AppointUserService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhouyuan
|
||||
* @date 2022年05月16日
|
||||
*/
|
||||
public class AppointWrapper extends BaseWrapper<Appoint, AppointDto> {
|
||||
|
||||
public static AppointWrapper build() {
|
||||
return new AppointWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppointDto entityVO(Appoint appoint) {
|
||||
AppointDto appointDto = BeanUtil.copyProperties(appoint, AppointDto.class);
|
||||
|
||||
AppointAttachmentService appointAttachmentService = SpringUtils.getBean(AppointAttachmentService.class);
|
||||
AppointUserService appointUserService = SpringUtils.getBean(AppointUserService.class);
|
||||
|
||||
List<AppointAttachment> proposeAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||
.eq(AppointAttachment::getType, Appoint.STATE_PROPOSE)
|
||||
.orderByDesc(AppointAttachment::getCreatedAt));
|
||||
List<AppointAttachment> conferenceAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||
.eq(AppointAttachment::getType, Appoint.STATE_CONFERENCE)
|
||||
.orderByDesc(AppointAttachment::getCreatedAt));
|
||||
List<AppointAttachment> performAttachmentList = appointAttachmentService.list(new LambdaQueryWrapper<AppointAttachment>()
|
||||
.eq(AppointAttachment::getAppointId, appoint.getId())
|
||||
.eq(AppointAttachment::getType, Appoint.STATE_PERFORM)
|
||||
.orderByDesc(AppointAttachment::getCreatedAt));
|
||||
|
||||
List<AppointUser> conferenceUserList = appointUserService.list(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, appoint.getId())
|
||||
.eq(AppointUser::getType, Appoint.STATE_CONFERENCE)
|
||||
.orderByDesc(AppointUser::getCreatedAt));
|
||||
List<AppointUser> voteUserList = appointUserService.list(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, appoint.getId())
|
||||
.eq(AppointUser::getType, Appoint.STATE_VOTE)
|
||||
.orderByDesc(AppointUser::getCreatedAt));
|
||||
List<AppointUser> performUserList = appointUserService.list(new LambdaQueryWrapper<AppointUser>()
|
||||
.eq(AppointUser::getAppointId, appoint.getId())
|
||||
.eq(AppointUser::getType, Appoint.STATE_PERFORM)
|
||||
.orderByDesc(AppointUser::getCreatedAt));
|
||||
|
||||
appointDto.setProposeAttachmentList(proposeAttachmentList);
|
||||
appointDto.setConferenceAttachmentList(conferenceAttachmentList);
|
||||
appointDto.setPerformAttachmentList(performAttachmentList);
|
||||
|
||||
appointDto.setConferenceUserList(conferenceUserList);
|
||||
appointDto.setVoteUserList(voteUserList);
|
||||
appointDto.setPerformUserList(performUserList);
|
||||
|
||||
//打分结束算平均分
|
||||
if (Appoint.STATE_END == appoint.getState()) {
|
||||
//没打分的不算
|
||||
List<AppointUser> scoredAppointUserList = performUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||
BigDecimal averageScore = scoredAppointUserList.stream().map(item -> item.getScore())
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.divide(new BigDecimal(scoredAppointUserList.size()), BigDecimal.ROUND_HALF_UP);
|
||||
appointDto.setAverageScore(averageScore);
|
||||
}
|
||||
//>=投票环节,算通过,拒绝,弃权的票数
|
||||
if (Appoint.STATE_VOTE <= appoint.getState()) {
|
||||
//没投的不算
|
||||
List<AppointUser> agreeAppointUserList = voteUserList.stream().filter(item -> item.getVote() == AppointUser.VOTE_AGREE).collect(Collectors.toList());
|
||||
List<AppointUser> refuseAppointUserList = voteUserList.stream().filter(item -> item.getVote() == AppointUser.VOTE_REFUSE).collect(Collectors.toList());
|
||||
List<AppointUser> abandonAppointUserList = voteUserList.stream().filter(item -> item.getVote() == AppointUser.VOTE_ABANDON).collect(Collectors.toList());
|
||||
appointDto.setAgreeVoteCount(agreeAppointUserList.size());
|
||||
appointDto.setRefuseVoteCount(refuseAppointUserList.size());
|
||||
appointDto.setAbandonVoteCount(abandonAppointUserList.size());
|
||||
}
|
||||
UserInfo userInfo = TokenUtil.getUserInfo();
|
||||
|
||||
//当期用户是否是创建人 (创建人可操作 投票结束,打分结束的按钮)
|
||||
//当期用户是否可投票
|
||||
//当期用户是否可打分
|
||||
appointDto.setIsCreator(false);
|
||||
appointDto.setIsCanVote(false);
|
||||
appointDto.setIsCanPerform(false);
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getId().equals(appoint.getCreatedId())) appointDto.setIsCreator(true);
|
||||
List<String> voteUserIdList = voteUserList.stream().map(AppointUser::getUserId).collect(Collectors.toList());
|
||||
if (voteUserIdList.contains(userInfo.getId())) appointDto.setIsCanVote(true);
|
||||
|
||||
List<String> performUserIdList = performUserList.stream().map(AppointUser::getUserId).collect(Collectors.toList());
|
||||
if (performUserIdList.contains(userInfo.getId())) appointDto.setIsCanPerform(true);
|
||||
}
|
||||
return appointDto;
|
||||
}
|
||||
|
||||
}
|
|
@ -82,13 +82,13 @@ public class DbWrapper extends BaseWrapper<Db, DbVO> {
|
|||
entityHead.setSex(DictUtils.getDictLabel("sys_user_sex", entityHead.getSex()));
|
||||
}
|
||||
//民族
|
||||
if (StrUtil.isNotBlank(entityHead.getNation())) {
|
||||
entityHead.setNation(DictUtils.getDictLabel("sys_nation", entityHead.getNation()));
|
||||
}
|
||||
// if (StrUtil.isNotBlank(entityHead.getNation())) {
|
||||
// entityHead.setNation(DictUtils.getDictLabel("sys_nation", entityHead.getNation()));
|
||||
// }
|
||||
//学历
|
||||
if (StrUtil.isNotBlank(entityHead.getCulture())) {
|
||||
entityHead.setCulture(DictUtils.getDictLabel("sys_culture", entityHead.getCulture()));
|
||||
}
|
||||
// if (StrUtil.isNotBlank(entityHead.getCulture())) {
|
||||
// entityHead.setCulture(DictUtils.getDictLabel("sys_culture", entityHead.getCulture()));
|
||||
// }
|
||||
//选区地址
|
||||
if (StrUtil.isNotBlank(entityHead.getPrecinctAddress())) {
|
||||
entityHead.setPrecinctAddress(StreetUtils.getStreetName(entityHead.getPrecinctAddress()));
|
||||
|
@ -98,9 +98,9 @@ public class DbWrapper extends BaseWrapper<Db, DbVO> {
|
|||
entityHead.setDbIdentity(DictUtils.getDictLabel("sys_db_identity", entityHead.getDbIdentity()));
|
||||
}
|
||||
//是否连任
|
||||
if (StrUtil.isNotBlank(entityHead.getIsReappointment())) {
|
||||
entityHead.setIsReappointment(DictUtils.getDictLabel("sys_yes_no", entityHead.getIsReappointment()));
|
||||
}
|
||||
// if (StrUtil.isNotBlank(entityHead.getIsReappointment())) {
|
||||
// entityHead.setIsReappointment(DictUtils.getDictLabel("sys_yes_no", entityHead.getIsReappointment()));
|
||||
// }
|
||||
|
||||
return (T) entityHead;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
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.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.Review;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewAudit;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewUser;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewDto;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewAuditService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewUserService;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhouyuan
|
||||
* @date 2022年05月16日
|
||||
*/
|
||||
public class ReviewWrapper extends BaseWrapper<Review, ReviewDto> {
|
||||
|
||||
public static ReviewWrapper build() {
|
||||
return new ReviewWrapper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReviewDto entityVO(Review review) {
|
||||
ReviewDto reviewDto = BeanUtil.copyProperties(review, ReviewDto.class);
|
||||
|
||||
ReviewAttachmentService reviewAttachmentService = SpringUtils.getBean(ReviewAttachmentService.class);
|
||||
ReviewUserService reviewUserService = SpringUtils.getBean(ReviewUserService.class);
|
||||
ReviewAuditService reviewAuditService = SpringUtils.getBean(ReviewAuditService.class);
|
||||
JdbcTemplate jdbcTemplate = SpringUtils.getBean(JdbcTemplate.class);
|
||||
|
||||
List<ReviewAttachment> inReportAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, review.getId())
|
||||
.eq(ReviewAttachment::getType, Review.STATE_IN_REPORT)
|
||||
.orderByDesc(ReviewAttachment::getCreatedAt));
|
||||
List<ReviewAttachment> checkAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, review.getId())
|
||||
.eq(ReviewAttachment::getType, Review.STATE_CHECK)
|
||||
.orderByDesc(ReviewAttachment::getCreatedAt));
|
||||
List<ReviewAttachment> opinionAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, review.getId())
|
||||
.eq(ReviewAttachment::getType, Review.STATE_OPINION)
|
||||
.orderByDesc(ReviewAttachment::getCreatedAt));
|
||||
List<ReviewAttachment> resultAttachmentList = reviewAttachmentService.list(new LambdaQueryWrapper<ReviewAttachment>()
|
||||
.eq(ReviewAttachment::getReviewId, review.getId())
|
||||
.eq(ReviewAttachment::getType, Review.STATE_RESULT)
|
||||
.orderByDesc(ReviewAttachment::getCreatedAt));
|
||||
|
||||
List<ReviewAudit> inReportAudit1List = reviewAuditService.list(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, review.getId())
|
||||
.eq(ReviewAudit::getLevel, 1)
|
||||
.orderByDesc(ReviewAudit::getCreatedAt));
|
||||
List<ReviewAudit> inReportAudit2List = reviewAuditService.list(new LambdaQueryWrapper<ReviewAudit>()
|
||||
.eq(ReviewAudit::getReviewId, review.getId())
|
||||
.eq(ReviewAudit::getLevel, 2)
|
||||
.orderByDesc(ReviewAudit::getCreatedAt));
|
||||
List<ReviewUser> checkUserList = reviewUserService.list(new LambdaQueryWrapper<ReviewUser>()
|
||||
.eq(ReviewUser::getReviewId, review.getId())
|
||||
.orderByDesc(ReviewUser::getCreatedAt));
|
||||
|
||||
reviewDto.setInReportAttachmentList(inReportAttachmentList);
|
||||
reviewDto.setCheckAttachmentList(checkAttachmentList);
|
||||
reviewDto.setOpinionAttachmentList(opinionAttachmentList);
|
||||
reviewDto.setResultAttachmentList(resultAttachmentList);
|
||||
|
||||
reviewDto.setInReportAudit1List(inReportAudit1List);
|
||||
reviewDto.setInReportAudit2List(inReportAudit2List);
|
||||
reviewDto.setCheckUserList(checkUserList);
|
||||
|
||||
//打分结束算平均分
|
||||
if (Review.STATE_CHECK < review.getState()) {
|
||||
//没打分的不算
|
||||
List<ReviewUser> scoredReviewUserList = checkUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||
BigDecimal averageScore = scoredReviewUserList.stream().map(item -> item.getScore())
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.divide(new BigDecimal(scoredReviewUserList.size()), BigDecimal.ROUND_HALF_UP);
|
||||
reviewDto.setAverageScore(averageScore);
|
||||
}
|
||||
UserInfo userInfo = TokenUtil.getUserInfo();
|
||||
|
||||
//当期用户是否是创建人 (创建人可操作 打分结束的按钮)
|
||||
//当期用户是否可投票
|
||||
//当期用户是否可打分
|
||||
//是否待我审批
|
||||
reviewDto.setIsCreator(false);
|
||||
reviewDto.setIsCanCheck(false);
|
||||
reviewDto.setIsCanAudit1(false);
|
||||
reviewDto.setIsCanAudit2(false);
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getId().equals(review.getCreatedId())) reviewDto.setIsCreator(true);
|
||||
|
||||
List<String> checkedAudit1List = inReportAudit1List.stream().map(ReviewAudit::getUserId).collect(Collectors.toList());
|
||||
if (checkedAudit1List.contains(userInfo.getId())) reviewDto.setIsCanAudit1(true);
|
||||
List<String> checkedAudit2List = inReportAudit2List.stream().map(ReviewAudit::getUserId).collect(Collectors.toList());
|
||||
if (checkedAudit2List.contains(userInfo.getId())) reviewDto.setIsCanAudit2(true);
|
||||
|
||||
List<String> checkUserIdList = checkUserList.stream().map(ReviewUser::getUserId).collect(Collectors.toList());
|
||||
if (checkUserIdList.contains(userInfo.getId())) reviewDto.setIsCanCheck(true);
|
||||
}
|
||||
return reviewDto;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,879 @@
|
|||
var act = {
|
||||
loadIndex: -1,
|
||||
tabPage: null,
|
||||
uploadCallback: function(ret) {
|
||||
},
|
||||
linkClickSelector: 'a[data-remote]',
|
||||
buttonClickSelector: 'button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)',
|
||||
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
|
||||
formSubmitSelector: 'form',
|
||||
// Form input elements bound by jquery-ujs
|
||||
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
|
||||
|
||||
fire: function (obj, name, data) {
|
||||
var event = $.Event(name);
|
||||
obj.trigger(event, data);
|
||||
return event.result !== false;
|
||||
},
|
||||
isRemote: function (element) {
|
||||
return element.data('remote') !== undefined && element.data('remote') !== false;
|
||||
},
|
||||
handleRemote: function (element) {
|
||||
var method, url, data, dataType, options;
|
||||
dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
|
||||
if (element.is('form')) {
|
||||
method = element.attr('method');
|
||||
url = element.attr('action');
|
||||
data = $(element[0]).serializeArray();
|
||||
} else if (element.is(act.inputChangeSelector)) {
|
||||
method = element.data('method');
|
||||
url = element.data('url');
|
||||
data = element.serialize();
|
||||
} else if (element.is(act.buttonClickSelector)) {
|
||||
method = element.data('method') || 'get';
|
||||
url = element.data('url');
|
||||
data = element.serialize();
|
||||
if (element.data('params')) data = data + '&' + element.data('params');
|
||||
} else {
|
||||
method = element.data('method');
|
||||
url = element[0].href;
|
||||
data = element.data('params') || null;
|
||||
}
|
||||
|
||||
options = {
|
||||
type: method || 'GET', data: data || {}, dataType: dataType,
|
||||
beforeSend: function (xhr, settings) {
|
||||
act.load('提交中,请稍等...');
|
||||
if (settings.dataType === undefined) {
|
||||
xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
|
||||
}
|
||||
if (act.fire(element, 'ajax:beforeSend', [xhr, settings])) {
|
||||
element.trigger('ajax:send', xhr);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
success: function (resp, status, xhr) {
|
||||
element.trigger('ajax:success', [data, status, xhr]);
|
||||
act.ajaxSuccess(resp, status, xhr, element);
|
||||
},
|
||||
complete: function (xhr, status) {
|
||||
element.trigger('ajax:complete', [xhr, status]);
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
element.trigger('ajax:error', [xhr, status, error]);
|
||||
}
|
||||
};
|
||||
if (url) {
|
||||
options.url = url;
|
||||
}
|
||||
return $.ajax(options);
|
||||
},
|
||||
allowAction: function (element) {
|
||||
var message = element.data('confirm');
|
||||
if (message) {
|
||||
act.confirm(message, function () {
|
||||
return act.handleRemote(element);
|
||||
});
|
||||
} else {
|
||||
return act.handleRemote(element);
|
||||
}
|
||||
},
|
||||
ajaxSuccess: function (resp, status, xhr, element) {
|
||||
act.closeLoading();
|
||||
var result = element.data('result');
|
||||
var okHref = element.data('result-url');
|
||||
var okMsg = element.data('result-msg');
|
||||
if (resp.state == -1) {
|
||||
window.location.href = ctx + "/login";
|
||||
return;
|
||||
}
|
||||
if (resp.state == 0 && resp.msg) act.error(resp.msg);
|
||||
if (result) {
|
||||
eval(result)(resp);
|
||||
} else if (resp.state == 1 && okHref) {
|
||||
location.href = okHref;
|
||||
} else if (resp.state == 1 && okMsg) {
|
||||
act.msg(okMsg);
|
||||
}
|
||||
},
|
||||
layer: function () {
|
||||
try {
|
||||
if (parent.layer) {
|
||||
return parent.layer
|
||||
}
|
||||
if (parent.parent.layer) {
|
||||
return parent.parent.layer
|
||||
}
|
||||
if (top.layer) {
|
||||
return top.layer
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
if (window.layer) {
|
||||
return window.layer;
|
||||
}
|
||||
return null;
|
||||
}(),
|
||||
dialog: function (title, url, width, height, btns, type) {
|
||||
var options = {
|
||||
type: type || 2,
|
||||
maxmin: true,
|
||||
shadeClose: false,
|
||||
title: title,
|
||||
area: [width + "px", height + "px"],
|
||||
content: url,
|
||||
contentFormData: {
|
||||
__layer: true
|
||||
},
|
||||
success: function (layero, index) {
|
||||
// console.log($(act.layer.window));
|
||||
// if ($(act.layer.window).width() < width || $(act.layer.window).height() < height) {
|
||||
// act.layer.full(index)
|
||||
// }
|
||||
}
|
||||
};
|
||||
if (btns) {
|
||||
$.extend(options, btns);
|
||||
}
|
||||
act.layer.open(options);
|
||||
},
|
||||
iframeWin: function (layero) {
|
||||
return $("div.layui-layer-content > iframe", layero)[0].contentWindow;
|
||||
},
|
||||
|
||||
parentBtnClick: function (windowName) {
|
||||
parent.$('#' + windowName).closest('.layui-layer').find('.layui-layer-btn0').trigger("click");
|
||||
},
|
||||
confirm: function (msg, callback, autoClose) {
|
||||
act.layer.confirm(msg, {icon: 3, title: '提示'}, function (index) {
|
||||
if (autoClose) act.layer.close(index);
|
||||
if (callback) callback(index);
|
||||
});
|
||||
},
|
||||
confirmUrl: function (msg, url, callback) {
|
||||
act.layer.confirm(msg, {icon: 3, title: '提示'}, function (index) {
|
||||
act.layer.close(index);
|
||||
act.loading();
|
||||
act.post(url, {}, callback);
|
||||
});
|
||||
},
|
||||
msg: function (msg) {
|
||||
toastr.success(msg);
|
||||
},
|
||||
error: function (error) {
|
||||
toastr.error(error, "提示");
|
||||
},
|
||||
loading: function () {
|
||||
act.loadIndex = act.layer.load(1);
|
||||
},
|
||||
load: function (msg) {
|
||||
act.loadIndex = act.layer.msg(msg, {
|
||||
icon: 16
|
||||
, shade: 0.01
|
||||
});
|
||||
},
|
||||
closeLoading: function () {
|
||||
act.layer.close(act.loadIndex);
|
||||
|
||||
},
|
||||
tabPage: function () {
|
||||
if (window.tabPage) {
|
||||
return window.tabPage;
|
||||
}
|
||||
try {
|
||||
if (parent.tabPage) {
|
||||
return parent.tabPage
|
||||
}
|
||||
if (parent.parent.tabPage) {
|
||||
return parent.parent.tabPage
|
||||
}
|
||||
if (top.tabPage) {
|
||||
return top.tabPage
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
return null
|
||||
}(),
|
||||
addTab: function (obj, title, url) {
|
||||
top.prevWindow = window;
|
||||
|
||||
var tabId = obj ? obj.data("tab-id") : null;
|
||||
if (tabId == undefined) {
|
||||
tabId = "tabpanel-" + Math.uuid();
|
||||
obj ? obj.attr("data-tab-id", tabId) : null
|
||||
}
|
||||
|
||||
var tabPage = act.tabPage;
|
||||
|
||||
if (!tabPage || typeof tabPage.addTab != "function" || (!tabPage && (obj.hasClass("btnTool") || obj.hasClass("btnList")) || (obj && obj.data("layer") == true))) {
|
||||
if (act.layer) {
|
||||
var layerWidth, layerHeight, layerLeft, layerTop;
|
||||
if (obj) {
|
||||
layerWidth = obj.data("layerWidth");
|
||||
layerHeight = obj.data("layerHeight");
|
||||
layerLeft = obj.data("layerLeft");
|
||||
layerTop = obj.data("layerTop")
|
||||
}
|
||||
if (layerWidth == null || layerWidth == "") {
|
||||
layerWidth = $(top.window).width();
|
||||
if (layerLeft != null && layerLeft != "") {
|
||||
layerWidth -= parseInt(layerLeft) * 2
|
||||
} else {
|
||||
layerWidth -= 100 * 2
|
||||
}
|
||||
}
|
||||
if (layerHeight == null || layerHeight == "") {
|
||||
layerHeight = $(top.window).height();
|
||||
if (layerTop != null && layerTop != "") {
|
||||
layerHeight -= parseInt(layerTop) * 2
|
||||
} else {
|
||||
layerHeight -= 50 * 2
|
||||
}
|
||||
}
|
||||
act.dialog(title, url, layerWidth, layerHeight);
|
||||
} else {
|
||||
act.winOpen(url, title, "auto", "auto")
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
act.tabPage.addTab({
|
||||
id: tabId,
|
||||
title: title,
|
||||
html: '<script>act.loading();</script><iframe id="' + tabId + '-frame" src="' + url + '" width="100%" height="100%" frameborder="0" onload="act.closeLoading();"></iframe>',
|
||||
closable: true,
|
||||
refresh: false
|
||||
});
|
||||
|
||||
return tabId;
|
||||
},
|
||||
|
||||
winOpen: function (url, name, width, height) {
|
||||
if (!(width && height)) {
|
||||
width = window.screen.width - 200;
|
||||
height = window.screen.height - 150
|
||||
}
|
||||
var top = parseInt((window.screen.height - height) / 2 - 20, 10),
|
||||
left = parseInt((window.screen.width - width) / 2, 10),
|
||||
options = "location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
|
||||
window.open(url, name, options)
|
||||
},
|
||||
winClose: function () {
|
||||
setTimeout(function () {
|
||||
window.opener = null;
|
||||
window.open("", "_self");
|
||||
window.close()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
closeCurrentTabPage: function (preTabCallback) {
|
||||
var tabPage = act.tabPage;
|
||||
|
||||
if (!tabPage || typeof tabPage.closeCurrentTabPage != "function" || window.name.indexOf("layui-layer") != -1) {
|
||||
var layerIndex;
|
||||
if (act.layer) {
|
||||
layerIndex = act.layer.getFrameIndex(window.name)
|
||||
}
|
||||
if (layerIndex) {
|
||||
act.layer.close(layerIndex)
|
||||
} else {
|
||||
act.winClose()
|
||||
}
|
||||
|
||||
if (typeof preTabCallback == "function") {
|
||||
try {
|
||||
preTabCallback(top.prevWindow)
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
tabPage.closeCurrentTabPage(preTabCallback)
|
||||
},
|
||||
ajax: function (url, type, data, func, dataType) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: type,
|
||||
data: data,
|
||||
dataType: dataType || 'json',
|
||||
success: function (resp) {
|
||||
if (func) func(resp);
|
||||
}
|
||||
})
|
||||
},
|
||||
get: function (url, callback, dataType) {
|
||||
act.ajax(url, 'get', null, function (resp) {
|
||||
if (callback) callback(resp);
|
||||
}, dataType);
|
||||
},
|
||||
|
||||
|
||||
post: function (url, data, callback) {
|
||||
act.ajax(url, 'post', data, function (resp) {
|
||||
if (callback) callback(resp);
|
||||
});
|
||||
},
|
||||
put: function (url, data, callback) {
|
||||
act.ajax(url, 'put', data, function (resp) {
|
||||
if (callback) callback(resp);
|
||||
});
|
||||
},
|
||||
delete: function (url, callback) {
|
||||
act.ajax(url, 'delete', {}, function (resp) {
|
||||
if (callback) callback(resp);
|
||||
});
|
||||
},
|
||||
submit: function (form, callback) {
|
||||
var url = form.attr('action'), method = form.attr("method");
|
||||
act.ajax(url, method, form.serializeArray(), callback);
|
||||
},
|
||||
|
||||
submitUrl: function (url, form, callback) {
|
||||
var method = form.attr("method");
|
||||
act.ajax(url, method, form.serializeArray(), callback);
|
||||
},
|
||||
ajaxFormSubmit: function (formJqueryObj, callback, msg) {
|
||||
$(".btn").attr("disabled", true);
|
||||
var options = {};
|
||||
if (typeof callback == "object") {
|
||||
options = callback;
|
||||
callback = options.callback;
|
||||
}
|
||||
act.load(msg == undefined ? '加载中...' : msg);
|
||||
if (options.downloadFile === true) {
|
||||
options.iframe = true
|
||||
}
|
||||
formJqueryObj.ajaxSubmit($.extend(true, {
|
||||
type: "POST",
|
||||
xhrFields: {
|
||||
withCredentials: true
|
||||
},
|
||||
url: formJqueryObj.attr("action"),
|
||||
dataType: "json",
|
||||
error: function (data) {
|
||||
$(".btn").attr("disabled", false);
|
||||
},
|
||||
success: function (data, status, xhr) {
|
||||
$(".btn").attr("disabled", false);
|
||||
act.closeLoading();
|
||||
if (typeof callback == "function") {
|
||||
callback(data, status, xhr)
|
||||
}
|
||||
}
|
||||
}, options));
|
||||
|
||||
if (options.downloadFile === true) {
|
||||
$(".btn").attr("disabled", false);
|
||||
act.closeLoading()
|
||||
}
|
||||
},
|
||||
trim: function (str) {
|
||||
return jQuery.trim(str)
|
||||
},
|
||||
startWith: function (str, start) {
|
||||
var reg = new RegExp("^" + start);
|
||||
return reg.test(str)
|
||||
},
|
||||
startsWith: function (str, prefix) {
|
||||
if (!str || !prefix || str.length < prefix.length) {
|
||||
return false
|
||||
}
|
||||
return str.slice(0, prefix.length) === prefix
|
||||
},
|
||||
endWith: function (str, end) {
|
||||
var reg = new RegExp(end + "$");
|
||||
return reg.test(str)
|
||||
},
|
||||
endsWith: function (str, suffix) {
|
||||
if (!str || !suffix || str.length < suffix.length) {
|
||||
return false
|
||||
}
|
||||
return str.indexOf(suffix, str.length - suffix.length) !== -1
|
||||
},
|
||||
getDictLabel: function (dictListJson, value, defaultValue, inCss) {
|
||||
var result = [];
|
||||
for (var i = 0; i < dictListJson.length; i++) {
|
||||
var row = dictListJson[i];
|
||||
if (("," + value + ",").indexOf("," + row.value + ",") != -1) {
|
||||
var str = "";
|
||||
if (inCss && (row.cssClass || row.cssStyle)) {
|
||||
str += "<span";
|
||||
if (row.cssClass) {
|
||||
str += ' class="' + row.cssClass + '"'
|
||||
}
|
||||
if (row.cssStyle) {
|
||||
str += ' style="' + row.cssStyle + '"'
|
||||
}
|
||||
result.push(str + ">" + row.label + "</span>")
|
||||
} else {
|
||||
result.push(row.label)
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.length > 0 ? result.join(",") : defaultValue
|
||||
},
|
||||
removeParam: function (paramName, url) {
|
||||
var reg = new RegExp("(^|&)" + paramName + "=([^&]*)(&|$)", "i"),
|
||||
params;
|
||||
if (!url || url == "") {
|
||||
params = window.location.search
|
||||
} else {
|
||||
params = url.substring(url.indexOf("?"))
|
||||
}
|
||||
if (params != "") {
|
||||
if (act.startsWith(params, "?") || act.startsWith(params, "&")) {
|
||||
params = params.substr(1)
|
||||
}
|
||||
url = url.substring(0, url.indexOf("?") + 1) + params.replace(reg, "$1");
|
||||
if (act.endsWith(url, "?") || act.endsWith(url, "&")) {
|
||||
return url.substring(0, url.length - 1)
|
||||
}
|
||||
}
|
||||
return url
|
||||
},
|
||||
tpl: function (id, data) {
|
||||
if ($('#' + id).length == 0) return "";
|
||||
return laytpl($('#' + id).html()).render(data || {});
|
||||
},
|
||||
printPage: function (selecter) {
|
||||
$(selecter).printThis({
|
||||
importCSS: false,
|
||||
loadCSS: ctxStatic + '/common/print.css',
|
||||
pageTitle: false,
|
||||
});
|
||||
},
|
||||
upload: function(callback) {
|
||||
act.uploadCallback = function(ret) {
|
||||
if(callback) callback(ret);
|
||||
};
|
||||
$("#layui-upload").click();
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
initToastr();
|
||||
initiCheck();
|
||||
initSelect2();
|
||||
initTreeSelect();
|
||||
initIconSelect();
|
||||
initAreaSelect();
|
||||
initScrollUp();
|
||||
initDatePicker();
|
||||
initFileUpload();
|
||||
|
||||
$('textarea.autoHeight').textareaAutoHieght();
|
||||
|
||||
$(document).on('click.act', act.linkClickSelector, function (e) {
|
||||
var link = $(this);
|
||||
if (act.isRemote(link)) act.allowAction(link);
|
||||
return false;
|
||||
});
|
||||
|
||||
// $(document).on('submit.act', act.formSubmitSelector, function (e) {
|
||||
// var form = $(this);
|
||||
// if (act.isRemote(form)) {
|
||||
// var submitBefore = form.data('before');
|
||||
// if (submitBefore && submitBefore != "") {
|
||||
// if (!eval(submitBefore)(form)) {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// act.allowAction(form);
|
||||
// }
|
||||
// return false;
|
||||
// });
|
||||
|
||||
$(document).on("click", ".addTabPage", function (e) {
|
||||
var $this = $(this),
|
||||
href = $this.data("href") || $this.attr("href"),
|
||||
title = $this.data("title") || $this.attr("title") || $this.text();
|
||||
if (href && href != "" && href != "blank" && !act.startsWith(href, "javascript:")) {
|
||||
act.addTab($this, title, href);
|
||||
return false
|
||||
}
|
||||
return true
|
||||
});
|
||||
|
||||
$(document).on('click', "#btnExport", function (e) {
|
||||
var ids = $('#dataGrid').dataGrid('getSelectRows');
|
||||
var url = $(this).data('export');
|
||||
var form = $(this).data('form');
|
||||
act.ajaxFormSubmit($('#' + form), {
|
||||
url: url + "?ids=" + ids,
|
||||
downloadFile: true
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', "#btnImport", function (e) {
|
||||
var importUrl = $(this).data('import');
|
||||
var downloadUrl = $(this).data('template');
|
||||
act.layer.open({
|
||||
type: 1,
|
||||
area: ['400px'],
|
||||
title: '导入数据',
|
||||
resize: false,
|
||||
scrollbar: true,
|
||||
content: act.tpl('importTpl', {importUrl: importUrl, downloadUrl: downloadUrl}),
|
||||
success: function (layero, index) {
|
||||
//layero.find('input[type="checkbox"]').iCheck();
|
||||
},
|
||||
btn: ['<i class="fa fa-check"></i> 导入', '<i class="fa fa-remove"></i> 关闭'],
|
||||
btn1: function (index, layero) {
|
||||
var form = {
|
||||
inputForm: layero.find('#inputForm'),
|
||||
file: layero.find('#file').val()
|
||||
};
|
||||
if (form.file == '' || (!act.endWith(form.file, '.xls') && !act.endWith(form.file, '.xlsx'))) {
|
||||
act.error('文件不正确,请选择后缀为"xls"或"xlsx"的文件。');
|
||||
return false;
|
||||
}
|
||||
act.ajaxFormSubmit(form.inputForm, function (resp) {
|
||||
if (resp.state == 1) act.msg(resp.msg);
|
||||
else if (resp.state == 0) act.error(resp.msg);
|
||||
page();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function initToastr() {
|
||||
if (typeof toastr != "undefined") {
|
||||
toastr.options.progressBar = true;
|
||||
toastr.options.closeButton = true;
|
||||
toastr.options.timeOut = 2000;
|
||||
toastr.options.positionClass = "toast-bottom-right";
|
||||
}
|
||||
}
|
||||
|
||||
function initiCheck() {
|
||||
if ($.fn.iCheck !== undefined) {
|
||||
$("input[type=checkbox].form-control:not(.noicheck),input[type=radio].form-control:not(.noicheck)").each(function () {
|
||||
$(this).iCheck({
|
||||
checkboxClass: "icheckbox_" + ($(this).data("style") || "minimal-grey"),
|
||||
radioClass: "iradio_" + ($(this).data("style") || "minimal-grey")
|
||||
}).on("ifChanged", function () {
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initSelect2() {
|
||||
if ($.fn.select2 !== undefined) {
|
||||
$("select.form-control:not(.noselect2)").each(function () {
|
||||
var selectionLength = $(this).attr("data-selectionLength");
|
||||
var options = {
|
||||
minimumResultsForSearch: 10,
|
||||
templateResult: function (result, container) {
|
||||
var element = $(result.element),
|
||||
parent = $(container),
|
||||
style = element.attr("style"),
|
||||
clazz = element.attr("class");
|
||||
if (style && style != "") {
|
||||
parent.attr("style", style)
|
||||
}
|
||||
if (clazz && clazz != "") {
|
||||
parent.addClass(clazz)
|
||||
}
|
||||
return result.text
|
||||
}
|
||||
};
|
||||
if (selectionLength != null && selectionLength !== "") {
|
||||
options.maximumSelectionLength = parseInt(selectionLength);
|
||||
}
|
||||
$(this).select2(options).on("change", function () {
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function initTreeSelect() {
|
||||
|
||||
$('.treeselect .form-control, .treeselect .btn').each(function () {
|
||||
$(this).click(function () {
|
||||
var treeselect = $(this).parents(".treeselect");
|
||||
var url = treeselect.data('url');
|
||||
var title = treeselect.data('title');
|
||||
var inputId = treeselect.data("input-id");
|
||||
if (url) {
|
||||
var selectCodes = $("#" + inputId + "Code").val();
|
||||
url = ctx + "/treeselect?url=" + url + "&selectCodes=" + selectCodes + "&t=" + new Date().getTime();
|
||||
act.dialog(title, url, 300, 400, {
|
||||
btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-eraser"></i> 清除'],
|
||||
btn1: function (index, layero) {
|
||||
var win = act.iframeWin(layero);
|
||||
var codes = [], names = [], nodes = win.tree.getSelectedNodes();
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var code = nodes[i]['id'], name = nodes[i]['name'];
|
||||
codes.push(String(code));
|
||||
names.push(String(name));
|
||||
break;
|
||||
}
|
||||
$("#" + inputId + "Code").val(codes.join(',')).change();
|
||||
$("#" + inputId + "Name").val(names.join(',')).change();
|
||||
|
||||
if (typeof treeselectCallback == 'function') {
|
||||
treeselectCallback('parent', 'ok', index, layero, nodes);
|
||||
}
|
||||
|
||||
act.layer.close(index);
|
||||
|
||||
},
|
||||
btn2: function (index, layero) {
|
||||
$("#" + inputId + "Code").val('').change();
|
||||
$("#" + inputId + "Name").val('').change();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function initIconSelect() {
|
||||
|
||||
$('.iconselect .form-control, .iconselect .btn').each(function () {
|
||||
$(this).click(function () {
|
||||
var url = ctx + "/iconselect?url=" + url + "&t=" + new Date().getTime();
|
||||
var inputId = $(this).parents(".iconselect").data("input-id");
|
||||
act.dialog("图片选择", url, $(window).width() - 100, $(window).height() - 100, {
|
||||
success: function (layero, index) {
|
||||
var info = '<span style="color: red" class="pull-left mt10">提示:双击选择图标。</span>';
|
||||
layero.find('.layui-layer-btn').append(info);
|
||||
},
|
||||
btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-eraser"></i> 清除'],
|
||||
btn1: function (index, layero) {
|
||||
var win = act.iframeWin(layero);
|
||||
var icon = win.$("#icon").val();
|
||||
$("#" + inputId + "Icon").attr("class", 'fa fa-fw ' + icon);
|
||||
$("#" + inputId).val(icon).change();
|
||||
act.layer.close(index);
|
||||
},
|
||||
btn2: function (index, layer) {
|
||||
$("#" + inputId + "Icon").attr('class', "fa fa-fw");
|
||||
$("#" + inputId).val('').change();
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function initAreaSelect() {
|
||||
|
||||
$('.areaselect .form-control, .areaselect .btn').each(function () {
|
||||
$(this).click(function () {
|
||||
var areaselect = $(this).parents(".areaselect");
|
||||
var title = areaselect.data('title') || '区域选择';
|
||||
var inputId = areaselect.data("input-id");
|
||||
var level = areaselect.data("level");
|
||||
var ignore = areaselect.data("ignore") || false;
|
||||
var type = areaselect.data('type');
|
||||
var url = ctx + "/areaselect?level=" + level + "&type=" + type + "&t=" + new Date().getTime();
|
||||
act.dialog(title, url, 450, 600, {
|
||||
btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-eraser"></i> 清除'],
|
||||
btn1: function (index, layero) {
|
||||
var win = act.iframeWin(layero);
|
||||
var id = '', name = '', ids = '', names = '', nodes = win.tree.getSelectedNodes();
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
if (ignore || level == nodes[i].level + 1) {
|
||||
id = nodes[i]['id'], name = nodes[i]['name'], names = nodes[i]['names'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$("#" + inputId + "Id").val(id).change();
|
||||
$("#" + inputId + "Names").val(names).change();
|
||||
act.layer.close(index);
|
||||
|
||||
},
|
||||
btn2: function (index, layero) {
|
||||
$("#" + inputId + "Id").val('').change();
|
||||
$("#" + inputId + "Names").val('').change();
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function initTabPanel() {
|
||||
var tab = new TabPanel({
|
||||
renderTo: 'tabpanel',
|
||||
active: 0,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
autoResizable: true,
|
||||
border: 'none',
|
||||
items: [
|
||||
{
|
||||
id: 'home',
|
||||
title: Base64.decode(indexTitle),
|
||||
closable: false,
|
||||
html: '<iframe src="' + ctx + indexUrl + '" width="100%" height="100%" frameborder="0"></iframe>',
|
||||
icon: 'fa fa-home'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
window.tabPage = act.tabPage = tab;
|
||||
window.layer = act.layer = layer;
|
||||
setTimeout(function () {
|
||||
act.tabPage.resize();
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
function initScrollUp() {
|
||||
if ($("#scroll-up").length > 0) {
|
||||
var btnScrollTop = $("#scroll-up"),
|
||||
isVisible = false;
|
||||
$(window).on("scroll.btnScrollTop", function () {
|
||||
var scroll = $(document).scrollTop(),
|
||||
h = $(window).height(),
|
||||
sh = document.body.scrollHeight;
|
||||
if (scroll > parseInt(h / 4) || (scroll > 0 && sh >= h && h + scroll >= sh - 1)) {
|
||||
if (!isVisible) {
|
||||
btnScrollTop.addClass("display");
|
||||
isVisible = true
|
||||
}
|
||||
} else {
|
||||
if (isVisible) {
|
||||
btnScrollTop.removeClass("display");
|
||||
isVisible = false
|
||||
}
|
||||
}
|
||||
}).triggerHandler("scroll.btnScrollTop");
|
||||
btnScrollTop.on("click", function () {
|
||||
$("html,body").animate({
|
||||
scrollTop: 0
|
||||
}, 500);
|
||||
return false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function initDatePicker() {
|
||||
if ($(".datepicker").length > 0) {
|
||||
$(".datepicker").each(function () {
|
||||
var obj = laydate.render({
|
||||
elem: this,
|
||||
eventElem: '#' + $(this).attr('id') + 'GroupButton',
|
||||
trigger: 'click',
|
||||
format: $(this).data('format'),
|
||||
theme: '#1890ff',
|
||||
type: $(this).data('view'),
|
||||
})
|
||||
if ($(this).data('max') != "default") {
|
||||
obj.config.max = $(this).data('max');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initFileUpload() {
|
||||
if ($('.btn-fileupload').length > 0) {
|
||||
$('.btn-fileupload').click(function () {
|
||||
var inputName = $(this).parent().data('input');
|
||||
$('#input-name').val(inputName);
|
||||
$('#input-fileupload').click();
|
||||
});
|
||||
|
||||
$('#input-fileupload').change(function () {
|
||||
if ($(this).val() != '') {
|
||||
act.load("上传中,请稍后...");
|
||||
$('#uploadForm')[0].submit();
|
||||
}
|
||||
});
|
||||
|
||||
$('.btn-fileclear').click(function () {
|
||||
$(this).parent().prev().val('');
|
||||
$(this).addClass('hide');
|
||||
$(this).next().addClass('hide');
|
||||
});
|
||||
|
||||
$('.btn-filedownload').click(function () {
|
||||
var filePath = $(this).parent().prev().val();
|
||||
var url = ctx + "/sys/filemanager/download?path=" + filePath;
|
||||
location.href = url;
|
||||
});
|
||||
}
|
||||
|
||||
if($("#layui-upload").length == 1) {
|
||||
layui.use('upload', function(){
|
||||
var upload = layui.upload;
|
||||
upload.render({
|
||||
elem: '#layui-upload',
|
||||
url: ctx + '/sys/filemanager/upload',
|
||||
data: {type: 'json'},
|
||||
done: function(ret){ //上传后的回调
|
||||
if(act.uploadCallback) {
|
||||
act.uploadCallback(ret);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function fileUploadResult(filePath, input) {
|
||||
act.closeLoading();
|
||||
$('#' + input).val(filePath);
|
||||
$('#input-fileupload').val('');
|
||||
if (filePath == '') {
|
||||
act.error("上传失败...");
|
||||
$('#' + input).siblings('.input-group-btn').find('.btn-fileclear').add('hide');
|
||||
$('#' + input).siblings('.input-group-btn').find('.btn-filedownload').addClass('hide');
|
||||
} else {
|
||||
$('#' + input).siblings('.input-group-btn').find('.btn-fileclear').removeClass('hide');
|
||||
$('#' + input).siblings('.input-group-btn').find('.btn-filedownload').removeClass('hide');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Math.uuid = (function () {
|
||||
var $ = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
||||
return function (_, G) {
|
||||
var C = $, F = [], D = Math.random;
|
||||
G = G || C.length;
|
||||
if (_) {
|
||||
for (var B = 0; B < _; B++) F[B] = C[0 | D() * G]
|
||||
} else {
|
||||
var A = 0, E;
|
||||
F[8] = F[13] = F[18] = F[23] = "-";
|
||||
F[14] = "4";
|
||||
for (B = 0; B < 36; B++) if (!F[B]) {
|
||||
E = 0 | D() * 16;
|
||||
F[B] = C[(B == 19) ? (E & 3) | 8 : E & 15]
|
||||
}
|
||||
}
|
||||
return F.join("")
|
||||
}
|
||||
})();
|
||||
var randomUUID = Math.uuid;
|
||||
(function (a) {
|
||||
a.fn.textareaAutoHieght = function (f) {
|
||||
var h = {
|
||||
maxHeight: null,
|
||||
minHeight: 18 * a(this).attr("rows")
|
||||
},
|
||||
c = a.extend({}, h, f);
|
||||
return a(this).each(function () {
|
||||
a(this).bind("paste cut keydown keyup focus blur", function () {
|
||||
var a = this.style;
|
||||
this.style.height = c.minHeight + "px";
|
||||
if (this.scrollHeight > c.minHeight) {
|
||||
if (c.maxHeight && this.scrollHeight > c.maxHeight) {
|
||||
var b = c.maxHeight;
|
||||
a.overflowY = "scroll"
|
||||
} else b = this.scrollHeight, a.overflowY = "hidden";
|
||||
a.height = b + "px"
|
||||
}
|
||||
}).trigger("blur")
|
||||
})
|
||||
}
|
||||
})(jQuery);
|
|
@ -0,0 +1,136 @@
|
|||
<%
|
||||
/*
|
||||
使用时传入标题名aaa,属性名bbb,要回显的数据集合的json字符串形式ccc
|
||||
其中ccc用到属性:
|
||||
title标题
|
||||
attachment附件路径
|
||||
|
||||
表单提交时候before方法需:
|
||||
var bbbArr = new Array();
|
||||
$.each($(".bbb"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
bbbArr.push(val)
|
||||
});
|
||||
$("[name='bbbArrStr']").val(JSON.stringify(bbbArr));
|
||||
|
||||
后端接收参数:
|
||||
String bbbArrStr
|
||||
*/
|
||||
|
||||
var text = text;
|
||||
var name = name;
|
||||
var listStr = listStr;
|
||||
var list =ParseJson(listStr);
|
||||
var listName=name+"List";
|
||||
%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">
|
||||
${text}:
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" id="${name}" style="display: none" multiple/>
|
||||
<div class="input-group" id="${listName}">
|
||||
<label for="fileMsg"></label>
|
||||
<input id="fileMsg" type="text" name="fileMsg" value="" class="form-control" readonly/>
|
||||
<span class="input-group-btn" data-input="filesFile">
|
||||
<a href="javascript:" class="btn btn-default" title="上传文件"><i class="fa fa-upload"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2"></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="queueList">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped filetable table-hover">
|
||||
<tbody id="${name}uploadFileList" class="ui-sortable">
|
||||
|
||||
<input type="hidden" name="${name}ArrStr">
|
||||
<% for(file in list!){ %>
|
||||
<tr class="template-upload state-error">
|
||||
<input type="hidden" class="${name}" data-val='${toJson(file)}'/>
|
||||
<td class="name">
|
||||
<i class="fa fa-file-text-o"></i> ${file.title}
|
||||
</td>
|
||||
<td class="name"><i class="fa fa-file-text-o">
|
||||
</i> ${file.attachment}
|
||||
</td>
|
||||
<td class="btncancel">
|
||||
<a onclick="deleteFile(this);" class="btn btn-default btn-xs yellow delete"><i class="fa fa-ban"></i> 删除 </a>
|
||||
<a href="${file.attachment}" download class="btn btn-default btn-xs yellow delete"><i class="fa fa-download"></i> 下载 </a>
|
||||
</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("body").on("change", "#${name}", function () {
|
||||
const formData = new FormData();
|
||||
const files = $(this)[0].files;
|
||||
if (files == null) {
|
||||
act.error("请先选择文件");
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
formData.append('files', files[i]);
|
||||
}
|
||||
$.ajax({
|
||||
url: "${ctx}/sys/filemanager/upload_json",
|
||||
type: 'post',
|
||||
cache: false,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
if (result.state === 1) {
|
||||
for (let i = 0; i < result.data.length; i++) {
|
||||
const datum = result.data[i];
|
||||
var html = "<tr id='' data-path='" + datum + "' class='template-upload state-error'>" +
|
||||
" <input type='hidden' class='${name}' data-val=''>" +
|
||||
" <td class='name'><i class='fa fa-file-text-o'></i> " + files[i].name + "</td>" +
|
||||
" <td class='name'><i class='fa fa-file-text-o'></i> " + datum + "</td>" +
|
||||
" <td class='btncancel' >" +
|
||||
" <a onclick='deleteFile(this);' class='btn btn-default btn-xs yellow delete'><i class='fa fa-ban'></i> 删除 </a>" +
|
||||
" <a href='" + datum + "' download class='btn btn-default btn-xs yellow delete'><i class='fa fa-download'></i> 下载 </a>" +
|
||||
" </td>" +
|
||||
" </tr>";
|
||||
$("#${name}uploadFileList").append(html);
|
||||
var obj = {
|
||||
title: files[i].name,
|
||||
attachment: datum
|
||||
};
|
||||
$(".${name}[data-val='']").attr("data-val", JSON.stringify(obj));
|
||||
}
|
||||
} else {
|
||||
act.error(result.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
$('#${listName}').click(function () {
|
||||
$('#${name}').click();
|
||||
});
|
||||
function deleteFile(current) {
|
||||
act.confirm("确定删除该文件吗?", function () {
|
||||
$(current).parent().parent().remove();
|
||||
}, true);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,101 @@
|
|||
<%
|
||||
/*
|
||||
使用时传入id,显示标题名aaa,字段属性名bbb,类型ccc(回显数据时,如果同一张表里人员有类型区别时用)
|
||||
|
||||
表单提交时候before方法需:
|
||||
var bbbIdsArr = [];
|
||||
var bbbData = bbbroleGrid.dataGrid('getRowData');
|
||||
bbbData.map(data => {
|
||||
bbbIdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='bbbIds']").val(bbbIdsArr.join(","));
|
||||
|
||||
后端接收参数:
|
||||
String bbbIds
|
||||
*/
|
||||
|
||||
var id = id;
|
||||
var text = text;
|
||||
var name = name;
|
||||
var type = type!;
|
||||
var remark = remark!;
|
||||
var router = router!;
|
||||
%>
|
||||
<script src="${ctxStatic}/jqGrid/js/jquery.jqGrid.min.js"></script>
|
||||
<script src="${ctxStatic}/jqGrid/js/jquery.jqGrid.extend.js"></script>
|
||||
<script src="${ctxStatic}/jqGrid/js/zh_CN.js"></script>
|
||||
<script type="text/javascript" src="/static/act.js"></script>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">
|
||||
${text!}:
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<div style="margin-bottom: 10px;margin-top: -10px;">
|
||||
<a href="javascript:;" class="assign${name!}">
|
||||
<span class="btn btn-default " title="指定人员"><i class="fa fa-plus"></i> 指定人员</span>
|
||||
</a>
|
||||
<p style="color: grey;margin: 5px">${remark!}</p>
|
||||
</div>
|
||||
<table id="${name}dataGrid"></table>
|
||||
<input type="hidden" id="${name!}Ids" name="${name!}Ids" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
${name}roleGrid = $("#${name}dataGrid").dataGrid({
|
||||
url: '${ctx}/rddb/${router}/list?id=${id}&type=${type}',
|
||||
columnModel: [
|
||||
{header: 'userId', name: 'userId', sortable: false, width: 100, align: "center", hidden: true},
|
||||
{header: '用户名', name: 'userName', sortable: false, width: 100, align: "center"},
|
||||
{
|
||||
header: '操作', name: 'opt', sortable: false, width: 100, align: "center", formatter(val, obj, row, act) {
|
||||
//移除本行
|
||||
return "<button onclick='$(this).parent().parent().remove()'>删除</button>";
|
||||
}
|
||||
},
|
||||
],
|
||||
showCheckbox: false,
|
||||
autoGridHeight: function () {
|
||||
return 'auto';
|
||||
},
|
||||
autoGridWidth: function () {
|
||||
return $('.col-sm-10').width();
|
||||
},
|
||||
gridComplete: function () {
|
||||
act.layer.closeAll();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//选择人员页面
|
||||
$(".assign${name}").on("click", function () {
|
||||
//需要过滤已选中用户id
|
||||
var userIdsArr = [];
|
||||
var datas = ${name}roleGrid.dataGrid('getRowData');
|
||||
datas.map(data => {
|
||||
userIdsArr.push(data.userId);
|
||||
});
|
||||
|
||||
var getUrl = "${ctx}/rddb/${router}/to_assign?el=" + "${name}" + "&router=" + "${router}" + "&userIds=" + userIdsArr.toString();
|
||||
|
||||
act.dialog("指定人员", getUrl, 800, 600, {
|
||||
btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-eraser"></i> 关闭'],
|
||||
btn1: function (index, layero) {
|
||||
var body = act.layer.getChildFrame('body', index);
|
||||
var assignObj = body.find('#${name}').val();
|
||||
//把assignIds换成user对象,放入roleGrid
|
||||
var objs = JSON.parse(assignObj);
|
||||
for (var i = 0; i <= objs.length; i++) {
|
||||
${name}roleGrid.jqGrid('addRowData', i + 1, objs[i]);
|
||||
}
|
||||
act.layer.close(index)
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,146 @@
|
|||
<% layout('/layouts/default.html', {title: '文件审批', libs: ['dataGrid','validate','date','summernote','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-book-open"></i> ${appoint.isNewRecord ? '新增' : '修改'}任免督职
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<act:form id="inputForm" model="${appoint!}" action="${ctx}/rddb/appoint/save" remote="true"
|
||||
before="before" result="updateResult">
|
||||
<input type="hidden" name="id" value="${appoint.id!}">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="form-unit">提名信息</div>
|
||||
<act:title title="" fields="4"/>
|
||||
<act:input text="提名人" name="proposeName" col="1" required="true"/>
|
||||
<act:input text="原职位" name="proposeOldJob" col="1"/>
|
||||
<act:input text="任职" name="proposeNewJob" col="1"/>
|
||||
<act:input text="提名上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="proposeUploadAt" col="1"/>
|
||||
<act:mupload text="提名附件" name="proposeAttachment" listStr="${proposeAttachmentListStr!}"/>
|
||||
|
||||
<div class="form-unit">会议信息</div>
|
||||
<act:title title="" fields="4"/>
|
||||
<act:input text="会议时间" as="date" format="yyyy-MM-dd HH:mm:ss" view="datetime" name="conferenceAt"
|
||||
col="1"/>
|
||||
<act:input text="会议地址" name="conferenceAddress" col="1"/>
|
||||
<act:input text="会议备注" name="conferenceRemark" col="1"/>
|
||||
<act:input text="会议上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" view="datetime"
|
||||
name="conferenceUploadAt" col="1"/>
|
||||
<act:person text="会议人员" router="appoint_user" id="${appoint.id!}" name="conferenceUser"
|
||||
type="${@com.ydool.boot.modules.rddb.entity.Appoint.STATE_CONFERENCE}"
|
||||
remark="tips:如果只指定了会议人员,而没有指定其他人员,系统将默认将会议人员同步到其他人员."/>
|
||||
<act:mupload text="会议附件" name="conferenceAttachment" listStr="${conferenceAttachmentListStr!}"/>
|
||||
|
||||
<div class="form-unit">考试信息</div>
|
||||
<act:title title="" fields="3"/>
|
||||
<act:input text="考试时间" as="date" format="yyyy-MM-dd HH:mm:ss" view="datetime" name="examAt" col="1"/>
|
||||
<act:input text="考试成绩" name="examResult" col="1"/>
|
||||
<act:input text="考试上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" view="datetime" name="examUploadAt"
|
||||
col="1"/>
|
||||
|
||||
<div class="form-unit">投票信息</div>
|
||||
<act:title title="" fields="2"/>
|
||||
<act:input text="投票会议时间" as="date" format="yyyy-MM-dd HH:mm:ss" view="datetime" name="voteAt" col="1"/>
|
||||
<act:input text="投票会议地址" name="voteAddress" col="1"/>
|
||||
<act:person text="投票人员" router="appoint_user" id="${appoint.id!}" name="voteUser"
|
||||
type="${@com.ydool.boot.modules.rddb.entity.Appoint.STATE_VOTE}"/>
|
||||
|
||||
<div class="form-unit">履职信息</div>
|
||||
<act:title title="" fields="4"/>
|
||||
<act:input text="履职上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" view="datetime" name="performUploadAt"
|
||||
col="1"/>
|
||||
</div>
|
||||
<act:mupload text="履职附件" name="performAttachment" listStr="${performAttachmentListStr!}"/>
|
||||
<act:person text="打分人员" router="appoint_user" id="${appoint.id!}" name="performUser"
|
||||
type="${@com.ydool.boot.modules.rddb.entity.Appoint.STATE_PERFORM}"/>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if(hasAuth('rddb:appoint:save')) { %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>
|
||||
保 存
|
||||
</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel"
|
||||
onclick="act.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</act:form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function before() {
|
||||
var proposeAttachmentArr = new Array();
|
||||
$.each($(".proposeAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
proposeAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='proposeAttachmentArrStr']").val(JSON.stringify(proposeAttachmentArr));
|
||||
|
||||
var conferenceAttachmentArr = new Array();
|
||||
$.each($(".conferenceAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
conferenceAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='conferenceAttachmentArrStr']").val(JSON.stringify(conferenceAttachmentArr));
|
||||
|
||||
var performAttachmentArr = new Array();
|
||||
$.each($(".performAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
performAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='performAttachmentArrStr']").val(JSON.stringify(performAttachmentArr));
|
||||
|
||||
var conferenceUserIdsArr = [];
|
||||
var conferenceUserData = conferenceUserroleGrid.dataGrid('getRowData');
|
||||
conferenceUserData.map(data => {
|
||||
conferenceUserIdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='conferenceUserIds']").val(conferenceUserIdsArr.join(","));
|
||||
|
||||
var voteUserIdsArr = [];
|
||||
var voteUserData = voteUserroleGrid.dataGrid('getRowData');
|
||||
voteUserData.map(data => {
|
||||
voteUserIdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='voteUserIds']").val(voteUserIdsArr.join(","));
|
||||
|
||||
var performUserIdsArr = [];
|
||||
var performUserData = performUserroleGrid.dataGrid('getRowData');
|
||||
performUserData.map(data => {
|
||||
performUserIdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='performUserIds']").val(performUserIdsArr.join(","));
|
||||
|
||||
//当设置了第一个,而没有设置后面的人员,自动加过去
|
||||
if (conferenceUserIdsArr.length > 0 && voteUserIdsArr.length == 0 && performUserIdsArr.length == 0) {
|
||||
$("[name='voteUserIds']").val($("[name='conferenceUserIds']").val());
|
||||
$("[name='performUserIds']").val($("[name='conferenceUserIds']").val());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateResult(resp) {
|
||||
if (resp.state === 1) {
|
||||
act.closeCurrentTabPage(function (win) {
|
||||
win.$('#dataGrid').dataGrid('refresh');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<% layout('/layouts/default.html', {title: '任免督职管理', libs: ['dataGrid','importExcel','date']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-globe"></i> 任免督职管理
|
||||
</div>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
|
||||
<a href="#" class="btn btn-default" id="btnRefresh" title="刷新"><i class="fa fa-refresh"></i> 刷新</a>
|
||||
<% if(hasAuth("rddb:appoint:add")) { %>
|
||||
<a href="${ctx}/rddb/appoint/form" class="btn btn-default btnTool" title="新增任免督职"><i class="fa fa-plus"></i> 新增</a>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<act:form id="searchForm" action="${ctx}/rddb/appoint/list" method="post" class="form-inline hide">
|
||||
<div class="form-group">
|
||||
<label class="control-label">提名人</label>
|
||||
<div class="control-inline">
|
||||
<act:text name="proposeName" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
</div>
|
||||
</act:form>
|
||||
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $('#searchForm'),
|
||||
rownumbers: true,
|
||||
rownumWidth: 50,
|
||||
showCheckbox: false,
|
||||
columnModel: [
|
||||
{header: '提名人', name: 'proposeName', index: 'proposeName', width: 250, align: "center"},
|
||||
{header: '创建时间', name: 'createdAt', index: 'createdAt', width: 200, align: "center"},
|
||||
{
|
||||
header: '操作',
|
||||
name: 'actions',
|
||||
width: 180,
|
||||
sortable: false,
|
||||
title: false,
|
||||
formatter: function (val, obj, row, act) {
|
||||
var actions = [];
|
||||
|
||||
<% if(hasAuth("rddb:appoint:edit")) { %>
|
||||
actions.push('<a href="${ctx}/rddb/appoint/form?id=' + row.id + '" class="btnList" title="编辑"><i class="fa fa-pencil"></i></a> ');
|
||||
<% } %>
|
||||
<% if(hasAuth("rddb:appoint:del")) { %>
|
||||
actions.push('<a href="${ctx}/rddb/appoint/delete?id=' + row.id + '" class="btnList" title="删除" data-confirm="确认要删除该数据吗?"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<% layout('/layouts/default.html', {title: '文件审批', libs: ['dataGrid','validate','date','summernote','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding: 10px 0 20px;">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<act:form id="searchForm" action="${ctx}/rddb/${router}/assign_list"
|
||||
method="post" class="form-inline ">
|
||||
<div class="form-group">
|
||||
<label class="control-label">登录名</label>
|
||||
<div class="control-inline">
|
||||
<act:text name="loginName" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">用户名</label>
|
||||
<div class="control-inline">
|
||||
<act:text name="userName" maxlength="50"/>
|
||||
</div>
|
||||
<input type="hidden" name="userIds" value="${userIds}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
</div>
|
||||
</act:form>
|
||||
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
<input type="hidden" id="${el}" name="${el}" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
assignGrid = $("#dataGrid").dataGrid({
|
||||
//过滤已选中
|
||||
searchForm: $('#searchForm'),
|
||||
columnModel: [
|
||||
{header: 'id', name: 'id', sortable: false, width: 100, align: "center", hidden: true},
|
||||
{header: '登录名', name: 'loginName', sortable: false, width: 100, align: "center"},
|
||||
{header: '用户名', name: 'userName', sortable: false, width: 100, align: "center"},
|
||||
],
|
||||
showCheckbox: true,
|
||||
multiselect: true,
|
||||
autoGridHeight: function () {
|
||||
return 'auto';
|
||||
},
|
||||
autoGridWidth: function () {
|
||||
return $('.box-body').width() - 20;
|
||||
},
|
||||
onSelectRow: function (rowid, status) {
|
||||
var objArr = [];
|
||||
var assignIds = assignGrid.dataGrid('getSelectRows');
|
||||
for (i = 0; i < assignIds.length; i++) {
|
||||
var obj = assignGrid.jqGrid("getRowData", assignIds[i]);
|
||||
objArr[i] = {userId: assignIds[i], loginName: obj.loginName, userName: obj.userName}
|
||||
}
|
||||
$("#${el}").val(JSON.stringify(objArr));
|
||||
},
|
||||
onSelectAll: function (aRowids, status) {
|
||||
var objArr = [];
|
||||
var assignIds = assignGrid.dataGrid('getSelectRows');
|
||||
for (i = 0; i < assignIds.length; i++) {
|
||||
var obj = assignGrid.jqGrid("getRowData", assignIds[i]);
|
||||
objArr[i] = {userId: assignIds[i], loginName: obj.loginName, userName: obj.userName}
|
||||
}
|
||||
$("#${el}").val(JSON.stringify(objArr));
|
||||
},
|
||||
//实现每次选择之前重置一下选择项
|
||||
beforeSelectRow: function (rowid, e) {
|
||||
assignGrid.dataGrid('resetSelection');
|
||||
return (true);
|
||||
}
|
||||
});
|
||||
|
||||
//移除表头的多选框
|
||||
$("#cb_" + assignGrid[0].id).hide();
|
||||
|
||||
</script>
|
|
@ -0,0 +1,142 @@
|
|||
<% layout('/layouts/default.html', {title: '文件审批', libs: ['dataGrid','validate','date','summernote','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-book-open"></i> ${review.isNewRecord ? '新增' : '修改'}评议
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<act:form id="inputForm" model="${review!}" action="${ctx}/rddb/review/save" remote="true"
|
||||
before="before" result="updateResult">
|
||||
<input type="hidden" name="id" value="${review.id!}">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="form-unit">评议信息</div>
|
||||
<act:title title="" fields="4"/>
|
||||
<act:input text="评议类型" name="type" as="select" dictType="dict_review_type" required="true" />
|
||||
<act:input text="评议主题" name="reviewSubject" col="1" required="true"/>
|
||||
<act:input text="评议描述" name="reviewDesc" col="1"/>
|
||||
<act:input text="上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="reviewUploadAt" col="1"/>
|
||||
<act:mupload text="评议附件" name="inReportAttachment" listStr="${inReportAttachmentListStr!}"/>
|
||||
<act:person text="一级审批人员" router="review_audit" id="${review.id!}" name="inReportAudit1" type="1"
|
||||
remark="tips:如果只指定了一二级审批人员,而没有指定其他人员,系统将默认将一二级审批人员同步到其他人员."/>
|
||||
<act:person text="二级审批人员" router="review_audit" id="${review.id!}" name="inReportAudit2" type="2"/>
|
||||
|
||||
<div class="form-unit">调查信息</div>
|
||||
<act:title title="" fields="3"/>
|
||||
<act:input text="备注" name="checkRemark" col="1"/>
|
||||
<act:input text="上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="checkUploadAt" col="1"/>
|
||||
<act:input text="调查分数是否公开" name="checkScoreState" as="radio" dictType="sys_yes_no"/>
|
||||
<act:mupload text="自查/调查报告" name="checkAttachment" listStr="${checkAttachmentListStr!}"/>
|
||||
<act:person text="打分人员" router="review_user" id="${review.id!}" name="checkUser"/>
|
||||
|
||||
<div class="form-unit">意见信息</div>
|
||||
<act:title title="" fields="2"/>
|
||||
<act:input text="备注" name="opinionRemark" col="1"/>
|
||||
<act:input text="上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="opinionUploadAt" col="1"/>
|
||||
<act:mupload text="评议意见" name="opinionAttachment" listStr="${opinionAttachmentListStr!}"/>
|
||||
|
||||
<div class="form-unit">整改信息</div>
|
||||
<act:title title="" fields="2"/>
|
||||
<act:input text="备注" name="alterRemark" col="1"/>
|
||||
<act:input text="上传时间" as="date" format="yyyy-MM-dd HH:mm:ss" name="alterUploadAt" col="1"/>
|
||||
<act:mupload text="整改结果" name="resultAttachment" listStr="${resultAttachmentListStr!}"/>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if(hasAuth('rddb:review:save')) { %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i>
|
||||
保 存
|
||||
</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel"
|
||||
onclick="act.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</act:form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function before() {
|
||||
var inReportAttachmentArr = new Array();
|
||||
$.each($(".inReportAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
inReportAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='inReportAttachmentArrStr']").val(JSON.stringify(inReportAttachmentArr));
|
||||
|
||||
var checkAttachmentArr = new Array();
|
||||
$.each($(".checkAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
checkAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='checkAttachmentArrStr']").val(JSON.stringify(checkAttachmentArr));
|
||||
|
||||
var opinionAttachmentArr = new Array();
|
||||
$.each($(".opinionAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
opinionAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='opinionAttachmentArrStr']").val(JSON.stringify(opinionAttachmentArr));
|
||||
|
||||
var resultAttachmentArr = new Array();
|
||||
$.each($(".resultAttachment"), function (i, n) {
|
||||
var val = $(n).data("val");
|
||||
resultAttachmentArr.push(val)
|
||||
});
|
||||
$("[name='resultAttachmentArrStr']").val(JSON.stringify(resultAttachmentArr));
|
||||
|
||||
|
||||
var inReportAudit1IdsArr = [];
|
||||
var inReportAudit1Data = inReportAudit1roleGrid.dataGrid('getRowData');
|
||||
inReportAudit1Data.map(data => {
|
||||
inReportAudit1IdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='inReportAudit1Ids']").val(inReportAudit1IdsArr.join(","));
|
||||
|
||||
var inReportAudit2IdsArr = [];
|
||||
var inReportAudit2Data = inReportAudit2roleGrid.dataGrid('getRowData');
|
||||
inReportAudit2Data.map(data => {
|
||||
inReportAudit2IdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='inReportAudit2Ids']").val(inReportAudit2IdsArr.join(","));
|
||||
|
||||
var checkUserIdsArr = [];
|
||||
var checkUserData = checkUserroleGrid.dataGrid('getRowData');
|
||||
checkUserData.map(data => {
|
||||
checkUserIdsArr.push(data.userId);
|
||||
});
|
||||
$("[name='checkUserIds']").val(checkUserIdsArr.join(","));
|
||||
|
||||
|
||||
//当设置了第一个,而没有设置后面的人员,自动加过去
|
||||
var reviewAuditIdsArr = inReportAudit1IdsArr.concat(inReportAudit2IdsArr);
|
||||
if (reviewAuditIdsArr.length > 0 && checkUserIdsArr.length == 0) {
|
||||
$("[name='checkUserIds']").val(reviewAuditIdsArr.join(","));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateResult(resp) {
|
||||
if (resp.state === 1) {
|
||||
act.closeCurrentTabPage(function (win) {
|
||||
win.$('#dataGrid').dataGrid('refresh');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<% layout('/layouts/default.html', {title: '评议管理', libs: ['dataGrid','importExcel','date']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-globe"></i> 评议管理
|
||||
</div>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
|
||||
<a href="#" class="btn btn-default" id="btnRefresh" title="刷新"><i class="fa fa-refresh"></i> 刷新</a>
|
||||
<% if(hasAuth("rddb:review:add")) { %>
|
||||
<a href="${ctx}/rddb/review/form" class="btn btn-default btnTool" title="新增评议"><i
|
||||
class="fa fa-plus"></i> 新增</a>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<act:form id="searchForm" action="${ctx}/rddb/review/list" method="post" class="form-inline hide">
|
||||
<div class="form-group">
|
||||
<label class="control-label">评议主题</label>
|
||||
<div class="control-inline">
|
||||
<act:text name="reviewSubject" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">评议类型</label>
|
||||
<div class="control-inline width-160">
|
||||
<act:select name="type" dictType="dict_review_type"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">审核状态</label>
|
||||
<div class="control-inline width-160">
|
||||
<act:select name="status" dictType="sys_wait_pass_refuse"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||
</div>
|
||||
</act:form>
|
||||
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $('#searchForm'),
|
||||
rownumbers: true,
|
||||
rownumWidth: 50,
|
||||
showCheckbox: false,
|
||||
columnModel: [
|
||||
{header: '评议主题', name: 'reviewSubject', index: 'reviewSubject', width: 250, align: "center"},
|
||||
{header: '创建时间', name: 'createdAt', index: 'createdAt', width: 200, align: "center"},
|
||||
{
|
||||
header: '操作',
|
||||
name: 'actions',
|
||||
width: 180,
|
||||
sortable: false,
|
||||
title: false,
|
||||
formatter: function (val, obj, row, act) {
|
||||
var actions = [];
|
||||
|
||||
<% if (hasAuth("rddb:review:edit")) { %>
|
||||
actions.push('<a href="${ctx}/rddb/review/form?id=' + row.id + '" class="btnList" title="编辑"><i class="fa fa-pencil"></i></a> ');
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%
|
||||
if (hasAuth("rddb:review:del")) { %>
|
||||
actions.push('<a href="${ctx}/rddb/review/delete?id=' + row.id + '" class="btnList" title="删除" data-confirm="确认要删除该数据吗?"><i class="fa fa-trash-o"></i></a> ');
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue