Merge branch 'master' into docker_package
This commit is contained in:
commit
b359c02bcc
|
@ -9,7 +9,6 @@ import io.renren.common.utils.Result;
|
|||
import io.renren.modules.activiti.dto.TaskDTO;
|
||||
import io.renren.modules.activiti.service.ActTaskService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.security.user.UserDetail;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -296,12 +295,12 @@ public class ActTaskController {
|
|||
})
|
||||
// @RequiresPermissions("sys:task:all")
|
||||
public Result endProcess(String taskId, String instanceId, String comment) {
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
// final UserDetail user = SecurityUser.getUser();
|
||||
if (!StringUtils.isEmpty(taskId)) { // 存在taskId
|
||||
actTaskService.endProcess(taskId, comment);
|
||||
}
|
||||
if (StringUtils.isEmpty(taskId) && !StringUtils.isEmpty(instanceId)) { // 通过实例id
|
||||
actTaskService.endProcessInstanceId(instanceId, comment, user.getId().toString());
|
||||
actTaskService.endProcessInstanceId(instanceId, comment);
|
||||
}
|
||||
return new Result();
|
||||
}
|
||||
|
|
|
@ -441,9 +441,9 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
return flag;
|
||||
}
|
||||
|
||||
private boolean isMultiInstanceByInstanceId(String instanceId, String userId) {
|
||||
private boolean isMultiInstanceByInstanceId(String instanceId) {
|
||||
boolean flag = false;
|
||||
Task task = taskService.createTaskQuery().processInstanceId(instanceId).taskAssignee(userId).list().stream().sorted(
|
||||
Task task = taskService.createTaskQuery().processInstanceId(instanceId).list().stream().sorted(
|
||||
Comparator.comparing(x -> {
|
||||
Task index = (Task) x;
|
||||
return index.getCreateTime();
|
||||
|
@ -653,11 +653,11 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void endProcessInstanceId(String instanceId, String comment, String userId) {
|
||||
if (isMultiInstanceByInstanceId(instanceId, userId)) {
|
||||
public void endProcessInstanceId(String instanceId, String comment) {
|
||||
if (isMultiInstanceByInstanceId(instanceId)) {
|
||||
throw new RenException(ErrorCode.END_PROCESS_PARALLEL_ERROR);
|
||||
}
|
||||
Task task = taskService.createTaskQuery().processInstanceId(instanceId).taskAssignee(userId).active().list().stream().sorted(
|
||||
Task task = taskService.createTaskQuery().processInstanceId(instanceId).active().list().stream().sorted(
|
||||
Comparator.comparing(x -> {
|
||||
Task index = (Task) x;
|
||||
return index.getCreateTime();
|
||||
|
@ -667,7 +667,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
logger.error("查不到流程对应task");
|
||||
return;
|
||||
}
|
||||
List<Task> tasks = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).taskAssignee(userId)
|
||||
List<Task> tasks = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).active()
|
||||
.taskDefinitionKey(task.getTaskDefinitionKey()).active().list();
|
||||
if (tasks.size() > 1) {
|
||||
throw new RenException(ErrorCode.END_PROCESS_HANDLEING_ERROR);
|
||||
|
|
|
@ -222,11 +222,6 @@ public class TAbilityApplicationController {
|
|||
return;
|
||||
}
|
||||
cameraList.add(JSON.parseObject(index_.getCameraList()));
|
||||
//
|
||||
//List<CameraChannelDto1> channelDto1s = cameraChannelMapper.selectByChannelCode(index_.getCameraList().replaceAll("\"", ""));
|
||||
//if (!channelDto1s.isEmpty()) {
|
||||
// cameraList.add(channelDto1s.get(0));
|
||||
//}
|
||||
});
|
||||
camera = cameraList;
|
||||
|
||||
|
|
Loading…
Reference in New Issue