|
@ -1,6 +1,5 @@
|
|
|
package com.yihu.hos.system.controller;
|
|
|
|
|
|
import com.yihu.hos.core.datatype.StringUtil;
|
|
|
import com.yihu.hos.system.service.ProcessManager;
|
|
|
import com.yihu.hos.web.framework.model.Result;
|
|
|
import com.yihu.hos.web.framework.util.controller.BaseController;
|
|
@ -24,7 +23,8 @@ public class ProcessController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/initial")
|
|
|
public String processInitial(Model model) {
|
|
|
public String processInitial(Model model, Integer flowId) {
|
|
|
model.addAttribute("flowId", flowId);
|
|
|
model.addAttribute("contentPage", "system/process/process");
|
|
|
return "partView";
|
|
|
}
|
|
@ -49,6 +49,17 @@ public class ProcessController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/chat", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public Result getFlowchat(Integer flowId) {
|
|
|
try {
|
|
|
String flowchat = processManager.getFlowchat(flowId);
|
|
|
return Result.success(flowchat);
|
|
|
} catch (Exception e) {
|
|
|
return Result.error("生成业务流程失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/json", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public Result formatJson(String code, String name, String positionJson, String flowJson) {
|
|
@ -59,7 +70,7 @@ public class ProcessController extends BaseController {
|
|
|
}
|
|
|
processManager.saveProcess(code, name, flowId, positionJson);
|
|
|
|
|
|
return Result.error("生成业务流程成功");
|
|
|
return Result.success("生成业务流程成功");
|
|
|
} catch (Exception e) {
|
|
|
return Result.error("生成业务流程失败");
|
|
|
}
|