浏览代码

或签撤回

lamphua 1年前
父节点
当前提交
0a58cce7d7

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java 查看文件

180
                 CmcProject cmcProject = new CmcProject();
180
                 CmcProject cmcProject = new CmcProject();
181
                 cmcProject.setProjectId(formDataJson.getString("projectId"));
181
                 cmcProject.setProjectId(formDataJson.getString("projectId"));
182
                 CmcProject project = cmcProjectService.selectCmcProjectByProjectId(cmcProject.getProjectId());
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
                 cmcProjectService.updateCmcProject(project);
185
                 cmcProjectService.updateCmcProject(project);
186
             }
186
             }
187
             String[] cars = carString.split(",");
187
             String[] cars = carString.split(",");

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java 查看文件

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

+ 18
- 14
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java 查看文件

666
                 .list();
666
                 .list();
667
         String myTaskId = null;
667
         String myTaskId = null;
668
         String nextUserTaskId = null;
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
         for (HistoricTaskInstance hti : htiList) {
670
         for (HistoricTaskInstance hti : htiList) {
673
             if (loginUser.getUserId().toString().equals(hti.getAssignee())) {
671
             if (loginUser.getUserId().toString().equals(hti.getAssignee())) {
675
                 break;
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
         if (null == myTaskId) {
676
         if (null == myTaskId) {
689
             throw new CustomException("该任务非当前用户提交,无法撤回");
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
         ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(task.getProcessDefinitionId()).singleResult();
699
         ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(task.getProcessDefinitionId()).singleResult();

+ 6
- 6
oa-ui/src/views/oa/material/buy.vue 查看文件

36
     <el-row :gutter="10" class="mb8">
36
     <el-row :gutter="10" class="mb8">
37
       <el-col :span="1.5">
37
       <el-col :span="1.5">
38
         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
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
       </el-col>
40
       </el-col>
41
       <el-col :span="1.5">
41
       <el-col :span="1.5">
42
         <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
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
       </el-col>
44
       </el-col>
45
       <el-col :span="1.5">
45
       <el-col :span="1.5">
46
         <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
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
       </el-col>
48
       </el-col>
49
       <el-col :span="1.5">
49
       <el-col :span="1.5">
50
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
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
       </el-col>
52
       </el-col>
53
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
53
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
54
     </el-row>
54
     </el-row>
74
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
74
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
75
         <template slot-scope="scope">
75
         <template slot-scope="scope">
76
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
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
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
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
         </template>
80
         </template>
81
       </el-table-column>
81
       </el-table-column>
82
     </el-table>
82
     </el-table>

+ 6
- 6
oa-ui/src/views/oa/material/give.vue 查看文件

39
     <el-row :gutter="10" class="mb8">
39
     <el-row :gutter="10" class="mb8">
40
       <el-col :span="1.5">
40
       <el-col :span="1.5">
41
         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
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
       </el-col>
43
       </el-col>
44
       <el-col :span="1.5">
44
       <el-col :span="1.5">
45
         <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
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
       </el-col>
47
       </el-col>
48
       <el-col :span="1.5">
48
       <el-col :span="1.5">
49
         <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
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
       </el-col>
51
       </el-col>
52
       <el-col :span="1.5">
52
       <el-col :span="1.5">
53
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
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
       </el-col>
55
       </el-col>
56
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
56
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
57
     </el-row>
57
     </el-row>
75
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
75
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
76
         <template slot-scope="scope">
76
         <template slot-scope="scope">
77
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
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
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
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
         </template>
81
         </template>
82
       </el-table-column>
82
       </el-table-column>
83
     </el-table>
83
     </el-table>

正在加载...
取消
保存