工作评议的上传拟评部门
This commit is contained in:
parent
c795ebe86d
commit
76f565cde7
|
@ -181,6 +181,15 @@ public class ApiReviewWorkController extends ApiBaseController {
|
||||||
ReviewWork review = reviewWorkService.stateCheckSave(workCheckRequest, getApiUser());
|
ReviewWork review = reviewWorkService.stateCheckSave(workCheckRequest, getApiUser());
|
||||||
render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review)));
|
render(Ret.ok().data(ReviewWorkWrapper.build().entityVO(review)));
|
||||||
}
|
}
|
||||||
|
@ApiOperation("上报评议部门")
|
||||||
|
@PostMapping("state/report")
|
||||||
|
@ResponseBody
|
||||||
|
@DynamicResponseParameters(properties = {
|
||||||
|
@DynamicParameter(name = "data", value = "评议", dataTypeClass = ReviewWorkDto.class)
|
||||||
|
})
|
||||||
|
public void stateReport(@RequestBody ReviewWorkReportStateRequest reviewWorkReportStateRequest){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -188,6 +188,18 @@ public class ReviewWork extends BaseEntity {
|
||||||
@ApiModelProperty(value = "截止时间")
|
@ApiModelProperty(value = "截止时间")
|
||||||
private LocalDateTime reviewEndAt;
|
private LocalDateTime reviewEndAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报评议部门时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
)
|
||||||
|
@JsonFormat(
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
)
|
||||||
|
@ApiModelProperty(value = "上报评议部门时间")
|
||||||
|
private LocalDateTime reviewWorkReportUploadAt;
|
||||||
|
|
||||||
public ReviewWork() {
|
public ReviewWork() {
|
||||||
//默认公开分数
|
//默认公开分数
|
||||||
this.checkScoreState=1;
|
this.checkScoreState=1;
|
||||||
|
|
|
@ -18,6 +18,8 @@ public class ReviewWorkDto extends ReviewWork {
|
||||||
List<ReviewWorkAttachment> opinionAttachmentList;
|
List<ReviewWorkAttachment> opinionAttachmentList;
|
||||||
@ApiModelProperty(value = "整改结果附件")
|
@ApiModelProperty(value = "整改结果附件")
|
||||||
List<ReviewWorkAttachment> resultAttachmentList;
|
List<ReviewWorkAttachment> resultAttachmentList;
|
||||||
|
@ApiModelProperty(value = "评议方案附件")
|
||||||
|
List<ReviewWorkAttachment> reportAttachmentList;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级审批人员")
|
@ApiModelProperty(value = "一级审批人员")
|
||||||
List<ReviewWorkAudit> inReportAudit1List;
|
List<ReviewWorkAudit> inReportAudit1List;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ydool.boot.modules.rddb.entity.request.review_work.state;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
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 ReviewWorkReportStateRequest {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
@ApiModelProperty(value = "评议方案附件")
|
||||||
|
private List<CheckAttachment> reportAttachmentList;
|
||||||
|
/**
|
||||||
|
* 上报评议部门时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
)
|
||||||
|
@JsonFormat(
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss"
|
||||||
|
)
|
||||||
|
@ApiModelProperty(value = "上报评议部门时间")
|
||||||
|
private LocalDateTime reviewWorkReportUploadAt;
|
||||||
|
}
|
|
@ -20,9 +20,6 @@ import com.ydool.boot.modules.rddb.entity.request.CommentRequest;
|
||||||
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
|
import com.ydool.boot.modules.rddb.entity.request.ScoreRequest;
|
||||||
import com.ydool.boot.modules.rddb.entity.request.contact_db.SignRequest;
|
import com.ydool.boot.modules.rddb.entity.request.contact_db.SignRequest;
|
||||||
import com.ydool.boot.modules.rddb.entity.request.contact_db.state.*;
|
import com.ydool.boot.modules.rddb.entity.request.contact_db.state.*;
|
||||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.CheckAttachment;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.CheckUser;
|
|
||||||
import com.ydool.boot.modules.rddb.entity.request.review_work.state.WorkCheck;
|
|
||||||
import com.ydool.boot.modules.rddb.mapper.ContactDbMapper;
|
import com.ydool.boot.modules.rddb.mapper.ContactDbMapper;
|
||||||
import com.ydool.boot.modules.rddb.wrapper.ContactDbWrapper;
|
import com.ydool.boot.modules.rddb.wrapper.ContactDbWrapper;
|
||||||
import com.ydool.boot.modules.sys.entity.User;
|
import com.ydool.boot.modules.sys.entity.User;
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -147,7 +148,7 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
||||||
@Transactional
|
@Transactional
|
||||||
public ReviewWork stateInReportSave(ReviewWorkInReportStateRequest reviewWorkInReportStateRequest, User loginUser) {
|
public ReviewWork stateInReportSave(ReviewWorkInReportStateRequest reviewWorkInReportStateRequest, User loginUser) {
|
||||||
ReviewWork reviewWork = BeanUtil.copyProperties(reviewWorkInReportStateRequest, ReviewWork.class);
|
ReviewWork reviewWork = BeanUtil.copyProperties(reviewWorkInReportStateRequest, ReviewWork.class);
|
||||||
reviewWork.setState(ReviewWork.STATE_CHECK);
|
reviewWork.setState(ReviewWork.STATE_REPORT);
|
||||||
reviewWork.setStatus(1);
|
reviewWork.setStatus(1);
|
||||||
reviewWork.setCreatedId(loginUser.getId());
|
reviewWork.setCreatedId(loginUser.getId());
|
||||||
saveOrUpdate(reviewWork);
|
saveOrUpdate(reviewWork);
|
||||||
|
@ -237,6 +238,27 @@ public class ReviewWorkService extends BaseService<ReviewWorkMapper, ReviewWork>
|
||||||
return reviewWork;
|
return reviewWork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public ReviewWork stateReport(ReviewWorkReportStateRequest reviewWorkReportStateRequest, User loginUser) {
|
||||||
|
ReviewWork reviewWork = getById(reviewWorkReportStateRequest.getId());
|
||||||
|
Assert.notNull(reviewWork, "未找到该记录");
|
||||||
|
if (ReviewWork.STATE_REPORT != reviewWork.getState())
|
||||||
|
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
|
||||||
|
BeanUtil.copyProperties(reviewWorkReportStateRequest, reviewWork);
|
||||||
|
reviewWork.setState(ReviewWork.STATE_CHECK);
|
||||||
|
saveOrUpdate(reviewWork);
|
||||||
|
|
||||||
|
|
||||||
|
saveReviewWorkAttachment(reviewWork.getId(),
|
||||||
|
reviewWorkReportStateRequest.getReportAttachmentList().stream().map(CheckAttachment::getCheckAttachmentName).collect(Collectors.toList()).toString(),
|
||||||
|
reviewWorkReportStateRequest.getReportAttachmentList().stream().map(CheckAttachment::getCheckAttachmentPath).collect(Collectors.toList()).toString(), loginUser, ReviewWork.STATE_REPORT,
|
||||||
|
reviewWorkReportStateRequest.getReportAttachmentList().stream().map(CheckAttachment::getCheckAttachmentConferenceId).collect(Collectors.toList()).toString(),
|
||||||
|
reviewWorkReportStateRequest.getReportAttachmentList().stream().map(CheckAttachment::getCheckAttachmentConferenceName).collect(Collectors.toList()).toString());
|
||||||
|
|
||||||
|
|
||||||
|
return reviewWork;
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
private void saveReviewWorkCheck(ReviewWork reviewWork, WorkCheckRequest workCheckRequest, User loginUser) {
|
private void saveReviewWorkCheck(ReviewWork reviewWork, WorkCheckRequest workCheckRequest, User loginUser) {
|
||||||
//删除之前记录
|
//删除之前记录
|
||||||
|
|
|
@ -128,7 +128,24 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
List<ReviewWorkAttachment> reportAttachmentList =
|
||||||
|
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||||
|
.eq(ReviewWorkAttachment::getReviewId, reviewWork.getId())
|
||||||
|
.eq(ReviewWorkAttachment::getType, ReviewWork.STATE_REPORT)
|
||||||
|
.orderByDesc(ReviewWorkAttachment::getCreatedAt));
|
||||||
|
//获取关联会议名称
|
||||||
|
if (CollectionUtil.isNotEmpty(reportAttachmentList)) {
|
||||||
|
reportAttachmentList.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 =
|
List<ReviewWorkAttachment> opinionAttachmentList =
|
||||||
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
reviewWorkAttachmentService.list(new LambdaQueryWrapper<ReviewWorkAttachment>()
|
||||||
|
@ -184,6 +201,7 @@ public class ReviewWorkWrapper extends BaseWrapper<ReviewWork, ReviewWorkDto> {
|
||||||
ReviewWorkDto.setCheckAttachmentList(reviewWorkCheckDtos);
|
ReviewWorkDto.setCheckAttachmentList(reviewWorkCheckDtos);
|
||||||
ReviewWorkDto.setOpinionAttachmentList(opinionAttachmentList);
|
ReviewWorkDto.setOpinionAttachmentList(opinionAttachmentList);
|
||||||
ReviewWorkDto.setResultAttachmentList(resultAttachmentList);
|
ReviewWorkDto.setResultAttachmentList(resultAttachmentList);
|
||||||
|
ReviewWorkDto.setReportAttachmentList(reportAttachmentList);
|
||||||
|
|
||||||
ReviewWorkDto.setInReportAudit1List(inReportAudit1List);
|
ReviewWorkDto.setInReportAudit1List(inReportAudit1List);
|
||||||
ReviewWorkDto.setInReportAudit2List(inReportAudit2List);
|
ReviewWorkDto.setInReportAudit2List(inReportAudit2List);
|
||||||
|
|
Loading…
Reference in New Issue