提交 cf78ec16 authored 作者: zhoushaopan's avatar zhoushaopan

新增编辑流程接口

上级 30b73721
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
<artifactId>springfox-swagger-ui</artifactId> <artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version> <version>2.8.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency> </dependency>
<!--flowable整合springboot--> <!--flowable整合springboot-->
...@@ -106,32 +106,32 @@ ...@@ -106,32 +106,32 @@
</dependencies> </dependencies>
<build> <build>
<resources> <!-- <resources>-->
<resource> <!-- <resource>-->
<directory>src/main/java</directory> <!-- <directory>src/main/java</directory>-->
<includes> <!-- <includes>-->
<include>**/*</include> <!-- <include>**/*</include>-->
</includes> <!-- </includes>-->
<excludes> <!-- <excludes>-->
<exclude>**/.svn/*</exclude> <!-- <exclude>**/.svn/*</exclude>-->
</excludes> <!-- </excludes>-->
<filtering>false</filtering> <!-- <filtering>false</filtering>-->
</resource> <!-- </resource>-->
</resources> <!-- </resources>-->
<plugins> <plugins>
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- </plugin>-->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<source>1.8</source> <!--指明源码用的Jdk版本-->
<target>1.8</target> <!--指明打包后的Jdk版本-->
</configuration>
</plugin> </plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <source>1.8</source> &lt;!&ndash;指明源码用的Jdk版本&ndash;&gt;-->
<!-- <target>1.8</target> &lt;!&ndash;指明打包后的Jdk版本&ndash;&gt;-->
<!-- </configuration>-->
<!-- </plugin>-->
</plugins> </plugins>
</build> </build>
......
package com.tykj.workflowcore.base.aop;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import java.util.Arrays;
/**
* ClassName: EntityAop
* Package: com.tykj.workflowcore.base.aop
* Description:
* Datetime: 2021/3/11 19:40
*
* @Author: zsp
*/
@Aspect
public class EntityAop {
@Before("execution(* save*(..))")
public void permissionCheck(JoinPoint point) {
System.out.println("@Before:模拟权限检查...");
System.out.println("@Before:目标方法为:" +
point.getSignature().getDeclaringTypeName() +
"." + point.getSignature().getName());
System.out.println("@Before:参数为:" + Arrays.toString(point.getArgs()));
System.out.println("@Before:被织入的目标对象为:" + point.getTarget());
}
}
package com.tykj.workflowcore.base.entity;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* ClassName: BaseEntity
* Package: com.tykj.workflowcore.base.entity
* Description:
* Datetime: 2021/3/11 19:36
*
* @Author: zsp
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public abstract class BaseEntity {
private Date createTime;
private Date updateTime;
}
...@@ -57,6 +57,12 @@ public class FlowsInfoController { ...@@ -57,6 +57,12 @@ public class FlowsInfoController {
return ResultUtil.success(flowsInfoList,"查询成功"); return ResultUtil.success(flowsInfoList,"查询成功");
} }
@GetMapping("editFlow")
@ApiOperation(value = "编辑流程")
public String editFlow(Long id){
return flowInfoService.editFlow(id).getFilePath();
}
@GetMapping("/deploy") @GetMapping("/deploy")
@ApiOperation(value = "部署流程",notes = "部署成功") @ApiOperation(value = "部署流程",notes = "部署成功")
public ResponseEntity deploy(Long id) throws FileNotFoundException { public ResponseEntity deploy(Long id) throws FileNotFoundException {
...@@ -105,7 +111,7 @@ public class FlowsInfoController { ...@@ -105,7 +111,7 @@ public class FlowsInfoController {
} }
@PostMapping("/createFlow") @PostMapping("/createFlow")
@ApiModelProperty("创建成功") @ApiModelProperty("创建流程")
public ResponseEntity createFlow(@RequestBody FlowsInfoVo flowsInfovo){ public ResponseEntity createFlow(@RequestBody FlowsInfoVo flowsInfovo){
return ResultUtil.success(workFlowService.createFlow(flowsInfovo.toEntity()),"流程创建成功"); return ResultUtil.success(workFlowService.createFlow(flowsInfovo.toEntity()),"流程创建成功");
} }
......
package com.tykj.workflowcore.workflow_editer.entity; package com.tykj.workflowcore.workflow_editer.entity;
import com.tykj.workflowcore.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -27,7 +28,7 @@ import java.util.Date; ...@@ -27,7 +28,7 @@ import java.util.Date;
@Entity @Entity
@WorkFlowCoreNoScan @WorkFlowCoreNoScan
@Api("流程表") @Api("流程表")
public class FlowsInfo { public class FlowsInfo extends BaseEntity {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty("流程id") @ApiModelProperty("流程id")
...@@ -54,12 +55,6 @@ public class FlowsInfo { ...@@ -54,12 +55,6 @@ public class FlowsInfo {
@ApiModelProperty("文件路径") @ApiModelProperty("文件路径")
private String filePath; private String filePath;
@ApiModelProperty("流程创建时间")
private Date createTime;
@ApiModelProperty("流程修改时间")
private Date updateTime;
@ApiModelProperty("流程描述") @ApiModelProperty("流程描述")
private String flowDescribe; private String flowDescribe;
......
...@@ -74,5 +74,12 @@ public interface FlowInfoService { ...@@ -74,5 +74,12 @@ public interface FlowInfoService {
*/ */
Page<FlowsInfo> searchFlowInfo(SearchFlowInfoVo searchFlowInfoVo); Page<FlowsInfo> searchFlowInfo(SearchFlowInfoVo searchFlowInfoVo);
/**
* 编辑流程
* @param id 流程id
* @return
*/
FlowsInfo editFlow(Long id);
} }
...@@ -81,6 +81,11 @@ public interface WorkFlowService { ...@@ -81,6 +81,11 @@ public interface WorkFlowService {
*/ */
// Map<String,Object> findTaskDetail(DetailTaskVo detailTaskVo); // Map<String,Object> findTaskDetail(DetailTaskVo detailTaskVo);
/**
* 查看具体的任务详情
* @param taskId 任务id
* @return 任务列表
*/
Map<String,Object> findTaskDetail(String taskId); Map<String,Object> findTaskDetail(String taskId);
......
...@@ -97,4 +97,10 @@ public class FlowInfoServiceImpl implements FlowInfoService { ...@@ -97,4 +97,10 @@ public class FlowInfoServiceImpl implements FlowInfoService {
and.like(searchFlowInfoVo.getFlowName()!=null,"flowName","%"+searchFlowInfoVo.getFlowName()+"%"); and.like(searchFlowInfoVo.getFlowName()!=null,"flowName","%"+searchFlowInfoVo.getFlowName()+"%");
return flowsInfoMapper.findAll(and.build(), searchFlowInfoVo.getPageable()); return flowsInfoMapper.findAll(and.build(), searchFlowInfoVo.getPageable());
} }
@Override
public FlowsInfo editFlow(Long id) {
return flowsInfoMapper.findById(id).get();
}
} }
package com.tykj.workflowcore.workflow_editer.service.impl;
import com.tykj.workflowcore.workflow_editer.entity.WorkFlowRole;
import com.tykj.workflowcore.workflow_editer.entity.WorkFlowRoleType;
import com.tykj.workflowcore.workflow_editer.entity.WorkFlowUser;
import com.tykj.workflowcore.workflow_editer.service.UserService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* ClassName: UserService
* Package: com.tykj.service
* Description:
* Datetime: 2021/2/25 13:53
*
* @Author: zsp
*/
@Service
public class UserServiceImpl implements UserService {
@Override
public WorkFlowUser getCurrentUser() {
return null;
}
@Override
public List<WorkFlowUser> getAllUser() {
return null;
}
@Override
public List<WorkFlowRole> getAllRole(String roleType) {
return null;
}
@Override
public List<WorkFlowRoleType> getRoleType() {
return null;
}
}
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.entity.NodeInfo; import com.tykj.workflowcore.workflow_editer.entity.NodeInfo;
import com.tykj.workflowcore.workflow_editer.entity.vo.NodeInfoVo; import com.tykj.workflowcore.workflow_editer.entity.vo.NodeInfoVo;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论