@@ -187,10 +187,6 @@ | |||||
<groupId>org.slf4j</groupId> | <groupId>org.slf4j</groupId> | ||||
<artifactId>slf4j-log4j12</artifactId> | <artifactId>slf4j-log4j12</artifactId> | ||||
</exclusion> | </exclusion> | ||||
<!-- <exclusion>--> | |||||
<!-- <groupId>org.springframework.boot</groupId>--> | |||||
<!-- <artifactId>spring-boot-starter-security</artifactId>--> | |||||
<!-- </exclusion>--> | |||||
</exclusions> | </exclusions> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
@@ -203,10 +199,6 @@ | |||||
</exclusion> | </exclusion> | ||||
</exclusions> | </exclusions> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-flowable-starter</artifactId> | |||||
</dependency> | |||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
@@ -235,12 +227,10 @@ | |||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-cache-starter</artifactId> | <artifactId>nd-cache-starter</artifactId> | ||||
<version>1.0.0</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-basic</artifactId> | <artifactId>nd-basic</artifactId> | ||||
<version>1.0.0</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.kingbase.dialect</groupId> | <groupId>com.kingbase.dialect</groupId> | ||||
@@ -251,17 +241,14 @@ | |||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba</groupId> | <groupId>com.alibaba</groupId> | ||||
<artifactId>easyexcel-core</artifactId> | <artifactId>easyexcel-core</artifactId> | ||||
<version>3.1.2</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-file-starter</artifactId> | <artifactId>nd-file-starter</artifactId> | ||||
<version>1.0.0</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-zwdd-starter</artifactId> | |||||
<version>1.0.0</version> | |||||
<artifactId>nd-flowable-starter</artifactId> | |||||
</dependency> | </dependency> | ||||
</dependencies> | </dependencies> | ||||
<!-- 打包 --> | <!-- 打包 --> | ||||
@@ -49,5 +49,4 @@ public class DeclaredProjectController { | |||||
String instanceId = processService.startProcess(defId, params); | String instanceId = processService.startProcess(defId, params); | ||||
return "启动流程实例 " + instanceId + " 成功"; | return "启动流程实例 " + instanceId + " 成功"; | ||||
} | } | ||||
} | } |
@@ -50,16 +50,17 @@ public class SysProcdefController { | |||||
return processModelService.saveProcess(modelHistory); | return processModelService.saveProcess(modelHistory); | ||||
} | } | ||||
@ApiOperation(value = "系统流程配置启用(停用)", notes = "系统流程配置启用(停用)") | |||||
@PutMapping("/{formId}/active/{state}") | @PutMapping("/{formId}/active/{state}") | ||||
public Object enOrDisModel(@PathVariable String formId, | |||||
public String enOrDisModel(@PathVariable String formId, | |||||
@PathVariable Boolean state) { | @PathVariable Boolean state) { | ||||
modelGroupService.enOrDisModel(formId, !state); | modelGroupService.enOrDisModel(formId, !state); | ||||
return R.ok(Boolean.TRUE.equals(state) ? "启用流程成功":"停用流程成功"); | |||||
return Boolean.TRUE.equals(state) ? "启用流程成功":"停用流程成功"; | |||||
} | } | ||||
@ApiOperation(value = "系统流程配置发布", notes = "系统流程配置发布") | @ApiOperation(value = "系统流程配置发布", notes = "系统流程配置发布") | ||||
@PostMapping("/deploy/{formId}") | @PostMapping("/deploy/{formId}") | ||||
public String save(@Validated @PathVariable String formId) { | |||||
public String deploy(@Validated @PathVariable String formId) { | |||||
return processModelService.deployProcess(formId); | return processModelService.deployProcess(formId); | ||||
} | } | ||||
} | } |
@@ -0,0 +1,23 @@ | |||||
package com.ningdatech.pmapi.sys.processDef; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.util.List; | |||||
@Data | |||||
public class Node<T> implements Serializable { | |||||
private static final long serialVersionUID = -45475579271153023L; | |||||
private String id; | |||||
private String parentId; | |||||
private String name; | |||||
private T props; | |||||
private Node<?> children; | |||||
private List<Node<?>> branchs; | |||||
} |
@@ -0,0 +1,79 @@ | |||||
package com.ningdatech.pmapi.sys.processDef; | |||||
import com.alibaba.fastjson.JSON; | |||||
import org.junit.Test; | |||||
import java.io.Serializable; | |||||
import java.util.List; | |||||
/** | |||||
* @Classname ProcessTest | |||||
* @Description | |||||
* @Date 2023/2/4 9:54 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
public class ProcessDefTest { | |||||
@Test | |||||
public void test() { | |||||
String processStr = "{\"id\":\"node_039152532706\",\"name\":\"审批单位\",\"type\":\"ORG\",\"props\":{\"regionCode\":\"\",\"orgCode\":\"GO_3bc86256687a4884ae410af00682b762\",\"type\":\"DEFAULT\",\"processDefId\":\"\",\"subNode\":[]},\"children\":{},\"parentId\":\"root\"}"; | |||||
Node node = JSON.parseObject(processStr, Node.class); | |||||
OrgProps props = JSON.parseObject(node.getProps().toString(), OrgProps.class); | |||||
System.out.println(props.getOrgCode()); | |||||
} | |||||
public static class OrgProps { | |||||
private String regionCode; | |||||
private String orgCode; | |||||
private String type; | |||||
private String processDefId; | |||||
private List<Node> subNode; | |||||
public String getRegionCode() { | |||||
return regionCode; | |||||
} | |||||
public void setRegionCode(String regionCode) { | |||||
this.regionCode = regionCode; | |||||
} | |||||
public String getOrgCode() { | |||||
return orgCode; | |||||
} | |||||
public void setOrgCode(String orgCode) { | |||||
this.orgCode = orgCode; | |||||
} | |||||
public String getType() { | |||||
return type; | |||||
} | |||||
public void setType(String type) { | |||||
this.type = type; | |||||
} | |||||
public String getProcessDefId() { | |||||
return processDefId; | |||||
} | |||||
public void setProcessDefId(String processDefId) { | |||||
this.processDefId = processDefId; | |||||
} | |||||
public List<Node> getSubNode() { | |||||
return subNode; | |||||
} | |||||
public void setSubNode(List<Node> subNode) { | |||||
this.subNode = subNode; | |||||
} | |||||
} | |||||
} |
@@ -123,6 +123,32 @@ | |||||
<artifactId>kingbase8-8.2.0</artifactId> | <artifactId>kingbase8-8.2.0</artifactId> | ||||
<version>1.0</version> | <version>1.0</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>easyexcel-core</artifactId> | |||||
<version>3.1.2</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-file-starter</artifactId> | |||||
<version>1.0.0</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-zwdd-starter</artifactId> | |||||
<version>1.0.0</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-cache-starter</artifactId> | |||||
<version>1.0.0</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-log-starter</artifactId> | |||||
<version>1.0.0</version> | |||||
</dependency> | |||||
</dependencies> | </dependencies> | ||||
</dependencyManagement> | </dependencyManagement> | ||||