|
|
|
@ -1,29 +1,27 @@ |
|
|
|
package com.biutag.lan.flow.node; |
|
|
|
package com.biutag.lan.flow.node; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONArray; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.biutag.constants.AppConstants; |
|
|
|
import com.biutag.constants.AppConstants; |
|
|
|
import com.biutag.enums.RoleEnum; |
|
|
|
import com.biutag.enums.RoleEnum; |
|
|
|
import com.biutag.exception.BusinessException; |
|
|
|
import com.biutag.exception.BusinessException; |
|
|
|
import com.biutag.lan.config.AdminThreadLocal; |
|
|
|
import com.biutag.lan.config.AdminThreadLocal; |
|
|
|
import com.biutag.lan.domain.Mail; |
|
|
|
import com.biutag.lan.domain.*; |
|
|
|
import com.biutag.lan.domain.MailMark; |
|
|
|
import com.biutag.lan.enums.MailCategory; |
|
|
|
import com.biutag.lan.domain.MailReturn; |
|
|
|
|
|
|
|
import com.biutag.lan.domain.Work; |
|
|
|
|
|
|
|
import com.biutag.lan.enums.MailState; |
|
|
|
import com.biutag.lan.enums.MailState; |
|
|
|
import com.biutag.lan.flow.ActionEnum; |
|
|
|
import com.biutag.lan.flow.ActionEnum; |
|
|
|
import com.biutag.lan.flow.Flow; |
|
|
|
import com.biutag.lan.flow.Flow; |
|
|
|
import com.biutag.lan.flow.FlowNameEnum; |
|
|
|
import com.biutag.lan.flow.FlowNameEnum; |
|
|
|
import com.biutag.lan.flow.FlowNodeEnum; |
|
|
|
import com.biutag.lan.flow.FlowNodeEnum; |
|
|
|
import com.biutag.lan.service.MailMarkService; |
|
|
|
import com.biutag.lan.service.*; |
|
|
|
import com.biutag.lan.service.MailReturnService; |
|
|
|
|
|
|
|
import com.biutag.lan.service.MailService; |
|
|
|
|
|
|
|
import com.biutag.lan.service.WorkService; |
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
@RequiredArgsConstructor |
|
|
|
@Component |
|
|
|
@Component |
|
|
|
@ -72,11 +70,14 @@ public class FirstApprovalFlow extends Flow { |
|
|
|
.setProblemSolvingStatus(problemSolvingStatus) |
|
|
|
.setProblemSolvingStatus(problemSolvingStatus) |
|
|
|
.setSatisfactionStatus(satisfactionStatus) |
|
|
|
.setSatisfactionStatus(satisfactionStatus) |
|
|
|
.setCompletionComment(data.getString("completionComment")) |
|
|
|
.setCompletionComment(data.getString("completionComment")) |
|
|
|
.setMailLabels(Optional.ofNullable(data.getJSONArray("mailLabels")).map(item -> item.toJSONString()).orElse(null)) |
|
|
|
|
|
|
|
.setFlowKey(FlowNodeEnum.COMPLETION.getKey()) |
|
|
|
.setFlowKey(FlowNodeEnum.COMPLETION.getKey()) |
|
|
|
.setFlowBeforeName(FlowNodeEnum.COMPLETION.getFullName()) |
|
|
|
.setFlowBeforeName(FlowNodeEnum.COMPLETION.getFullName()) |
|
|
|
// 信件状态改为已办结
|
|
|
|
// 信件状态改为已办结
|
|
|
|
.setMailState(MailState.completion.getValue()); |
|
|
|
.setMailState(MailState.completion.getValue()); |
|
|
|
|
|
|
|
JSONArray mailLabels = data.getJSONArray("mailLabels"); |
|
|
|
|
|
|
|
if (Objects.nonNull(mailLabels) && !mailLabels.isEmpty()) { |
|
|
|
|
|
|
|
mail.setMailLabels(mailLabels.stream().map(Object::toString).collect(Collectors.joining(","))); |
|
|
|
|
|
|
|
} |
|
|
|
mailService.updateById(mail); |
|
|
|
mailService.updateById(mail); |
|
|
|
// 认定办结
|
|
|
|
// 认定办结
|
|
|
|
MailMark mailMark = new MailMark().setMailId(mailId) |
|
|
|
MailMark mailMark = new MailMark().setMailId(mailId) |
|
|
|
|