Browse Source

或签撤回

lamphua 1 year ago
parent
commit
0a58cce7d7

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java View File

@@ -180,8 +180,8 @@ public class CmcCarApprovalController extends BaseController
180 180
                 CmcProject cmcProject = new CmcProject();
181 181
                 cmcProject.setProjectId(formDataJson.getString("projectId"));
182 182
                 CmcProject project = cmcProjectService.selectCmcProjectByProjectId(cmcProject.getProjectId());
183
-                project.setDrivers(cmcCarApproval.getDrivers());
184
-                project.setCars(carString);
183
+                project.setDrivers(project.getDrivers() + "," + cmcCarApproval.getDrivers());
184
+                project.setCars(project.getCars() + "," + carString);
185 185
                 cmcProjectService.updateCmcProject(project);
186 186
             }
187 187
             String[] cars = carString.split(",");

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java View File

@@ -147,7 +147,7 @@ public class CmcDeviceApprovalController extends BaseController
147 147
                 CmcProject cmcProject = new CmcProject();
148 148
                 cmcProject.setProjectId(formDataJson.getString("projectId"));
149 149
                 CmcProject project = cmcProjectService.selectCmcProjectByProjectId(cmcProject.getProjectId());
150
-                project.setDevices(cmcDeviceApproval.getModifyDevices());
150
+                project.setDevices(project.getDevices() + "," + cmcDeviceApproval.getModifyDevices());
151 151
                 cmcProjectService.updateCmcProject(project);
152 152
             }
153 153
             String[] devices = deviceString.split(",");

+ 18
- 14
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java View File

@@ -666,8 +666,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
666 666
                 .list();
667 667
         String myTaskId = null;
668 668
         String nextUserTaskId = null;
669
-        Map<String, Object> currentVariables = taskService.getVariables(taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).singleResult().getId());
670
-        List<UserTask> nextUserTask = FindNextNodeUtil.getNextUserTasksByHistTask(repositoryService, task, currentVariables);
671 669
 
672 670
         for (HistoricTaskInstance hti : htiList) {
673 671
             if (loginUser.getUserId().toString().equals(hti.getAssignee())) {
@@ -675,21 +673,27 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
675 673
                 break;
676 674
             }
677 675
         }
678
-        for (HistoricTaskInstance hti : htiList) {
679
-            if (CollectionUtils.isNotEmpty(nextUserTask)) {
680
-                for (UserTask userTask : nextUserTask) {
681
-                    if (userTask.getId().equals(hti.getTaskDefinitionKey()) && hti.getEndTime() != null && hti.getDeleteReason() == null) {
682
-                        nextUserTaskId = task.getTaskDefinitionKey();
683
-                        break;
684
-                    }
685
-                }
686
-            }
687
-        }
688 676
         if (null == myTaskId) {
689 677
             throw new CustomException("该任务非当前用户提交,无法撤回");
690 678
         }
691
-        if (nextUserTaskId != null) {
692
-            throw new CustomException("下一节点已办理,无法撤回");
679
+        List<Task> taskList = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).list();
680
+        if (taskList.size() == 1) {
681
+            Map<String, Object> currentVariables = taskService.getVariables(taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).singleResult().getId());
682
+            List<UserTask> nextUserTask = FindNextNodeUtil.getNextUserTasksByHistTask(repositoryService, task, currentVariables);
683
+
684
+            for (HistoricTaskInstance hti : htiList) {
685
+                if (CollectionUtils.isNotEmpty(nextUserTask)) {
686
+                    for (UserTask userTask : nextUserTask) {
687
+                        if (userTask.getId().equals(hti.getTaskDefinitionKey()) && hti.getEndTime() != null && hti.getDeleteReason() == null) {
688
+                            nextUserTaskId = task.getTaskDefinitionKey();
689
+                            break;
690
+                        }
691
+                    }
692
+                }
693
+            }
694
+            if (nextUserTaskId != null) {
695
+                throw new CustomException("下一节点已办理,无法撤回");
696
+            }
693 697
         }
694 698
         // 获取流程定义信息
695 699
         ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(task.getProcessDefinitionId()).singleResult();

+ 6
- 6
oa-ui/src/views/oa/material/buy.vue View File

@@ -36,19 +36,19 @@
36 36
     <el-row :gutter="10" class="mb8">
37 37
       <el-col :span="1.5">
38 38
         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
39
-          v-hasPermi="['oa:materialBuy:add']">新增</el-button>
39
+          v-hasPermi="['oa:buy:add']">新增</el-button>
40 40
       </el-col>
41 41
       <el-col :span="1.5">
42 42
         <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
43
-          v-hasPermi="['oa:materialBuy:edit']">修改</el-button>
43
+          v-hasPermi="['oa:buy:edit']">修改</el-button>
44 44
       </el-col>
45 45
       <el-col :span="1.5">
46 46
         <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
47
-          v-hasPermi="['oa:materialBuy:remove']">删除</el-button>
47
+          v-hasPermi="['oa:buy:remove']">删除</el-button>
48 48
       </el-col>
49 49
       <el-col :span="1.5">
50 50
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
51
-          v-hasPermi="['oa:materialBuy:export']">导出</el-button>
51
+          v-hasPermi="['oa:buy:export']">导出</el-button>
52 52
       </el-col>
53 53
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
54 54
     </el-row>
@@ -74,9 +74,9 @@
74 74
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
75 75
         <template slot-scope="scope">
76 76
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
77
-            v-hasPermi="['oa:materialBuy:edit']">修改</el-button>
77
+            v-hasPermi="['oa:buy:edit']">修改</el-button>
78 78
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
79
-            v-hasPermi="['oa:materialBuy:remove']">删除</el-button>
79
+            v-hasPermi="['oa:buy:remove']">删除</el-button>
80 80
         </template>
81 81
       </el-table-column>
82 82
     </el-table>

+ 6
- 6
oa-ui/src/views/oa/material/give.vue View File

@@ -39,19 +39,19 @@
39 39
     <el-row :gutter="10" class="mb8">
40 40
       <el-col :span="1.5">
41 41
         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
42
-          v-hasPermi="['oa:materialGive:add']">新增</el-button>
42
+          v-hasPermi="['oa:give:add']">新增</el-button>
43 43
       </el-col>
44 44
       <el-col :span="1.5">
45 45
         <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
46
-          v-hasPermi="['oa:materialGive:edit']">修改</el-button>
46
+          v-hasPermi="['oa:give:edit']">修改</el-button>
47 47
       </el-col>
48 48
       <el-col :span="1.5">
49 49
         <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
50
-          v-hasPermi="['oa:materialGive:remove']">删除</el-button>
50
+          v-hasPermi="['oa:give:remove']">删除</el-button>
51 51
       </el-col>
52 52
       <el-col :span="1.5">
53 53
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
54
-          v-hasPermi="['oa:materialGive:export']">导出</el-button>
54
+          v-hasPermi="['oa:give:export']">导出</el-button>
55 55
       </el-col>
56 56
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
57 57
     </el-row>
@@ -75,9 +75,9 @@
75 75
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
76 76
         <template slot-scope="scope">
77 77
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
78
-            v-hasPermi="['oa:materialGive:edit']">修改</el-button>
78
+            v-hasPermi="['oa:give:edit']">修改</el-button>
79 79
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
80
-            v-hasPermi="['oa:materialGive:remove']">删除</el-button>
80
+            v-hasPermi="['oa:give:remove']">删除</el-button>
81 81
         </template>
82 82
       </el-table-column>
83 83
     </el-table>

Loading…
Cancel
Save