kimi
2020-05-27 c007f0ca1785db093d48f4846cda82fe8e955765
src/main/java/com/highdatas/mdm/controller/ActivitiDesignerController.java
@@ -17,7 +17,7 @@
/**
 * @author kimi
 * @description
 * @description 流程设计器接口
 * @date 2019-12-11 11:00
 */
@@ -31,13 +31,26 @@
    @Autowired
    IdentityService identityService;
    /**
     *
     * @description:  创建一个新流程
     * @return: Result 返回创建的model id
     *
     */
    @RequestMapping(value = "/create", method = RequestMethod.GET)
    public String createModel() {
        String modelId = modelEditorService.createModel();
        return modelId;
    }
    /**
     *
     * @description:  返回带有model信息的编辑器界面
     * @param: modelId  model Id
     * @param: userId  用户id
     * @return:  流程编辑器页面
     *
     */
    @RequestMapping(value = "/edit", method = RequestMethod.GET)
    public String getModel(HttpServletResponse response, String modelId) throws IOException {
        if (StringUtils.isEmpty(modelId)) {
@@ -46,6 +59,13 @@
        return "./process/modeler.html?modelId=" + modelId;
    }
    /**
     *
     * @description:  保存model信息
     * @param: modelId  model Id
     * @return: Result 是否保存成功
     *
     */
    @RequestMapping(value="/model/{modelId}/save", method = RequestMethod.PUT)
    public Result saveModel(@PathVariable String modelId, HttpServletRequest request) {
@@ -56,7 +76,13 @@
            return Result.error(new CodeMsg(1000, "未检测到任一标签"));
        }
    }
    /**
     *
     * @description:  删除model信息
     * @param: modelId  model Id
     * @return: Result 是否删除model信息
     *
     */
    @RequestMapping(value="/model/{modelId}/delete", method = RequestMethod.PUT)
    @ResponseStatus(value = HttpStatus.OK)
    public void deleteModel(@PathVariable String modelId) {
@@ -64,11 +90,24 @@
    }
        @RequestMapping(value="/model/{modelId}/json", method = RequestMethod.GET, produces = "application/json")
    /**
     *
     * @description:  通过model ID 获取流程编辑器使用的 Edit json信息
     * @param: modelId  model Id
     * @return: Result Edit json信息
     *
     */
    @RequestMapping(value="/model/{modelId}/json", method = RequestMethod.GET, produces = "application/json")
    public ObjectNode getEditorJson(@PathVariable String modelId) {
        return modelEditorService.getEditorJson(modelId);
    }
    /**
     *
     * @description:  获取stencilset.json 流程编辑器使用
     * @return:   返回stencilset.json
     *
     */
    @RequestMapping(value="/editor/stencilset", method = RequestMethod.GET, produces = "application/json;charset=utf-8")
    public @ResponseBody
    String getStencilset() {