|
|
|
@ -15,6 +15,7 @@ import com.biutag.supervision.pojo.model.UserAuth; |
|
|
|
import com.biutag.supervision.service.NegativeApproveService; |
|
|
|
import com.biutag.supervision.service.NegativeApproveService; |
|
|
|
import com.biutag.supervision.service.NegativeService; |
|
|
|
import com.biutag.supervision.service.NegativeService; |
|
|
|
import com.biutag.supervision.service.NegativeWorkService; |
|
|
|
import com.biutag.supervision.service.NegativeWorkService; |
|
|
|
|
|
|
|
import com.biutag.supervision.util.TimeUtil; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
|
|
@ -50,17 +51,25 @@ public class SecondApproveAction implements Action { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void updateNegative(String negativeId, String nextFlowKey) { |
|
|
|
public void updateNegative(String negativeId, String nextFlowKey) { |
|
|
|
|
|
|
|
Negative negative = negativeService.getById(negativeId); |
|
|
|
|
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
|
|
|
|
Long secondApprovalTime = negative.getSecondApprovalTime() == null ? 0L : negative.getSecondApprovalTime(); |
|
|
|
|
|
|
|
if (negative.getLatestProcessTime() != null) { |
|
|
|
|
|
|
|
secondApprovalTime = secondApprovalTime + TimeUtil.calculateWorkdayDuration(negative.getLatestProcessTime(), now); |
|
|
|
|
|
|
|
} |
|
|
|
LambdaUpdateWrapper<Negative> updateWrapper = new LambdaUpdateWrapper<Negative>() |
|
|
|
LambdaUpdateWrapper<Negative> updateWrapper = new LambdaUpdateWrapper<Negative>() |
|
|
|
.set(Negative::getFlowKey, nextFlowKey) |
|
|
|
.set(Negative::getFlowKey, nextFlowKey) |
|
|
|
.set(Negative::getUpdTime, LocalDateTime.now()) |
|
|
|
.set(Negative::getUpdTime, LocalDateTime.now()) |
|
|
|
|
|
|
|
.set(Negative::getSecondApprovalTime, secondApprovalTime) |
|
|
|
.eq(Negative::getId, negativeId); |
|
|
|
.eq(Negative::getId, negativeId); |
|
|
|
Negative negative = negativeService.getById(negativeId); |
|
|
|
// Negative negative = negativeService.getById(negativeId);
|
|
|
|
if (ApprovalFlowEnum.SECOND_APPROVAL.getValue().equals(negative.getApprovalFlow())) { |
|
|
|
if (ApprovalFlowEnum.SECOND_APPROVAL.getValue().equals(negative.getApprovalFlow())) { |
|
|
|
updateWrapper.set(Negative::getFlowKey, FlowNodeEnum.COMPLETED.getKey()) |
|
|
|
updateWrapper.set(Negative::getFlowKey, FlowNodeEnum.COMPLETED.getKey()) |
|
|
|
.set(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()) |
|
|
|
.set(Negative::getProcessingStatus, ProcessingStatusEnum.completed.name()) |
|
|
|
.set(Negative::getCompleteDate, LocalDateTime.now()); |
|
|
|
.set(Negative::getCompleteDate, LocalDateTime.now()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
updateWrapper.set(Negative::getFlowKey, nextFlowKey) |
|
|
|
updateWrapper.set(Negative::getFlowKey, nextFlowKey) |
|
|
|
|
|
|
|
.set(Negative::getLatestProcessTime, now) |
|
|
|
.set(Negative::getCurrentProcessingObject, "市局专班"); |
|
|
|
.set(Negative::getCurrentProcessingObject, "市局专班"); |
|
|
|
} |
|
|
|
} |
|
|
|
negativeService.update(updateWrapper); |
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|