Commit 136c43e2 by tiger

节点id

1 parent c23f394a
......@@ -14,6 +14,9 @@ public class SopTplNode {
* 节点id
*/
@Id
@Column(name = "id")
private Integer id;
@Column(name = "node_id")
private Integer nodeId;
......@@ -107,11 +110,19 @@ public class SopTplNode {
@Column(name = "daily_limit")
private Integer dailyLimit;
/**
* 获取节点id
*
* @return node_id - 节点id
*/
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
/**
* 获取节点id
*
* @return node_id - 节点id
*/
public Integer getNodeId() {
return nodeId;
}
......
package cn.com.glsx.process.modules.controller.admin;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.http.HttpSession;
......@@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import cn.com.glsx.process.modules.controller.admin.flow.web.WebStruct;
import cn.com.glsx.process.modules.controller.admin.global.McgGlobal;
import cn.com.glsx.process.modules.controller.admin.global.topology.Topology;
import cn.com.glsx.process.modules.controller.admin.message.Message;
import cn.com.glsx.process.modules.controller.admin.message.NotifyBody;
import cn.com.glsx.process.modules.controller.admin.plugin.flowtree.FlowTree;
......@@ -538,8 +541,21 @@ public class AdminController {
@RequestMapping(value = "/flowTree/getDatas")
@ResponseBody
public FlowTree getDatas() throws ClassNotFoundException, IOException {
// TODO 查询模板列表
return new FlowTree(null);
// 查询模板列表
McgGlobal mcgGlobal = new McgGlobal();
Topology topology = new Topology();
topology.setId("root");
topology.setName("我的流程");
topology.setpId("1");
mcgGlobal.setTopologys(new ArrayList<Topology>() {
private static final long serialVersionUID = 1L;
{
add(topology);
}
});
return new FlowTree(mcgGlobal);
}
// @RequestMapping(value = "/flowTree/addOrUpdateNode")
......
......@@ -239,7 +239,8 @@ public class SopService {
SopTpl tpl = new SopTpl();
tpl.setCreateTime(new Date());
tpl.setTplCron(sop.getInst().getInstCron());
tpl.setTplId(StrUtil.sub(SnowFlake.nextSerialNumber(), 0, 8)); // 随机生成模板id
// tpl.setTplId(StrUtil.sub(SnowFlake.nextSerialNumber(), 0, 8)); // 随机生成模板id
tpl.setTplId(sop.getInst().getInstId()); // 以实例id作为模板id
tpl.setTplName(sop.getInst().getInstName());
// 生成参数定义
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!