|
@@ -15,6 +15,8 @@ import com.idea.oa.flow2.model.in.FlowMainIn;
|
|
|
import com.idea.oa.flow2.model.in.TargetUserAndFlowRole;
|
|
|
import com.idea.oa.flow2.model.out.FlowHistoryInfo;
|
|
|
import com.idea.oa.flow2.model.out.IMGFlowHistoryInfo;
|
|
|
+import com.idea.workPanel.enume.HandleTypeEnum;
|
|
|
+import com.idea.workPanel.service.ParkWaitHandleService;
|
|
|
import com.rockstar.common.base.BaseService;
|
|
|
import com.rockstar.common.domain.AjaxResult;
|
|
|
import com.rockstar.common.support.Convert;
|
|
@@ -26,9 +28,11 @@ import com.rockstar.frame.model.extend.Tablepar;
|
|
|
import com.rockstar.frame.service.FrameUserService;
|
|
|
import com.rockstar.shiro.util.ShiroUtils;
|
|
|
import com.rockstar.util.UUIDUtils;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.activiti.bpmn.model.UserTask;
|
|
|
import org.activiti.engine.TaskService;
|
|
|
import org.activiti.engine.task.Task;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.Assert;
|
|
@@ -40,6 +44,7 @@ import java.math.BigDecimal;
|
|
|
import java.math.MathContext;
|
|
|
import java.util.*;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
|
|
@@ -64,6 +69,8 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
private FlowMainLogService flowMainLogService;
|
|
|
@Autowired
|
|
|
private FlowMainCcService flowMainCcService;
|
|
|
+ @Autowired
|
|
|
+ private ParkWaitHandleService parkWaitHandleService;
|
|
|
|
|
|
/**
|
|
|
* 添加审核结果
|
|
@@ -1187,6 +1194,32 @@ public class FlowMainService implements BaseService<FlowMain, FlowMainExample> {
|
|
|
if (!flowMain.getFlowStatus().equals(1)) {
|
|
|
return AjaxResult.error("流程状态不在审核中,请重新确认");
|
|
|
}
|
|
|
+
|
|
|
+ // TODO: 2024/12/12 先处理待办 不然状态 会变
|
|
|
+ try {
|
|
|
+
|
|
|
+ // 撤回后处理待办
|
|
|
+ String flowId = flowMain.getId();
|
|
|
+ FlowMainPushExample flowMainPushExample = new FlowMainPushExample();
|
|
|
+ flowMainPushExample.createCriteria().andFlowMainIdEqualTo(flowId).andStatusEqualTo(0);
|
|
|
+ List<FlowMainPush> flowMainPushes = flowMainPushService.selectByExample(flowMainPushExample);
|
|
|
+ if (CollectionUtils.isNotEmpty(flowMainPushes)) {
|
|
|
+ FlowMainPush push = flowMainPushes.get(0);
|
|
|
+ // 进行审核操作后 就要处理待办 清除数据
|
|
|
+ String param = "id=" + flowId + "&flowMainPushId=" + push.getId() + "&applyUser=" + flowMain.getApplyUser();
|
|
|
+ // 付款申请
|
|
|
+ if(flowMain.getFlowType().equals(ConstantFlowType.PAYMENT)){
|
|
|
+ parkWaitHandleService.userHandle(HandleTypeEnum.FK, param, ShiroUtils.getUserId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("撤回流程处理待办报错:",e);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
String mypushUserKey = null;
|
|
|
{//开始申请人撤回申请
|
|
|
//先搜索目前有哪些人在审核中 ,获取key
|