瀏覽代碼

查看传阅时,将未读改为已读

dzx 1 年之前
父節點
當前提交
d4356ec55c
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

+ 13 - 0
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -296,6 +296,19 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
             throw new MyException("找不到此模板!");
         }
 
+        //如果是传阅
+        LambdaQueryWrapper<WorkflowCirculated> queryWrapper2 = Wrappers.lambdaQuery(WorkflowCirculated.class)
+                .eq(WorkflowCirculated::getTaskId, taskId)
+                .eq(WorkflowCirculated::getCirculatedUserId, StpUtil.getLoginIdAsLong())
+                .select(WorkflowCirculated::getId);
+
+        WorkflowCirculated thisCirculated = circulatedService.getOne(queryWrapper2);
+        if(thisCirculated != null){
+            thisCirculated.setIsRead(YesOrNoEnum.YES.getCode());
+            circulatedService.updateById(thisCirculated);
+        }
+
+
         //排除xml 查出数据
         WorkflowSchema workflowSchema = workflowSchemaMapper.selectOne(Wrappers.lambdaQuery(WorkflowSchema.class).eq(WorkflowSchema::getId, schemaIdVar.get().getValue()));