|
|
|
@ -2,12 +2,10 @@ package cn.jyjz.flowable.controller;
|
|
|
|
|
|
|
|
|
|
import cn.jyjz.flowable.common.SystemConstantsOa;
|
|
|
|
|
import cn.jyjz.flowable.domain.dto.HistoricTaskInstanceDto;
|
|
|
|
|
import cn.jyjz.flowable.domain.vo.FlowTaskVO;
|
|
|
|
|
import cn.jyjz.flowable.entity.FlowApprove;
|
|
|
|
|
import cn.jyjz.flowable.entity.FlowTaskInfo;
|
|
|
|
|
import cn.jyjz.flowable.service.IFlowTaskService;
|
|
|
|
|
import cn.jyjz.flowable.utils.PageUtils;
|
|
|
|
|
import cn.jyjz.flowable.utils.SysConstant;
|
|
|
|
|
import cn.jyjz.xiaoyao.abase.service.SeqManageService;
|
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.User;
|
|
|
|
|
import cn.jyjz.xiaoyao.admin.service.UserService;
|
|
|
|
@ -21,33 +19,22 @@ import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQueryForm;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.UserToken;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.mybatisplus.util.SearchQueryFormat;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataobject.Userapprove;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.service.UserapproveService;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
|
|
|
|
|
import com.alanpoi.common.util.StringUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
import org.flowable.ui.common.model.RemoteUser;
|
|
|
|
|
import org.flowable.ui.common.service.idm.RemoteIdmService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
@ -147,7 +134,7 @@ public class FlowTaskController extends BaseController {
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public ResultVo complete(@RequestBody FlowApprove approve, HttpServletRequest request) {
|
|
|
|
|
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
|
|
|
|
|
Integer flag = flowTaskService.complete(approve, userToken);
|
|
|
|
|
Integer flag = flowTaskService.complete(approve, userToken, Arrays.asList(approve.getFlowTaskInfoList().get(0).getFormId()));
|
|
|
|
|
return flag > 0 ? ResultVoUtil.success() : ResultVoUtil.error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -169,7 +156,7 @@ public class FlowTaskController extends BaseController {
|
|
|
|
|
List<String> formIds = ocrTaskchildPictureService.validateAssignee(formIdList, userToken);
|
|
|
|
|
// 判断当前任务是否审批完毕
|
|
|
|
|
if (CollectionUtils.isNotEmpty(formIds)) {
|
|
|
|
|
Integer success = flowTaskService.complete(approve, userToken);
|
|
|
|
|
Integer success = flowTaskService.complete(approve, userToken,formIds);
|
|
|
|
|
return ResultVoUtil.success("审批成功" + success + "条," + "无权审核" + (flowTaskInfoList.size() - success) + "条","");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|