|
@@ -971,91 +971,89 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- if ((tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW
|
|
|
- || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)) {
|
|
|
- if (Objects.nonNull(currFlowTaskResult) && currFlowTaskResult.getSetup().intValue() == 3) {
|
|
|
- List<Task> taskList = taskService.createTaskQuery().processInstanceId(String.valueOf(flowId)).list();
|
|
|
- List<FlowFormWidgetResult> flowFormWidgetResultListNew = new ArrayList<>();
|
|
|
- if (!CollectionUtils.isEmpty(taskList) && taskList.size() > 1) {
|
|
|
- SysRole sysRole = null;
|
|
|
- jump:
|
|
|
- for (Task task : taskList) {
|
|
|
- if (task.getAssignee().equals(sysUser.getId().toString())) {
|
|
|
- List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(sysUser.getId());
|
|
|
- if (!CollectionUtils.isEmpty(sysRoleList)) {
|
|
|
- for (SysRole s : sysRoleList) {
|
|
|
- if (s.getType() == RoleTypeEnum.REGION_MANAGER) {
|
|
|
- sysRole = s;
|
|
|
- break jump;
|
|
|
- } else if (s.getType() == RoleTypeEnum.EFFECT_ENGINEER) {
|
|
|
- sysRole = s;
|
|
|
- break jump;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- List<FlowFormWidgetResult> flowFormWidgetResultList = currFlowTaskResult.getFormProperty();
|
|
|
- for (FlowFormWidgetResult f : flowFormWidgetResultList) {
|
|
|
- if (Objects.nonNull(sysRole)) {
|
|
|
- //TODO f.getRoleType()待修改
|
|
|
- // if (f.getRoleType() == sysRole.getType() && (
|
|
|
- // sysRole.getType() == RoleTypeEnum.REGION_MANAGER
|
|
|
- // || sysRole.getType() == RoleTypeEnum.EFFECT_ENGINEER)) {
|
|
|
- // flowFormWidgetResultListNew.add(f);
|
|
|
- // }
|
|
|
- } else {
|
|
|
- if (f.getFormId().contains(SystemConstant.APPROVE_RADIO_REGION) || f.getFormId()
|
|
|
- .contains(SystemConstant.APPROVE_REMARK_REGION) || f.getFormId()
|
|
|
- .contains(SystemConstant.SIGN_REGION)) {
|
|
|
- flowFormWidgetResultListNew.add(f);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- currFlowTaskResult.setFormProperty(flowFormWidgetResultListNew);
|
|
|
- } else if (!CollectionUtils.isEmpty(taskList) && taskList.size() == 1) {
|
|
|
- SysRole sysRole = null;
|
|
|
- jump:
|
|
|
- for (Task task : taskList) {
|
|
|
- if (task.getAssignee().equals(sysUser.getId().toString())) {
|
|
|
- List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(sysUser.getId());
|
|
|
- if (!CollectionUtils.isEmpty(sysRoleList)) {
|
|
|
- for (SysRole s : sysRoleList) {
|
|
|
- if (s.getType() == RoleTypeEnum.REGION_MANAGER) {
|
|
|
- sysRole = s;
|
|
|
- break jump;
|
|
|
- } else if (s.getType() == RoleTypeEnum.EFFECT_ENGINEER) {
|
|
|
- sysRole = s;
|
|
|
- break jump;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- List<FlowFormWidgetResult> flowFormWidgetResultList = currFlowTaskResult.getFormProperty();
|
|
|
- for (FlowFormWidgetResult f : flowFormWidgetResultList) {
|
|
|
- //TODO f.getRoleType()待修改
|
|
|
- if (Objects.nonNull(sysRole)) {
|
|
|
- // && f.getRoleType() != sysRole.getType()) {
|
|
|
- f.setReadable(true);
|
|
|
- f.setWritable(false);
|
|
|
- } else {
|
|
|
- if (f.getFormId().contains(SystemConstant.APPROVE_RADIO_REGION) || f.getFormId()
|
|
|
- .contains(SystemConstant.APPROVE_REMARK_REGION) || f.getFormId()
|
|
|
- .contains(SystemConstant.SIGN_REGION)) {
|
|
|
- flowFormWidgetResultListNew.add(f);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (Objects.isNull(sysRole) && Objects.nonNull(currFlowTaskResult)) {
|
|
|
- currFlowTaskResult.setFormProperty(flowFormWidgetResultListNew);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (tfCustomFlow.getType() == TFCustomTypeEnum.QUALITY_PROBLEM_FLOW && Objects.nonNull(
|
|
|
- currFlowTaskResult) && (currFlowTaskResult.getSetup().intValue() == 3
|
|
|
- || currFlowTaskResult.getSetup().intValue() == 4)) {
|
|
|
+ // SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ // if ((tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW
|
|
|
+ // || tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)) {
|
|
|
+ // if (Objects.nonNull(currFlowTaskResult) && currFlowTaskResult.getSetup().intValue() == 3) {
|
|
|
+ // List<Task> taskList = taskService.createTaskQuery().processInstanceId(String.valueOf(flowId)).list();
|
|
|
+ // List<FlowFormWidgetResult> flowFormWidgetResultListNew = new ArrayList<>();
|
|
|
+ // if (!CollectionUtils.isEmpty(taskList) && taskList.size() > 1) {
|
|
|
+ // SysRole sysRole = null;
|
|
|
+ // jump:
|
|
|
+ // for (Task task : taskList) {
|
|
|
+ // if (task.getAssignee().equals(sysUser.getId().toString())) {
|
|
|
+ // List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(sysUser.getId());
|
|
|
+ // if (!CollectionUtils.isEmpty(sysRoleList)) {
|
|
|
+ // for (SysRole s : sysRoleList) {
|
|
|
+ // if (s.getType() == RoleTypeEnum.REGION_MANAGER) {
|
|
|
+ // sysRole = s;
|
|
|
+ // break jump;
|
|
|
+ // } else if (s.getType() == RoleTypeEnum.EFFECT_ENGINEER) {
|
|
|
+ // sysRole = s;
|
|
|
+ // break jump;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // List<FlowFormWidgetResult> flowFormWidgetResultList = currFlowTaskResult.getFormProperty();
|
|
|
+ // for (FlowFormWidgetResult f : flowFormWidgetResultList) {
|
|
|
+ // if (Objects.nonNull(sysRole)) {
|
|
|
+ // // if (f.getRoleType() == sysRole.getType() && (
|
|
|
+ // // sysRole.getType() == RoleTypeEnum.REGION_MANAGER
|
|
|
+ // // || sysRole.getType() == RoleTypeEnum.EFFECT_ENGINEER)) {
|
|
|
+ // // flowFormWidgetResultListNew.add(f);
|
|
|
+ // // }
|
|
|
+ // } else {
|
|
|
+ // if (f.getFormId().contains(SystemConstant.APPROVE_RADIO_REGION) || f.getFormId()
|
|
|
+ // .contains(SystemConstant.APPROVE_REMARK_REGION) || f.getFormId()
|
|
|
+ // .contains(SystemConstant.SIGN_REGION)) {
|
|
|
+ // flowFormWidgetResultListNew.add(f);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // currFlowTaskResult.setFormProperty(flowFormWidgetResultListNew);
|
|
|
+ // } else if (!CollectionUtils.isEmpty(taskList) && taskList.size() == 1) {
|
|
|
+ // SysRole sysRole = null;
|
|
|
+ // jump:
|
|
|
+ // for (Task task : taskList) {
|
|
|
+ // if (task.getAssignee().equals(sysUser.getId().toString())) {
|
|
|
+ // List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(sysUser.getId());
|
|
|
+ // if (!CollectionUtils.isEmpty(sysRoleList)) {
|
|
|
+ // for (SysRole s : sysRoleList) {
|
|
|
+ // if (s.getType() == RoleTypeEnum.REGION_MANAGER) {
|
|
|
+ // sysRole = s;
|
|
|
+ // break jump;
|
|
|
+ // } else if (s.getType() == RoleTypeEnum.EFFECT_ENGINEER) {
|
|
|
+ // sysRole = s;
|
|
|
+ // break jump;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // List<FlowFormWidgetResult> flowFormWidgetResultList = currFlowTaskResult.getFormProperty();
|
|
|
+ // for (FlowFormWidgetResult f : flowFormWidgetResultList) {
|
|
|
+ // if (Objects.nonNull(sysRole)) {
|
|
|
+ // // && f.getRoleType() != sysRole.getType()) {
|
|
|
+ // f.setReadable(true);
|
|
|
+ // f.setWritable(false);
|
|
|
+ // } else {
|
|
|
+ // if (f.getFormId().contains(SystemConstant.APPROVE_RADIO_REGION) || f.getFormId()
|
|
|
+ // .contains(SystemConstant.APPROVE_REMARK_REGION) || f.getFormId()
|
|
|
+ // .contains(SystemConstant.SIGN_REGION)) {
|
|
|
+ // flowFormWidgetResultListNew.add(f);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (Objects.isNull(sysRole) && Objects.nonNull(currFlowTaskResult)) {
|
|
|
+ // currFlowTaskResult.setFormProperty(flowFormWidgetResultListNew);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // } else
|
|
|
+ if (tfCustomFlow.getType() == TFCustomTypeEnum.QUALITY_PROBLEM_FLOW && Objects.nonNull(currFlowTaskResult) && (
|
|
|
+ currFlowTaskResult.getSetup().intValue() == 3 || currFlowTaskResult.getSetup().intValue() == 4)) {
|
|
|
List<FlowFormWidgetResult> flowFormWidgetResultList = currFlowTaskResult.getFormProperty();
|
|
|
for (FlowFormWidgetResult f : flowFormWidgetResultList) {
|
|
|
f.setValue(null);
|