Commit d8d81e835f71cea69de06da584024fcc10c90494
1 parent
1f08a272
合并 master 分支, 修改导入流程bug
Showing
4 changed files
with
5 additions
and
1 deletions
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java
| ... | ... | @@ -61,6 +61,7 @@ public class BpmModelController { |
| 61 | 61 | |
| 62 | 62 | @PostMapping("/import") |
| 63 | 63 | @ApiOperation(value = "导入模型") |
| 64 | + @PreAuthorize("@ss.hasPermission('bpm:model:import')") | |
| 64 | 65 | public CommonResult<String> importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { |
| 65 | 66 | BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); |
| 66 | 67 | // 读取文件 | ... | ... |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java
| ... | ... | @@ -108,6 +108,7 @@ public interface BpmTaskConvert { |
| 108 | 108 | |
| 109 | 109 | BpmTaskRespVO.User convert3(AdminUserRespDTO bean); |
| 110 | 110 | |
| 111 | + @Mapping(target = "id", ignore = true) | |
| 111 | 112 | void copyTo(BpmTaskExtDO from, @MappingTarget BpmTaskDonePageItemRespVO to); |
| 112 | 113 | |
| 113 | 114 | @Mappings({ | ... | ... |
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java
| ... | ... | @@ -132,6 +132,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | @Override |
| 135 | + @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 | |
| 135 | 136 | public void updateModel(@Valid BpmModelUpdateReqVO updateReqVO) { |
| 136 | 137 | // 校验流程模型存在 |
| 137 | 138 | Model model = repositoryService.getModel(updateReqVO.getId()); |
| ... | ... | @@ -148,6 +149,7 @@ public class BpmModelServiceImpl implements BpmModelService { |
| 148 | 149 | } |
| 149 | 150 | |
| 150 | 151 | @Override |
| 152 | + @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 | |
| 151 | 153 | public void deployModel(String id) { |
| 152 | 154 | // 校验流程模型存在 |
| 153 | 155 | Model model = repositoryService.getModel(id); | ... | ... |
yudao-ui-admin/src/views/bpm/model/index.vue
| ... | ... | @@ -291,7 +291,7 @@ export default { |
| 291 | 291 | // 设置上传的请求头部 |
| 292 | 292 | headers: getBaseHeader(), |
| 293 | 293 | // 上传的地址 |
| 294 | - url: process.env.VUE_APP_BASE_API + '/admin-api/' + "/bpm/model/import", | |
| 294 | + url: process.env.VUE_APP_BASE_API + '/admin-api' + "/bpm/model/import", | |
| 295 | 295 | // 表单 |
| 296 | 296 | form: {}, |
| 297 | 297 | // 校验规则 | ... | ... |