|
|
@ -22,11 +22,17 @@ import cn.jyjz.xiaoyao.oa.from.service.CandidateuserService;
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.service.CategoryService;
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.service.CategoryService;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildPictureMybatisDao;
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataDao.OcrTaskchildPictureMybatisDao;
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrContractorTask;
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrContractorTaskService;
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.upload.upload.UploadSpringUtil;
|
|
|
|
import cn.jyjz.xiaoyao.upload.upload.UploadSpringUtil;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
import org.apache.velocity.shaded.commons.io.FilenameUtils;
|
|
|
|
import org.apache.velocity.shaded.commons.io.FilenameUtils;
|
|
|
|
import org.flowable.task.api.Task;
|
|
|
|
import org.flowable.task.api.Task;
|
|
|
@ -40,9 +46,11 @@ import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 业务层实现
|
|
|
|
* 业务层实现
|
|
|
@ -71,6 +79,12 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IFlowFormMessageService iFlowFormMessageService;
|
|
|
|
private IFlowFormMessageService iFlowFormMessageService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private OcrPictureService pictureService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private OcrContractorTaskService contractorTaskService;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String saveForm(HttpServletRequest request) {
|
|
|
|
public String saveForm(HttpServletRequest request) {
|
|
|
|
OcrTaskchildPicture model = null;
|
|
|
|
OcrTaskchildPicture model = null;
|
|
|
@ -228,7 +242,25 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean updateForm(String fromid, String deploymentid, String processdefinitionid, String assignee, String taskId, String processInstanceId, Task task) {
|
|
|
|
public boolean updateForm(String fromid, String deploymentid, String processdefinitionid, String assignee, String taskId, String processInstanceId, Task task) {
|
|
|
|
if (StringUtils.isNotBlank(fromid) && StringUtils.isNotBlank(deploymentid) && StringUtils.isNotBlank(processdefinitionid)) {
|
|
|
|
if (StringUtils.isNotBlank(fromid) && StringUtils.isNotBlank(deploymentid) && StringUtils.isNotBlank(processdefinitionid)) {
|
|
|
|
|
|
|
|
String[] assignees = assignee.split(",");
|
|
|
|
|
|
|
|
List<String> assigneeList = new ArrayList<>();
|
|
|
|
OcrTaskchildPicture model = this.ocrTaskchildPictureService.selectDtoById(Long.parseLong(fromid));
|
|
|
|
OcrTaskchildPicture model = this.ocrTaskchildPictureService.selectDtoById(Long.parseLong(fromid));
|
|
|
|
|
|
|
|
OcrPicture first = pictureService.getOne(new LambdaQueryWrapper<OcrPicture>().eq(OcrPicture::getId, model.getPictureid()));
|
|
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(first.getField5())) {
|
|
|
|
|
|
|
|
List<OcrContractorTask> contractorList = contractorTaskService.list(new LambdaQueryWrapper<OcrContractorTask>().eq(OcrContractorTask::getContractor, first.getField5()).eq(OcrContractorTask::getTenantId, model.getTenantid()));
|
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(contractorList)) {
|
|
|
|
|
|
|
|
List<String> collect = contractorList.stream().map(OcrContractorTask::getTaskUserAssignee).collect(Collectors.toList());
|
|
|
|
|
|
|
|
for (String str : assignees) {
|
|
|
|
|
|
|
|
if (collect.contains(str)) {
|
|
|
|
|
|
|
|
assigneeList.add(str);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(assigneeList)) {
|
|
|
|
|
|
|
|
assignee = String.join(",", assigneeList);
|
|
|
|
|
|
|
|
assignees = assignee.split(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
model.setProcessinstanceid(processInstanceId);
|
|
|
|
model.setProcessinstanceid(processInstanceId);
|
|
|
|
model.setProcessdefinitionid(processdefinitionid);
|
|
|
|
model.setProcessdefinitionid(processdefinitionid);
|
|
|
|
model.setDeploymentid(deploymentid);
|
|
|
|
model.setDeploymentid(deploymentid);
|
|
|
@ -237,9 +269,9 @@ public class TaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPic
|
|
|
|
model.setTaskname(task.getName());
|
|
|
|
model.setTaskname(task.getName());
|
|
|
|
model.setTaskId(taskId);
|
|
|
|
model.setTaskId(taskId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//todo
|
|
|
|
model.setStates(SystemConstantsOa.OA_STATUS_TYPE_ING);
|
|
|
|
model.setStates(SystemConstantsOa.OA_STATUS_TYPE_ING);
|
|
|
|
//查询审批人姓名
|
|
|
|
//查询审批人姓名
|
|
|
|
String[] assignees = assignee.split(",");
|
|
|
|
|
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
|
for (String tempAssign : assignees) {
|
|
|
|
for (String tempAssign : assignees) {
|
|
|
|
User user = userService.findByLoginname(tempAssign);
|
|
|
|
User user = userService.findByLoginname(tempAssign);
|
|
|
|