Commit 136c43e2 by tiger

节点id

1 parent c23f394a
...@@ -14,6 +14,9 @@ public class SopTplNode { ...@@ -14,6 +14,9 @@ public class SopTplNode {
* 节点id * 节点id
*/ */
@Id @Id
@Column(name = "id")
private Integer id;
@Column(name = "node_id") @Column(name = "node_id")
private Integer nodeId; private Integer nodeId;
...@@ -107,11 +110,19 @@ public class SopTplNode { ...@@ -107,11 +110,19 @@ public class SopTplNode {
@Column(name = "daily_limit") @Column(name = "daily_limit")
private Integer dailyLimit; private Integer dailyLimit;
/** public Integer getId() {
* 获取节点id return id;
* }
* @return node_id - 节点id
*/ public void setId(Integer id) {
this.id = id;
}
/**
* 获取节点id
*
* @return node_id - 节点id
*/
public Integer getNodeId() { public Integer getNodeId() {
return nodeId; return nodeId;
} }
......
package cn.com.glsx.process.modules.controller.admin; package cn.com.glsx.process.modules.controller.admin;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
...@@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; 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.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.Message;
import cn.com.glsx.process.modules.controller.admin.message.NotifyBody; import cn.com.glsx.process.modules.controller.admin.message.NotifyBody;
import cn.com.glsx.process.modules.controller.admin.plugin.flowtree.FlowTree; import cn.com.glsx.process.modules.controller.admin.plugin.flowtree.FlowTree;
...@@ -538,8 +541,21 @@ public class AdminController { ...@@ -538,8 +541,21 @@ public class AdminController {
@RequestMapping(value = "/flowTree/getDatas") @RequestMapping(value = "/flowTree/getDatas")
@ResponseBody @ResponseBody
public FlowTree getDatas() throws ClassNotFoundException, IOException { 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") // @RequestMapping(value = "/flowTree/addOrUpdateNode")
......
...@@ -239,7 +239,8 @@ public class SopService { ...@@ -239,7 +239,8 @@ public class SopService {
SopTpl tpl = new SopTpl(); SopTpl tpl = new SopTpl();
tpl.setCreateTime(new Date()); tpl.setCreateTime(new Date());
tpl.setTplCron(sop.getInst().getInstCron()); 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()); 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!