输入框
This commit is contained in:
parent
71d7887bb4
commit
622e8aa95c
|
@ -17,10 +17,7 @@ import com.ydool.boot.modules.rddb.entity.dto.ReviewWorkDto;
|
|||
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkAuditRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCheckRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCommentRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkCheckStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkInReportStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkOpinionStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkResultStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.*;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewWorkCommentService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewWorkService;
|
||||
import com.ydool.boot.modules.rddb.wrapper.ReviewWorkWrapper;
|
||||
|
@ -174,6 +171,17 @@ public class ApiReviewWorkController extends ApiBaseController {
|
|||
render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review)));
|
||||
}
|
||||
|
||||
@ApiOperation("上传自查/调查报告环节2")
|
||||
@PostMapping("state/check2")
|
||||
@ResponseBody
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewWorkDto.class)
|
||||
})
|
||||
public void stateCheckSave2(@RequestBody @Validated WorkCheckRequest workCheckRequest) {
|
||||
ReviewWork review = reviewWorkService.stateCheckSave(workCheckRequest, getApiUser());
|
||||
render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("打分")
|
||||
|
|
|
@ -69,5 +69,10 @@ public class ReviewWorkAttachment extends BaseEntity {
|
|||
*/
|
||||
@ApiModelProperty(value = "会议名称")
|
||||
private String conferenceName;
|
||||
/**
|
||||
* 工作评议自查报告组id
|
||||
*/
|
||||
@ApiModelProperty(value = "工作评议自查报告组id")
|
||||
private String workCheckId;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
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-09-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review_work_check")
|
||||
@Accessors(chain = true)
|
||||
public class ReviewWorkCheck extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者")
|
||||
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 评议id
|
||||
*/
|
||||
@ApiModelProperty(value = "评议id")
|
||||
|
||||
private String reviewId;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
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-09-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("t_review_work_check_user")
|
||||
@Accessors(chain = true)
|
||||
public class ReviewWorkCheckUser extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String createdId;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private String updatedId;
|
||||
|
||||
/**
|
||||
* 工作评议自查报告组id
|
||||
*/
|
||||
@ApiModelProperty(value = "工作评议自查报告组id")
|
||||
private String workCheckId;
|
||||
|
||||
/**
|
||||
* 工作评议Id
|
||||
*/
|
||||
@ApiModelProperty(value = "工作评议Id")
|
||||
private String reviewId;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String dept;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
@ApiModelProperty(value = "用户")
|
||||
private String user;
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.ydool.boot.modules.rddb.entity.dto;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkAttachment;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheck;
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheckUser;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ReviewWorkCheckDto extends ReviewWorkCheck {
|
||||
@ApiModelProperty(value = "附件")
|
||||
private List<ReviewWorkAttachment> reviewWorkAttachments;
|
||||
@ApiModelProperty(value = "评议人员")
|
||||
private List<ReviewWorkCheckUser> reviewWorkUsers;
|
||||
}
|
|
@ -13,7 +13,7 @@ public class ReviewWorkDto extends ReviewWork {
|
|||
@ApiModelProperty(value = "评议附件")
|
||||
List<ReviewWorkAttachment> inReportAttachmentList;
|
||||
@ApiModelProperty(value = "自查/调查报告")
|
||||
List<ReviewWorkAttachment> checkAttachmentList;
|
||||
List<ReviewWorkCheckDto> checkAttachmentList;
|
||||
@ApiModelProperty(value = "评议意见附件")
|
||||
List<ReviewWorkAttachment> opinionAttachmentList;
|
||||
@ApiModelProperty(value = "整改结果附件")
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review_work.state;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CheckAttachment {
|
||||
@ApiModelProperty(value = "附件名")
|
||||
private String checkAttachmentName;
|
||||
@ApiModelProperty(value = "附件路径")
|
||||
private String checkAttachmentPath;
|
||||
|
||||
@ApiModelProperty(value = "附件关联会议id")
|
||||
private String checkAttachmentConferenceId;
|
||||
@ApiModelProperty(value = "附件关联会议名称")
|
||||
private String checkAttachmentConferenceName;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review_work.state;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CheckUser {
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String dept;
|
||||
@ApiModelProperty(value = "人员")
|
||||
private String user;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review_work.state;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WorkCheck {
|
||||
@ApiModelProperty(value = "附件")
|
||||
private List<CheckAttachment> checkAttachments;
|
||||
|
||||
@ApiModelProperty(value = "评议人员")
|
||||
private List<CheckUser> checkUsers;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.ydool.boot.modules.rddb.entity.request.review_work.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;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WorkCheckRequest {
|
||||
|
||||
@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 = "打分人员")
|
||||
private List<String> checkUserIds;
|
||||
|
||||
@ApiModelProperty(value = "附件组")
|
||||
List<WorkCheck> reviewWorkChecks;
|
||||
|
||||
/**
|
||||
* 测评对象
|
||||
*/
|
||||
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
|
||||
private String obj;
|
||||
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ public class MyGenerator {
|
|||
public static void main(String[] args) {
|
||||
|
||||
//表名
|
||||
String tableName = "t_add_user_log";
|
||||
String tableName = "t_review_work_check_user";
|
||||
//表前缀
|
||||
String tablePrefix = "t_";
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheck;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议自查报告组 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-22
|
||||
*/
|
||||
public interface ReviewWorkCheckMapper extends BaseMapper<ReviewWorkCheck> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.mapper;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheckUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议自查报告组关联部门人员 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-22
|
||||
*/
|
||||
public interface ReviewWorkCheckUserMapper extends BaseMapper<ReviewWorkCheckUser> {
|
||||
|
||||
}
|
|
@ -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.ReviewWorkCheckMapper">
|
||||
|
||||
</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.ReviewWorkCheckUserMapper">
|
||||
|
||||
</mapper>
|
|
@ -30,6 +30,15 @@ public class ConferenceAttachmentService extends BaseTreeService<ConferenceAttac
|
|||
return conferenceAttachmentMapper.page(page, conferenceTitle, attachmentTitle);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param conferenceId 所属会议id
|
||||
* @param attachment 附件路径
|
||||
* @param title 附件名
|
||||
* @param headline 议题名
|
||||
* @param userId 用户ID
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
public boolean associationMeeting(String conferenceId, String attachment, String title, String headline, String userId) {
|
||||
boolean flag = false;
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.ydool.boot.modules.rddb.service;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheck;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewWorkCheckMapper;
|
||||
import com.ydool.boot.modules.rddb.service.inter.IReviewWorkCheckService;
|
||||
import com.ydool.boot.core.service.BaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议自查报告组 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-22
|
||||
*/
|
||||
@Service
|
||||
public class ReviewWorkCheckService extends BaseService<ReviewWorkCheckMapper, ReviewWorkCheck> implements IReviewWorkCheckService {
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.ydool.boot.modules.rddb.service;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheckUser;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewWorkCheckUserMapper;
|
||||
import com.ydool.boot.modules.rddb.service.inter.IReviewWorkCheckUserService;
|
||||
import com.ydool.boot.core.service.BaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议自查报告组关联部门人员 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-22
|
||||
*/
|
||||
@Service
|
||||
public class ReviewWorkCheckUserService extends BaseService<ReviewWorkCheckUserMapper, ReviewWorkCheckUser> implements IReviewWorkCheckUserService {
|
||||
|
||||
}
|
|
@ -18,10 +18,7 @@ import com.ydool.boot.modules.rddb.entity.bo.ReviewWorkBo;
|
|||
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkAuditRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCheckRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.ReviewWorkCommentRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkCheckStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkInReportStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkOpinionStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.ReviewWorkResultStateRequest;
|
||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.*;
|
||||
import com.ydool.boot.modules.rddb.mapper.ReviewWorkMapper;
|
||||
import com.ydool.boot.modules.rddb.wrapper.ReviewWorkWrapper;
|
||||
import com.ydool.boot.modules.sys.entity.User;
|
||||
|
@ -56,6 +53,13 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
@Autowired
|
||||
ConferenceAttachmentService conferenceAttachmentService;
|
||||
|
||||
@Autowired
|
||||
ReviewWorkCheckService reviewWorkCheckService;
|
||||
|
||||
@Autowired
|
||||
ReviewWorkCheckUserService reviewWorkCheckUserService;
|
||||
|
||||
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
|
@ -97,10 +101,14 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
saveReviewWorkAudit(reviewWorkBo.getId(), inReportAudit2Ids, loginUser, 2);
|
||||
|
||||
//保存附件
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getInReportAttachmentArrStr(), loginUser, ReviewWork.STATE_IN_REPORT);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getCheckAttachmentArrStr(), loginUser, ReviewWork.STATE_CHECK);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getOpinionAttachmentArrStr(), loginUser, ReviewWork.STATE_OPINION);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getResultAttachmentArrStr(), loginUser, ReviewWork.STATE_RESULT);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getInReportAttachmentArrStr(), loginUser,
|
||||
ReviewWork.STATE_IN_REPORT);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getCheckAttachmentArrStr(), loginUser,
|
||||
ReviewWork.STATE_CHECK);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getOpinionAttachmentArrStr(), loginUser,
|
||||
ReviewWork.STATE_OPINION);
|
||||
saveReviewWorkAttachment(reviewWorkBo.getId(), reviewWorkBo.getResultAttachmentArrStr(), loginUser,
|
||||
ReviewWork.STATE_RESULT);
|
||||
|
||||
// if (isNew) {
|
||||
// sendMsg(reviewWork, loginUser, reviewWorkBo.getInReportAudit1Ids().split(",")[0]);
|
||||
|
@ -145,7 +153,8 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
saveOrUpdate(reviewWork);
|
||||
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAttachmentName(),
|
||||
reviewWorkInReportStateRequest.getInReportAttachmentPath(), loginUser, ReviewWork.STATE_IN_REPORT,
|
||||
reviewWorkInReportStateRequest.getInReportAttachmentConferenceId(), reviewWorkInReportStateRequest.getInReportAttachmentConferenceName());
|
||||
reviewWorkInReportStateRequest.getInReportAttachmentConferenceId(),
|
||||
reviewWorkInReportStateRequest.getInReportAttachmentConferenceName());
|
||||
saveReviewWorkAudit(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAudit1Ids(), loginUser, 1);
|
||||
saveReviewWorkAudit(reviewWork.getId(), reviewWorkInReportStateRequest.getInReportAudit2Ids(), loginUser, 2);
|
||||
return reviewWork;
|
||||
|
@ -202,17 +211,91 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
public ReviewWork stateCheckSave(ReviewWorkCheckStateRequest reviewWorkCheckStateRequest, User loginUser) {
|
||||
ReviewWork reviewWork = getById(reviewWorkCheckStateRequest.getReviewId());
|
||||
Assert.notNull(reviewWork, "未找到该记录");
|
||||
if (ReviewWork.STATE_CHECK != reviewWork.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
if (ReviewWork.STATE_CHECK != reviewWork.getState())
|
||||
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(reviewWorkCheckStateRequest, reviewWork);
|
||||
saveOrUpdate(reviewWork);
|
||||
|
||||
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkCheckStateRequest.getCheckAttachmentName(),
|
||||
reviewWorkCheckStateRequest.getCheckAttachmentPath(), loginUser, ReviewWork.STATE_CHECK,
|
||||
reviewWorkCheckStateRequest.getCheckAttachmentConferenceId(), reviewWorkCheckStateRequest.getCheckAttachmentConferenceName());
|
||||
reviewWorkCheckStateRequest.getCheckAttachmentConferenceId(),
|
||||
reviewWorkCheckStateRequest.getCheckAttachmentConferenceName());
|
||||
saveReviewWorkUser(reviewWork.getId(), reviewWorkCheckStateRequest.getCheckUserIds(), loginUser);
|
||||
return reviewWork;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public ReviewWork stateCheckSave(WorkCheckRequest workCheckRequest, User loginUser) {
|
||||
ReviewWork reviewWork = getById(workCheckRequest.getReviewId());
|
||||
Assert.notNull(reviewWork, "未找到该记录");
|
||||
if (ReviewWork.STATE_CHECK != reviewWork.getState())
|
||||
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(workCheckRequest, reviewWork);
|
||||
saveOrUpdate(reviewWork);
|
||||
saveReviewWorkCheck(reviewWork,workCheckRequest,loginUser);
|
||||
saveReviewWorkUser(reviewWork.getId(), workCheckRequest.getCheckUserIds().toString(), loginUser);
|
||||
return reviewWork;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
private void saveReviewWorkCheck(ReviewWork reviewWork, WorkCheckRequest workCheckRequest, User loginUser) {
|
||||
//删除之前记录
|
||||
reviewWorkCheckService.remove(new QueryWrapper<ReviewWorkCheck>().eq("review_id",
|
||||
workCheckRequest.getReviewId()));
|
||||
reviewWorkCheckUserService.remove(new QueryWrapper<ReviewWorkCheckUser>().eq("review_id",
|
||||
workCheckRequest.getReviewId()));
|
||||
reviewWorkAttachmentService.remove(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, workCheckRequest.getReviewId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK));
|
||||
|
||||
|
||||
List<WorkCheck> reviewWorkChecks = workCheckRequest.getReviewWorkChecks();
|
||||
if (CollectionUtil.isNotEmpty(reviewWorkChecks)) {
|
||||
reviewWorkChecks.stream().forEach(workCheck -> {
|
||||
//新增附件组
|
||||
ReviewWorkCheck reviewWorkCheck = new ReviewWorkCheck().setReviewId(workCheckRequest.getReviewId());
|
||||
reviewWorkCheckService.saveOrUpdate(reviewWorkCheck);
|
||||
workCheck.getCheckAttachments();
|
||||
|
||||
//新增附件
|
||||
List<CheckAttachment> checkAttachments = workCheck.getCheckAttachments();
|
||||
if (CollectionUtil.isNotEmpty(checkAttachments)) {
|
||||
List<ReviewWorkAttachment> reviewWorkAttachments = new ArrayList<ReviewWorkAttachment>();
|
||||
checkAttachments.stream().forEach(checkAttachment -> {
|
||||
ReviewWorkAttachment reviewAttachment = new ReviewWorkAttachment();
|
||||
reviewAttachment.setType(reviewWork.getState()).setConferenceId(checkAttachment.getCheckAttachmentConferenceId())
|
||||
.setConferenceName(checkAttachment.getCheckAttachmentConferenceName())
|
||||
.setReviewId(workCheckRequest.getReviewId())
|
||||
.setTitle(checkAttachment.getCheckAttachmentName())
|
||||
.setAttachment(checkAttachment.getCheckAttachmentPath())
|
||||
.setCreatedId(loginUser.getId())
|
||||
.setCreatedAt(LocalDateTime.now());
|
||||
reviewWorkAttachmentService.save(reviewAttachment);
|
||||
|
||||
conferenceAttachmentService.associationMeeting(checkAttachment.getCheckAttachmentConferenceId(), checkAttachment.getCheckAttachmentPath(),
|
||||
checkAttachment.getCheckAttachmentName(), "工作评议附件", loginUser.getId());
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
//新增用户
|
||||
List<CheckUser> checkUsers = workCheck.getCheckUsers();
|
||||
if (CollectionUtil.isNotEmpty(checkUsers)) {
|
||||
List<ReviewWorkCheckUser> reviewWorkCheckUsers = new ArrayList<ReviewWorkCheckUser>();
|
||||
checkUsers.stream().forEach(checkUser -> {
|
||||
ReviewWorkCheckUser reviewWorkCheckUser =
|
||||
new ReviewWorkCheckUser().setReviewId(workCheckRequest.getReviewId()).setWorkCheckId(reviewWorkCheck.getId()).setDept(checkUser.getDept()).setUser(checkUser.getUser());
|
||||
reviewWorkCheckUsers.add(reviewWorkCheckUser);
|
||||
});
|
||||
reviewWorkCheckUserService.saveBatch(reviewWorkCheckUsers);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Ret check(ReviewWorkCheckRequest reviewWorkCheckRequest, User loginUser) {
|
||||
ReviewWork reviewWork = getById(reviewWorkCheckRequest.getReviewId());
|
||||
Assert.notNull(reviewWork, "未找到该记录");
|
||||
|
@ -240,7 +323,8 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
public Ret checkEnd(String id, User loginUser) {
|
||||
ReviewWork reviewWork = getById(id);
|
||||
Assert.notNull(reviewWork, "未找到该记录");
|
||||
if (ReviewWork.STATE_CHECK != reviewWork.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
if (ReviewWork.STATE_CHECK != reviewWork.getState())
|
||||
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
if (!loginUser.getId().equals(reviewWork.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
|
||||
reviewWork.setState(ReviewWork.STATE_OPINION);
|
||||
boolean flag = saveOrUpdate(reviewWork);
|
||||
|
@ -250,28 +334,32 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
public ReviewWork stateOpinionSave(ReviewWorkOpinionStateRequest reviewWorkOpinionStateRequest, User loginUser) {
|
||||
ReviewWork reviewWork = getById(reviewWorkOpinionStateRequest.getReviewId());
|
||||
Assert.notNull(reviewWork, "未找到该记录");
|
||||
if (ReviewWork.STATE_OPINION != reviewWork.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
if (ReviewWork.STATE_OPINION != reviewWork.getState())
|
||||
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(reviewWorkOpinionStateRequest, reviewWork);
|
||||
reviewWork.setState(ReviewWork.STATE_RESULT);
|
||||
saveOrUpdate(reviewWork);
|
||||
|
||||
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkOpinionStateRequest.getOpinionAttachmentName(),
|
||||
reviewWorkOpinionStateRequest.getOpinionAttachmentPath(), loginUser, ReviewWork.STATE_OPINION,
|
||||
reviewWorkOpinionStateRequest.getOpinionAttachmentConferenceId(), reviewWorkOpinionStateRequest.getOpinionAttachmentConferenceName());
|
||||
reviewWorkOpinionStateRequest.getOpinionAttachmentConferenceId(),
|
||||
reviewWorkOpinionStateRequest.getOpinionAttachmentConferenceName());
|
||||
return reviewWork;
|
||||
}
|
||||
|
||||
public ReviewWork stateResultSave(ReviewWorkResultStateRequest reviewWorkResultStateRequest, User loginUser) {
|
||||
ReviewWork reviewWork = getById(reviewWorkResultStateRequest.getReviewId());
|
||||
Assert.notNull(reviewWork, "未找到该记录");
|
||||
if (ReviewWork.STATE_RESULT != reviewWork.getState()) throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
if (ReviewWork.STATE_RESULT != reviewWork.getState())
|
||||
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||
BeanUtil.copyProperties(reviewWorkResultStateRequest, reviewWork);
|
||||
reviewWork.setState(ReviewWork.STATE_PUBLIC);
|
||||
saveOrUpdate(reviewWork);
|
||||
|
||||
saveReviewWorkAttachment(reviewWork.getId(), reviewWorkResultStateRequest.getResultAttachmentName(),
|
||||
reviewWorkResultStateRequest.getResultAttachmentPath(), loginUser, ReviewWork.STATE_RESULT,
|
||||
reviewWorkResultStateRequest.getResultAttachmentConferenceId(), reviewWorkResultStateRequest.getResultAttachmentConferenceName());
|
||||
reviewWorkResultStateRequest.getResultAttachmentConferenceId(),
|
||||
reviewWorkResultStateRequest.getResultAttachmentConferenceName());
|
||||
return reviewWork;
|
||||
}
|
||||
|
||||
|
@ -293,7 +381,7 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
List<String> userIdList = Arrays.asList(userIds.split(","));
|
||||
List<ReviewWorkUser> userList = new ArrayList<>();
|
||||
Iterator<String> iterator = userIdList.iterator();
|
||||
while(iterator.hasNext()){
|
||||
while (iterator.hasNext()) {
|
||||
String userId = iterator.next();
|
||||
//1.已存在的不管
|
||||
int count = reviewWorkUserService.count(new LambdaQueryWrapper<ReviewWorkUser>()
|
||||
|
@ -392,7 +480,8 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
* @param loginUser
|
||||
* @param state
|
||||
*/
|
||||
private void saveReviewWorkAttachment(String reviewId, String reviewAttachmentArrStr, User loginUser, Integer state) {
|
||||
private void saveReviewWorkAttachment(String reviewId, String reviewAttachmentArrStr, User loginUser,
|
||||
Integer state) {
|
||||
reviewWorkAttachmentService.remove(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewId)
|
||||
.eq(ReviewWorkAttachment::getType, state));
|
||||
|
@ -405,7 +494,8 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
item.setCreatedId(loginUser.getId());
|
||||
item.setCreatedAt(LocalDateTime.now());
|
||||
if (StrUtil.isNotBlank(item.getConferenceId())) {
|
||||
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(), item.getTitle(), "工作评议附件", loginUser.getId());
|
||||
conferenceAttachmentService.associationMeeting(item.getConferenceId(), item.getAttachment(),
|
||||
item.getTitle(), "工作评议附件", loginUser.getId());
|
||||
}
|
||||
});
|
||||
reviewWorkAttachmentService.saveBatch(reviewAttachmentList);
|
||||
|
@ -420,7 +510,7 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
* @param state
|
||||
*/
|
||||
private void saveReviewWorkAttachment(String reviewId, String attachmentName, String attachmentPath,
|
||||
User loginUser, Integer state,String conferenceId
|
||||
User loginUser, Integer state, String conferenceId
|
||||
, String conferenceName) {
|
||||
reviewWorkAttachmentService.remove(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewId)
|
||||
|
@ -428,7 +518,7 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
if (StrUtil.isNotBlank(attachmentName)) {
|
||||
String[] nameArr = attachmentName.split(",");
|
||||
String[] pathArr = attachmentPath.split(",");
|
||||
if(StrUtil.isNotBlank(conferenceId)){
|
||||
if (StrUtil.isNotBlank(conferenceId)) {
|
||||
String[] conferenceIdArr = conferenceId.split(",");
|
||||
String[] conferenceNameArr = conferenceName.split(",");
|
||||
for (int i = 0; i < nameArr.length; i++) {
|
||||
|
@ -442,10 +532,11 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
|||
.setCreatedAt(LocalDateTime.now());
|
||||
reviewWorkAttachmentService.save(reviewAttachment);
|
||||
if (StrUtil.isNotBlank(conferenceIdArr[i])) {
|
||||
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i], nameArr[i], "工作评议附件", loginUser.getId());
|
||||
conferenceAttachmentService.associationMeeting(conferenceIdArr[i], conferenceNameArr[i],
|
||||
nameArr[i], "工作评议附件", loginUser.getId());
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
for (int i = 0; i < nameArr.length; i++) {
|
||||
ReviewWorkAttachment reviewAttachment = new ReviewWorkAttachment();
|
||||
reviewAttachment.setType(state)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.service.inter;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheck;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议自查报告组 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-22
|
||||
*/
|
||||
public interface IReviewWorkCheckService extends IService<ReviewWorkCheck> {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ydool.boot.modules.rddb.service.inter;
|
||||
|
||||
import com.ydool.boot.modules.rddb.entity.ReviewWorkCheckUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工作评议自查报告组关联部门人员 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author zhouyuan
|
||||
* @since 2022-09-22
|
||||
*/
|
||||
public interface IReviewWorkCheckUserService extends IService<ReviewWorkCheckUser> {
|
||||
|
||||
}
|
|
@ -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-09-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/reviewWorkCheck")
|
||||
public class ReviewWorkCheckController extends BaseController {
|
||||
|
||||
}
|
|
@ -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-09-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/rddb/reviewWorkCheckUser")
|
||||
public class ReviewWorkCheckUserController extends BaseController {
|
||||
|
||||
}
|
|
@ -9,14 +9,14 @@ import com.ydool.boot.api.util.UserInfo;
|
|||
import com.ydool.boot.common.utils.SpringUtils;
|
||||
import com.ydool.boot.core.wrapper.BaseWrapper;
|
||||
import com.ydool.boot.modules.rddb.entity.*;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewWorkCheckDto;
|
||||
import com.ydool.boot.modules.rddb.entity.dto.ReviewWorkDto;
|
||||
import com.ydool.boot.modules.rddb.mapper.ConferenceMapper;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewWorkAttachmentService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewWorkAuditService;
|
||||
import com.ydool.boot.modules.rddb.service.ReviewWorkUserService;
|
||||
import com.ydool.boot.modules.rddb.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -36,14 +36,18 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
|||
public ReviewWorkDto entityVO(ReviewWork reviewWork) {
|
||||
ReviewWorkDto ReviewWorkDto = BeanUtil.copyProperties(reviewWork, ReviewWorkDto.class);
|
||||
|
||||
ReviewWorkAttachmentService reviewWorkAttachmentService = SpringUtils.getBean(ReviewWorkAttachmentService.class);
|
||||
ReviewWorkAttachmentService reviewWorkAttachmentService =
|
||||
SpringUtils.getBean(ReviewWorkAttachmentService.class);
|
||||
ReviewWorkUserService reviewWorkUserService = SpringUtils.getBean(ReviewWorkUserService.class);
|
||||
ReviewWorkAuditService reviewWorkAuditService = SpringUtils.getBean(ReviewWorkAuditService.class);
|
||||
ReviewWorkCheckService reviewWorkCheckService = SpringUtils.getBean(ReviewWorkCheckService.class);
|
||||
ReviewWorkCheckUserService reviewWorkCheckUserService = SpringUtils.getBean(ReviewWorkCheckUserService.class);
|
||||
|
||||
List<ReviewWorkAttachment> inReportAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_IN_REPORT)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
List<ReviewWorkAttachment> inReportAttachmentList =
|
||||
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_IN_REPORT)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
//获取关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(inReportAttachmentList)) {
|
||||
inReportAttachmentList.stream().forEach(i -> {
|
||||
|
@ -57,27 +61,80 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
|||
}
|
||||
});
|
||||
}
|
||||
List<ReviewWorkAttachment> checkAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
//获取关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(checkAttachmentList)) {
|
||||
checkAttachmentList.stream().forEach(i -> {
|
||||
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||
String conferenceName = "";
|
||||
if (conference != null) {
|
||||
conferenceName = conference.getTitle();
|
||||
}
|
||||
i.setConferenceName(conferenceName);
|
||||
//查询自查/调查报告组
|
||||
List<ReviewWorkCheck> reviewWorkChecks =
|
||||
reviewWorkCheckService.list(new LambdaQueryWrapper<ReviewWorkCheck>().eq(ReviewWorkCheck::getReviewId,
|
||||
reviewWork.getId()));
|
||||
List<ReviewWorkCheckDto> reviewWorkCheckDtos = new ArrayList<ReviewWorkCheckDto>();
|
||||
|
||||
if (CollectionUtil.isNotEmpty(reviewWorkChecks)) {
|
||||
|
||||
|
||||
reviewWorkChecks.stream().forEach(reviewWorkCheck -> {
|
||||
//组ID
|
||||
String workCheckId = reviewWorkCheck.getId();
|
||||
|
||||
//获取关联附件
|
||||
List<ReviewWorkAttachment> checkAttachmentList =
|
||||
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK)
|
||||
.eq(ReviewWorkAttachment::getWorkCheckId, workCheckId)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
//获取附件关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(checkAttachmentList)) {
|
||||
checkAttachmentList.stream().forEach(i -> {
|
||||
if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||
Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||
String conferenceName = "";
|
||||
if (conference != null) {
|
||||
conferenceName = conference.getTitle();
|
||||
}
|
||||
i.setConferenceName(conferenceName);
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取评议组织人员
|
||||
List<ReviewWorkCheckUser> reviewWorkCheckUsers =
|
||||
reviewWorkCheckUserService.list(new LambdaQueryWrapper<ReviewWorkCheckUser>()
|
||||
.eq(ReviewWorkCheckUser::getWorkCheckId, workCheckId)
|
||||
.eq(ReviewWorkCheckUser::getReviewId, reviewWork.getId())
|
||||
);
|
||||
ReviewWorkCheckDto reviewWorkCheckDto = BeanUtil.copyProperties(reviewWorkCheck, ReviewWorkCheckDto.class);
|
||||
reviewWorkCheckDto.setReviewWorkAttachments(checkAttachmentList);
|
||||
reviewWorkCheckDto.setReviewWorkUsers(reviewWorkCheckUsers);
|
||||
reviewWorkCheckDtos.add(reviewWorkCheckDto);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
List<ReviewWorkAttachment> opinionAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_OPINION)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
|
||||
|
||||
// List<ReviewWorkAttachment> checkAttachmentList = reviewWorkAttachmentService.list(new
|
||||
// LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
// .eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
// .eq(ReviewWorkAttachment::getType, ReviewWork.STATE_CHECK)
|
||||
// .orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
// //获取关联会议名称
|
||||
// if (CollectionUtil.isNotEmpty(checkAttachmentList)) {
|
||||
// checkAttachmentList.stream().forEach(i -> {
|
||||
// if (StrUtil.isNotBlank(i.getConferenceId())) {
|
||||
// Conference conference = conferenceMapper.selectById(i.getConferenceId());
|
||||
// String conferenceName = "";
|
||||
// if (conference != null) {
|
||||
// conferenceName = conference.getTitle();
|
||||
// }
|
||||
// i.setConferenceName(conferenceName);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
List<ReviewWorkAttachment> opinionAttachmentList =
|
||||
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_OPINION)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
//获取关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(opinionAttachmentList)) {
|
||||
opinionAttachmentList.stream().forEach(i -> {
|
||||
|
@ -91,10 +148,11 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
|||
}
|
||||
});
|
||||
}
|
||||
List<ReviewWorkAttachment> resultAttachmentList = reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_RESULT)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
List<ReviewWorkAttachment> resultAttachmentList =
|
||||
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_RESULT)
|
||||
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||
//获取关联会议名称
|
||||
if (CollectionUtil.isNotEmpty(resultAttachmentList)) {
|
||||
resultAttachmentList.stream().forEach(i -> {
|
||||
|
@ -122,7 +180,8 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
|||
.orderByAsc(ReviewWorkUser::getSortNo));
|
||||
|
||||
ReviewWorkDto.setInReportAttachmentList(inReportAttachmentList);
|
||||
ReviewWorkDto.setCheckAttachmentList(checkAttachmentList);
|
||||
// ReviewWorkDto.setCheckAttachmentList(checkAttachmentList);
|
||||
ReviewWorkDto.setCheckAttachmentList(reviewWorkCheckDtos);
|
||||
ReviewWorkDto.setOpinionAttachmentList(opinionAttachmentList);
|
||||
ReviewWorkDto.setResultAttachmentList(resultAttachmentList);
|
||||
|
||||
|
@ -133,13 +192,14 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
|||
//打分结束算平均分
|
||||
if (ReviewWork.STATE_CHECK < reviewWork.getState()) {
|
||||
//没打分的不算
|
||||
List<ReviewWorkUser> scoredReviewUserList = checkUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(scoredReviewUserList)){
|
||||
List<ReviewWorkUser> scoredReviewUserList =
|
||||
checkUserList.stream().filter(item -> item.getScore() != null).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(scoredReviewUserList)) {
|
||||
BigDecimal averageScore = scoredReviewUserList.stream().map(item -> item.getScore())
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.divide(new BigDecimal(scoredReviewUserList.size()), BigDecimal.ROUND_HALF_UP);
|
||||
ReviewWorkDto.setAverageScore(averageScore);
|
||||
}else{
|
||||
} else {
|
||||
ReviewWorkDto.setAverageScore(new BigDecimal("0"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue