AprilWind
2025-01-15 4ba4ea4fcc559a746daf44f276867e97e580019e
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/controller/FlwDefinitionController.java
@@ -104,7 +104,6 @@
    @Log(title = "流程定义", businessType = BusinessType.INSERT)
    @PutMapping("/publish/{id}")
    @RepeatSubmit()
    @Transactional(rollbackFor = Exception.class)
    public R<Boolean> publish(@PathVariable Long id) {
        return R.ok(flwDefinitionService.publish(id));
    }
@@ -127,7 +126,6 @@
     */
    @Log(title = "流程定义", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    @Transactional(rollbackFor = Exception.class)
    public R<Void> remove(@PathVariable List<Long> ids) {
        return toAjax(flwDefinitionService.removeDef(ids));
    }
@@ -153,9 +151,8 @@
     */
    @Log(title = "流程定义", businessType = BusinessType.IMPORT)
    @PostMapping("/importDef")
    @Transactional(rollbackFor = Exception.class)
    public R<Boolean> importDef(MultipartFile file, String category) {
        return R.ok(flwDefinitionService.importXml(file, category));
        return R.ok(flwDefinitionService.importJson(file, category));
    }
    /**
@@ -172,13 +169,13 @@
    }
    /**
     * 获取流程定义xml字符串
     * 获取流程定义JSON字符串
     *
     * @param id 流程定义id
     */
    @GetMapping("/xmlString/{id}")
    public R<String> xmlString(@PathVariable Long id) {
        return R.ok("操作成功", defService.xmlString(id));
        return R.ok("操作成功", defService.exportJson(id));
    }
    /**
@@ -189,6 +186,7 @@
     */
    @RepeatSubmit()
    @PutMapping("/active/{id}")
    @Transactional(rollbackFor = Exception.class)
    public R<Boolean> active(@PathVariable Long id, @RequestParam boolean active) {
        return R.ok(active ? defService.active(id) : defService.unActive(id));
    }