|
|
|
|
@ -39,23 +39,15 @@ public class ConfirmationCompletionAction implements Action {
|
|
|
|
|
public void next(ActionDto actionDto) { |
|
|
|
|
ConfirmationCompletionData completionData = BeanUtil.toBean(actionDto.getData(), ConfirmationCompletionData.class); |
|
|
|
|
String negativeId = actionDto.getNegativeId(); |
|
|
|
|
updateNegative(negativeId, completionData); |
|
|
|
|
//addNegativeScorePolice(negativeId, completionData);
|
|
|
|
|
updateApprove(negativeId, completionData.getCompletionComment(), actionDto.getWorkId()); |
|
|
|
|
|
|
|
|
|
doneWork(actionDto.getWorkId()); |
|
|
|
|
// 最后更新状态
|
|
|
|
|
updateNegative(negativeId, completionData); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void updateNegative(String negativeId, ConfirmationCompletionData completionData) { |
|
|
|
|
LambdaUpdateWrapper<Negative> updateWrapper = new LambdaUpdateWrapper<Negative>() |
|
|
|
|
.eq(Negative::getId, negativeId) |
|
|
|
|
.set(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()) |
|
|
|
|
.set(Negative::getVerifySituation, completionData.getVerifySituation()) |
|
|
|
|
.set(Negative::getVerifyFileSituation, completionData.getVerifyFileSituation()) |
|
|
|
|
.set(Negative::getCompleteDate, LocalDateTime.now()) |
|
|
|
|
.set(Negative::getFlowKey, FlowNodeEnum.COMPLETED.getKey()) |
|
|
|
|
.set(Negative::getUpdTime, LocalDateTime.now()); |
|
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void addNegativeScorePolice(String negativeId, ConfirmationCompletionData completionData) { |
|
|
|
|
String formula = "%s + (1 * %s) + (1 * %s)"; |
|
|
|
|
@ -85,15 +77,27 @@ public class ConfirmationCompletionAction implements Action {
|
|
|
|
|
Negative negative = negativeService.getById(negativeId); |
|
|
|
|
NegativeWork work = workService.getById(workId); |
|
|
|
|
approveService.update(new LambdaUpdateWrapper<NegativeApprove>() |
|
|
|
|
.set(NegativeApprove::getState, ApproveStateEnum.approved.name()) |
|
|
|
|
.set(NegativeApprove::getComments, comments) |
|
|
|
|
.set(NegativeApprove::getHandlerDepartId, work.getDepartId()) |
|
|
|
|
.set(NegativeApprove::getHandlerDepartName, work.getDepartName()) |
|
|
|
|
.set(NegativeApprove::getHandlerUserName, user.getUserName()) |
|
|
|
|
.set(NegativeApprove::getHandlerName, user.getNickName()) |
|
|
|
|
.set(NegativeApprove::getUpdateTime, LocalDateTime.now()) |
|
|
|
|
.eq(NegativeApprove::getNegativeId, negativeId) |
|
|
|
|
.eq(NegativeApprove::getActionKey, negative.getFlowKey())); |
|
|
|
|
.eq(NegativeApprove::getNegativeId, negativeId) |
|
|
|
|
.eq(NegativeApprove::getActionKey, negative.getFlowKey()) |
|
|
|
|
.set(NegativeApprove::getState, ApproveStateEnum.approved.name()) |
|
|
|
|
.set(NegativeApprove::getComments, comments) |
|
|
|
|
.set(NegativeApprove::getHandlerDepartId, work.getDepartId()) |
|
|
|
|
.set(NegativeApprove::getHandlerDepartName, work.getDepartName()) |
|
|
|
|
.set(NegativeApprove::getHandlerUserName, user.getUserName()) |
|
|
|
|
.set(NegativeApprove::getHandlerName, user.getNickName()) |
|
|
|
|
.set(NegativeApprove::getUpdateTime, LocalDateTime.now())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void updateNegative(String negativeId, ConfirmationCompletionData completionData) { |
|
|
|
|
LambdaUpdateWrapper<Negative> updateWrapper = new LambdaUpdateWrapper<Negative>() |
|
|
|
|
.eq(Negative::getId, negativeId) |
|
|
|
|
.set(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()) |
|
|
|
|
.set(Negative::getVerifySituation, completionData.getVerifySituation()) |
|
|
|
|
.set(Negative::getVerifyFileSituation, completionData.getVerifyFileSituation()) |
|
|
|
|
.set(Negative::getCompleteDate, LocalDateTime.now()) |
|
|
|
|
.set(Negative::getFlowKey, FlowNodeEnum.COMPLETED.getKey()) |
|
|
|
|
.set(Negative::getUpdTime, LocalDateTime.now()); |
|
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|
} |
|
|
|
|
public void doneWork(Integer workId) { |
|
|
|
|
LambdaUpdateWrapper<NegativeWork> updateWrapper = new LambdaUpdateWrapper<NegativeWork>() |
|
|
|
|
|