提交 52d395be authored 作者: ww1xhqc's avatar ww1xhqc

Merge remote-tracking branch 'origin/master'

# Conflicts: # src/main/java/com/tykj/workflowcore/model_layer/service/impl/ModelImpl.java
# 工作流项目核心
## 项目简介
### 环境要求
- Maven3+
- Jdk1.8+
- springboot 2.4.1 以下 2.1.4 以上 (包含所提到的版本)
### 代码结构
```
├─src
│ ├─main
│ │ ├─java
│ │ │ └─com
│ │ │ └─tykj
│ │ │ └─workflowcore
│ │ │ ├─api
│ │ │ ├─base --系统基础模块
│ │ │ │ ├─annotations --注解类
│ │ │ │ ├─aop
│ │ │ │ ├─config
│ │ │ │ ├─entity
│ │ │ │ ├─page
│ │ │ │ ├─result
│ │ │ │ └─util
│ │ │ ├─model_layer --数据模型
│ │ │ │ ├─annotations
│ │ │ │ ├─controller
│ │ │ │ ├─dao
│ │ │ │ ├─entity
│ │ │ │ │ └─vo
│ │ │ │ ├─service
│ │ │ │ │ └─impl
│ │ │ │ ├─util
│ │ │ ├─workflow_editor --工作流编辑器
│ │ │ │ ├─config
│ │ │ │ ├─controller
│ │ │ │ ├─dao
│ │ │ │ ├─entity
│ │ │ │ │ └─vo
│ │ │ │ ├─enums
│ │ │ │ ├─listener
│ │ │ │ ├─service
│ │ │ │ │ └─impl
│ │ │ │ ├─util
│ │ │ └─WorkflowCoreApplication --SpringBoot启动类
│ │ └─resources --核心配置所在位置
│ │ ├─mapper
│ │ ├─template
│ │ └─ui
│ │ └─images
│ └─test
│ └─java
│ └─org
│ └─yaukie
│ └─frame --核心逻辑所在位置
```
## 使用方式
### 安装
#### maven
```
<dependency>
<groupId>com.tykj</groupId>
<artifactId>workflow-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
```
#### 本地引入
1. 获取 workflow-core-0.0.1-SNAPSHOT.jar
2. 在你自己项目的根目录下创建lib文件夹 并将 jar 包放入
3. pom 添加 如下
```
<dependency>
<groupId>com.tykj</groupId>
<artifactId>workflow-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/lib/workflow-core-0.0.1-SNAPSHOT.jar</systemPath>
</dependency>
```
### 调用
1. 在springboot 启动类上添加注解 @EnableWorkFlowCore
```
@EnableWorkFlowCore
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(WorkflowCoreApplication.class, args);
}
}
```
2. 如需要使用工作流的审批人功能请实现 UserService
例如:
```
@Service
@Primary
public class FlowUserServiceImpl implements UserService {
@Override
public WorkFlowUser getCurrentUser() {
WorkFlowUser workFlowUser = new WorkFlowUser();
workFlowUser.setId(1L);
workFlowUser.setUserName("张三");
return workFlowUser;
}
@Override
public List<WorkFlowUser> getAllUser() {
List<WorkFlowUser> workFlowUsers = new ArrayList<>();
for (int i = 0; i < 10; i++) {
WorkFlowUser workFlowUser = new WorkFlowUser();
workFlowUser.setUserName("张1");
workFlowUser.setId((long) i);
workFlowUsers.add(workFlowUser);
}
return workFlowUsers;
}
@Override
public List<WorkFlowRole> getAllRole(String roleType) {
List<WorkFlowRole> workFlowUsers = new ArrayList<>();
if (roleType.equals("department")){
workFlowUsers.add(new WorkFlowRole("开发部","department","1"));
workFlowUsers.add(new WorkFlowRole("运营部","department","2"));
workFlowUsers.add(new WorkFlowRole("测试部","department","3"));
}else {
workFlowUsers.add(new WorkFlowRole("管理员","role","1"));
workFlowUsers.add(new WorkFlowRole("普通用户","role","2"));
workFlowUsers.add(new WorkFlowRole("运维人员","role","3"));
}
return workFlowUsers;
}
@Override
public List<WorkFlowRoleType> getRoleType() {
List<WorkFlowRoleType> workFlowRoleTypes = new ArrayList<>();
workFlowRoleTypes.add(new WorkFlowRoleType("部门","department"));
workFlowRoleTypes.add(new WorkFlowRoleType("角色","role"));
return workFlowRoleTypes;
}
}
```
package com.tykj.workflowcore;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* 这个类里面配置了当项目被启动后需要扫描的包
* @author HuangXiahao
* @version V1.0
* @class WorkFlowCoreConfiger
* @packageName com.tykj.workflwcore.union
**/
@Configuration
@ComponentScan(
basePackages = {"com.tykj.*"}
)
public class WorkFlowCoreConfigure {
public WorkFlowCoreConfigure() {
}
}
...@@ -10,7 +10,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -10,7 +10,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class WorkflowCoreApplication { public class WorkflowCoreApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(WorkflowCoreApplication.class, args); SpringApplication.run(WorkflowCoreApplication.class, args);
} }
......
package com.tykj.workflowcore.annotation; package com.tykj.workflowcore.base.annotations;
import com.tykj.workflowcore.WorkFlowCoreConfigure; import com.tykj.workflowcore.base.config.WorkflowCoreRunner;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import java.lang.annotation.*; import java.lang.annotation.*;
...@@ -11,6 +11,6 @@ import java.lang.annotation.*; ...@@ -11,6 +11,6 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE}) @Target({ElementType.TYPE})
@Documented @Documented
@Import({WorkFlowCoreConfigure.class}) @Import({WorkflowCoreRunner.class})
public @interface EnableWorkFlowCore { public @interface EnableWorkFlowCore {
} }
...@@ -21,11 +21,13 @@ public class EntityHandle { ...@@ -21,11 +21,13 @@ public class EntityHandle {
public void checkTimes(JoinPoint point) { public void checkTimes(JoinPoint point) {
Object[] args = point.getArgs(); Object[] args = point.getArgs();
for (Object arg : args) { for (Object arg : args) {
BaseEntity entity = (BaseEntity) arg; if (arg instanceof BaseEntity){
if (isNull(entity.getCreatedTime())){ BaseEntity entity = (BaseEntity) arg;
entity.setCreatedTime(new Date()); if (isNull(entity.getCreatedTime())){
entity.setCreatedTime(new Date());
}
entity.setUpdatedTime(new Date());
} }
entity.setUpdatedTime(new Date());
} }
} }
......
package com.tykj.workflowcore.config; package com.tykj.workflowcore.base.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.CorsRegistry;
...@@ -31,6 +30,11 @@ public WebMvcConfigurer corsConfigurer() { ...@@ -31,6 +30,11 @@ public WebMvcConfigurer corsConfigurer() {
.maxAge(3600); .maxAge(3600);
} }
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/xml/**")
.addResourceLocations("file:"+System.getProperty("user.dir")+"\\xml\\");
}
}; };
} }
......
package com.tykj.workflowcore; package com.tykj.workflowcore.base.config;
import com.tykj.workflowcore.model_layer.service.ModelService; import com.tykj.workflowcore.model_layer.service.ModelService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.io.File; import java.io.File;
...@@ -19,7 +22,10 @@ import java.util.List; ...@@ -19,7 +22,10 @@ import java.util.List;
* @class Comm * @class Comm
* @packageName com.tykj.workflwcore * @packageName com.tykj.workflwcore
**/ **/
@Component @Configuration
@ComponentScan(
basePackages = {"com.tykj.*"}
)
public class WorkflowCoreRunner implements CommandLineRunner { public class WorkflowCoreRunner implements CommandLineRunner {
@Autowired @Autowired
......
package com.tykj.workflowcore.model_layer.annotatiion; package com.tykj.workflowcore.model_layer.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
......
...@@ -3,10 +3,10 @@ package com.tykj.workflowcore.model_layer.controller; ...@@ -3,10 +3,10 @@ package com.tykj.workflowcore.model_layer.controller;
import com.tykj.workflowcore.base.result.ResultUtil; import com.tykj.workflowcore.base.result.ResultUtil;
import com.tykj.workflowcore.model_layer.model.QueryCondition; import com.tykj.workflowcore.model_layer.entity.vo.QueryCondition;
import com.tykj.workflowcore.model_layer.model.SearchTableInfoVo; import com.tykj.workflowcore.model_layer.entity.vo.SearchTableInfoVo;
import com.tykj.workflowcore.model_layer.model.TableInfo; import com.tykj.workflowcore.model_layer.entity.TableInfo;
import com.tykj.workflowcore.model_layer.model.TableVO; import com.tykj.workflowcore.model_layer.entity.vo.TableVO;
import com.tykj.workflowcore.model_layer.service.ModelService; import com.tykj.workflowcore.model_layer.service.ModelService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
......
package com.tykj.workflowcore.model_layer.dao; package com.tykj.workflowcore.model_layer.dao;
import com.tykj.workflowcore.model_layer.model.ColumnInfo; import com.tykj.workflowcore.model_layer.entity.ColumnInfo;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...@@ -12,5 +12,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; ...@@ -12,5 +12,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* @Date 2021/2/24 11:22 * @Date 2021/2/24 11:22
* @Version 1.0 * @Version 1.0
*/ */
public interface ColumnInfoDao extends JpaRepository<ColumnInfo,Long>, JpaSpecificationExecutor<ColumnInfo> { public interface ColumnInfoDao extends JpaRepository<ColumnInfo,Integer>, JpaSpecificationExecutor<ColumnInfo> {
} }
package com.tykj.workflowcore.model_layer.dao; package com.tykj.workflowcore.model_layer.dao;
import com.tykj.workflowcore.model_layer.model.TableInfo; import com.tykj.workflowcore.model_layer.entity.TableInfo;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...@@ -12,6 +12,6 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; ...@@ -12,6 +12,6 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* @Date 2021/2/24 11:20 * @Date 2021/2/24 11:20
* @Version 1.0 * @Version 1.0
*/ */
public interface TableInfoDao extends JpaRepository<TableInfo,Long>, JpaSpecificationExecutor<TableInfo> { public interface TableInfoDao extends JpaRepository<TableInfo,Integer>, JpaSpecificationExecutor<TableInfo> {
} }
package com.tykj.workflowcore.model_layer.model; package com.tykj.workflowcore.model_layer.entity;
import com.tykj.workflowcore.base.entity.BaseEntity; import com.tykj.workflowcore.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotations.WorkFlowCoreNoScan;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package com.tykj.workflowcore.model_layer.model; package com.tykj.workflowcore.model_layer.entity;
import com.tykj.workflowcore.base.entity.BaseEntity; import com.tykj.workflowcore.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotations.WorkFlowCoreNoScan;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.*; import org.hibernate.annotations.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener; import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*; import javax.persistence.*;
import javax.persistence.Entity; import javax.persistence.Entity;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
/** /**
* @ClassName TableInfo * @ClassName TableInfo
......
package com.tykj.workflowcore.model_layer.model; package com.tykj.workflowcore.model_layer.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package com.tykj.workflowcore.model_layer.model; package com.tykj.workflowcore.model_layer.entity.vo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
......
package com.tykj.workflowcore.model_layer.entity.vo;/**
*@ClassName SearchColumnInfoVo
*@Description TODO
*@Author WWW
*@Date 2021/3/15 14:46
*@Version 1.0
*/public class SearchColumnInfoVo {
}
package com.tykj.workflowcore.model_layer.model; package com.tykj.workflowcore.model_layer.entity.vo;
import com.tykj.workflowcore.base.page.JpaCustomPage; import com.tykj.workflowcore.base.page.JpaCustomPage;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
package com.tykj.workflowcore.model_layer.service; package com.tykj.workflowcore.model_layer.service;
import com.fasterxml.jackson.core.JsonProcessingException; import com.tykj.workflowcore.model_layer.entity.*;
import com.tykj.workflowcore.model_layer.entity.vo.QueryCondition;
import com.tykj.workflowcore.model_layer.model.*; import com.tykj.workflowcore.model_layer.entity.vo.SearchTableInfoVo;
import com.tykj.workflowcore.model_layer.entity.vo.TableVO;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.sql.SQLException; import java.sql.SQLException;
......
package com.tykj.workflowcore.model_layer.utils; package com.tykj.workflowcore.model_layer.utils;
import cn.hutool.json.XML; import com.tykj.workflowcore.model_layer.entity.vo.ColumnVO;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.entity.vo.TableVO;
import com.tykj.workflowcore.model_layer.model.ColumnVO;
import com.tykj.workflowcore.model_layer.model.TableInfo;
import com.tykj.workflowcore.model_layer.model.TableVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata; import org.hibernate.boot.Metadata;
...@@ -16,24 +11,20 @@ import org.hibernate.boot.registry.StandardServiceRegistry; ...@@ -16,24 +11,20 @@ import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.tool.hbm2ddl.SchemaUpdate; import org.hibernate.tool.hbm2ddl.SchemaUpdate;
import org.hibernate.tool.schema.TargetType; import org.hibernate.tool.schema.TargetType;
import javax.persistence.Entity;
import javax.persistence.EntityManagerFactory; import javax.persistence.EntityManagerFactory;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
/** /**
* @ClassName CreatTableUtil * @ClassName CreateTableUtil
* @Description TODO * @Description TODO
* @Author WWW * @Author WWW
* @Date 2021/3/1 14:35 * @Date 2021/3/1 14:35
* @Version 1.0 * @Version 1.0
*/ */
public class CreatTableUtil { public class CreateTableUtil {
public static String creatTable(TableVO tableVO){ public static String createTable(TableVO tableVO){
List<ColumnVO> dataList = tableVO.getDataList(); List<ColumnVO> dataList = tableVO.getDataList();
String xmlMapping = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + String xmlMapping = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<!DOCTYPE hibernate-mapping PUBLIC\n" + "<!DOCTYPE hibernate-mapping PUBLIC\n" +
...@@ -42,7 +33,7 @@ public class CreatTableUtil { ...@@ -42,7 +33,7 @@ public class CreatTableUtil {
"<hibernate-mapping>\n" + "<hibernate-mapping>\n" +
" <class entity-name=\"" + tableVO.getModelName() + "\" table=\"" + tableVO.getModelName() + "\">\n"; " <class entity-name=\"" + tableVO.getModelName() + "\" table=\"" + tableVO.getModelName() + "\">\n";
xmlMapping += " <id name=\"id\" type=\"java.lang.Long\" length=\"64\" unsaved-value=\"null\">\n" + xmlMapping += " <id name=\"id\" type=\"java.lang.Integer\" length=\"64\" unsaved-value=\"null\">\n" +
" <generator class=\"identity\" />\n" + " <generator class=\"identity\" />\n" +
" </id>"; " </id>";
for (ColumnVO columnVO : dataList) { for (ColumnVO columnVO : dataList) {
......
package com.tykj.workflowcore.model_layer.utils; package com.tykj.workflowcore.model_layer.utils;
import com.tykj.workflowcore.model_layer.model.QueryCondition; import com.tykj.workflowcore.model_layer.entity.vo.QueryCondition;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
......
package com.tykj.workflowcore.workflow_editer.controller; package com.tykj.workflowcore.workflow_editer.controller;
import com.tykj.workflowcore.base.result.ResultObj;
import com.tykj.workflowcore.base.result.ResultUtil; import com.tykj.workflowcore.base.result.ResultUtil;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.entity.VariableStorage; import com.tykj.workflowcore.workflow_editer.entity.VariableStorage;
import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo; import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo;
import com.tykj.workflowcore.workflow_editer.entity.vo.VariableStorageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.VariableStorageVo;
import com.tykj.workflowcore.workflow_editer.service.*; import com.tykj.workflowcore.workflow_editer.service.*;
import com.tykj.workflowcore.workflow_editer.vo.DeployedVo; import com.tykj.workflowcore.workflow_editer.entity.vo.FlowsInfoVo;
import com.tykj.workflowcore.workflow_editer.vo.FlowsInfoVo;
import com.tykj.workflowcore.workflow_editer.vo.PageVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
/** /**
......
package com.tykj.workflowcore.workflow_editer.controller; package com.tykj.workflowcore.workflow_editer.controller;
import com.tykj.workflowcore.base.result.ResultObj;
import com.tykj.workflowcore.base.result.ResultUtil; import com.tykj.workflowcore.base.result.ResultUtil;
import com.tykj.workflowcore.model_layer.model.TableInfo; import com.tykj.workflowcore.model_layer.entity.TableInfo;
import com.tykj.workflowcore.workflow_editer.entity.FormPage; import com.tykj.workflowcore.workflow_editer.entity.FormPage;
//import com.tykj.workflowcore.workflow_editer.entity.PageEntity; //import com.tykj.workflowcore.workflow_editer.entity.PageEntity;
import com.tykj.workflowcore.workflow_editer.service.FormPageService; import com.tykj.workflowcore.workflow_editer.service.FormPageService;
//import com.tykj.workflowcore.workflow_editer.service.PageEntityService; //import com.tykj.workflowcore.workflow_editer.service.PageEntityService;
import com.tykj.workflowcore.workflow_editer.vo.InFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.InFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.OutFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.PageFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.PageFormPageVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -53,7 +50,7 @@ public class FormPageController { ...@@ -53,7 +50,7 @@ public class FormPageController {
} }
@ApiOperation("回显页面") @ApiOperation("回显页面")
@GetMapping("/EchoPage") @GetMapping("/EchoPage")
public FormPage EchoPage(Long id){ public FormPage EchoPage(Integer id){
return formPageService.getPage(id); return formPageService.getPage(id);
} }
...@@ -66,13 +63,13 @@ public class FormPageController { ...@@ -66,13 +63,13 @@ public class FormPageController {
@ApiOperation("删除页面") @ApiOperation("删除页面")
@DeleteMapping("deletePage") @DeleteMapping("deletePage")
public ResponseEntity deletePage(Long id){ public ResponseEntity deletePage(Integer id){
formPageService.deletePage(id); formPageService.deletePage(id);
return ResultUtil.success("删除页面成功"); return ResultUtil.success("删除页面成功");
} }
@PostMapping("/findByPages") @PostMapping("/findByPages")
public List<TableInfo> findByPages(@RequestBody List<Long> pageIds){ public List<TableInfo> findByPages(@RequestBody List<Integer> pageIds){
return formPageService.findByPageIds(pageIds); return formPageService.findByPageIds(pageIds);
} }
......
package com.tykj.workflowcore.workflow_editer.controller; package com.tykj.workflowcore.workflow_editer.controller;
import com.tykj.workflowcore.api.entity.InvokeRequest;
import com.tykj.workflowcore.base.result.ResultUtil; import com.tykj.workflowcore.base.result.ResultUtil;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.vo.*;
import com.tykj.workflowcore.workflow_editer.service.FlowInfoService; import com.tykj.workflowcore.workflow_editer.service.FlowInfoService;
import com.tykj.workflowcore.workflow_editer.service.WorkFlowService; import com.tykj.workflowcore.workflow_editer.service.WorkFlowService;
import com.tykj.workflowcore.workflow_editer.vo.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.flowable.task.api.Task;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
package com.tykj.workflowcore.workflow_editer.mapper; package com.tykj.workflowcore.workflow_editer.dao;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
......
package com.tykj.workflowcore.workflow_editer.mapper; package com.tykj.workflowcore.workflow_editer.dao;
import com.tykj.workflowcore.workflow_editer.entity.FormPage; import com.tykj.workflowcore.workflow_editer.entity.FormPage;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
...@@ -12,7 +12,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; ...@@ -12,7 +12,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* *
* @Author: zsp * @Author: zsp
*/ */
public interface FormPageMapper extends JpaRepository<FormPage,Long> , JpaSpecificationExecutor<FormPage> { public interface FormPageMapper extends JpaRepository<FormPage,Integer> , JpaSpecificationExecutor<FormPage> {
//增删改查 //增删改查
} }
package com.tykj.workflowcore.workflow_editer.mapper; package com.tykj.workflowcore.workflow_editer.dao;
import com.tykj.workflowcore.workflow_editer.entity.NodeInfo; import com.tykj.workflowcore.workflow_editer.entity.NodeInfo;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
...@@ -12,14 +12,14 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; ...@@ -12,14 +12,14 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* *
* @Author: zsp * @Author: zsp
*/ */
public interface NodePageMapper extends JpaRepository<NodeInfo,Long>, JpaSpecificationExecutor<NodeInfo> { public interface NodePageMapper extends JpaRepository<NodeInfo,Integer>, JpaSpecificationExecutor<NodeInfo> {
/** /**
* 通过节点id得到pageId * 通过节点id得到pageId
* @param nodeId 节点id * @param nodeId 节点id
* @return 返回页面id * @return 返回页面id
*/ */
Long findByNodeId(String nodeId); Integer findByNodeId(String nodeId);
} }
package com.tykj.workflowcore.workflow_editer.mapper; package com.tykj.workflowcore.workflow_editer.dao;
import com.tykj.workflowcore.workflow_editer.entity.VariableStorage; import com.tykj.workflowcore.workflow_editer.entity.VariableStorage;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
...@@ -14,7 +14,7 @@ import java.util.List; ...@@ -14,7 +14,7 @@ import java.util.List;
* *
* @Author: zsp * @Author: zsp
*/ */
public interface VariableStorageMapper extends JpaRepository<VariableStorage,Long>, JpaSpecificationExecutor<VariableStorage> { public interface VariableStorageMapper extends JpaRepository<VariableStorage,Integer>, JpaSpecificationExecutor<VariableStorage> {
/** /**
* 通过流程主键获取变量池 * 通过流程主键获取变量池
......
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.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotations.WorkFlowCoreNoScan;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -11,10 +11,6 @@ import org.hibernate.annotations.SQLDelete; ...@@ -11,10 +11,6 @@ import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where; import org.hibernate.annotations.Where;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
/** /**
* ClassName: FlowsInfo * ClassName: FlowsInfo
...@@ -35,10 +31,10 @@ import java.util.Date; ...@@ -35,10 +31,10 @@ import java.util.Date;
public class FlowsInfo extends BaseEntity { public class FlowsInfo extends BaseEntity {
@ApiModelProperty("发起人的Id") @ApiModelProperty("发起人的Id")
private Long userId; private Integer userId;
@ApiModelProperty("发起人的名字") @ApiModelProperty("发起人的名字")
private Long userName; private String userName;
@ApiModelProperty("流程名称") @ApiModelProperty("流程名称")
private String flowName; private String flowName;
......
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.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotations.WorkFlowCoreNoScan;
import com.tykj.workflowcore.workflow_editer.vo.InFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.OutFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.OutFormPageVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
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.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotations.WorkFlowCoreNoScan;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -9,9 +9,6 @@ import lombok.Data; ...@@ -9,9 +9,6 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
/** /**
* ClassName: NodePage * ClassName: NodePage
...@@ -34,7 +31,7 @@ public class NodeInfo extends BaseEntity { ...@@ -34,7 +31,7 @@ public class NodeInfo extends BaseEntity {
private String nodeId; private String nodeId;
@ApiModelProperty("页面id") @ApiModelProperty("页面id")
private long pageId; private Integer pageId;
@ApiModelProperty("流程key") @ApiModelProperty("流程key")
private String flowKey; private String flowKey;
......
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.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan; import com.tykj.workflowcore.model_layer.annotations.WorkFlowCoreNoScan;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
/** /**
* ClassName: VariableStorage * ClassName: VariableStorage
......
...@@ -25,7 +25,7 @@ import java.io.Serializable; ...@@ -25,7 +25,7 @@ import java.io.Serializable;
@Api("用户表") @Api("用户表")
public class WorkFlowUser implements Serializable { public class WorkFlowUser implements Serializable {
private Long id; private Integer id;
private String userName; private String userName;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -24,7 +24,7 @@ public class DeployedVo { ...@@ -24,7 +24,7 @@ public class DeployedVo {
private FlowsInfoVo flowsInfoVo; private FlowsInfoVo flowsInfoVo;
@ApiModelProperty("节点的第一个绑定的页面id") @ApiModelProperty("节点的第一个绑定的页面id")
private Long pageId; private Integer pageId;
@ApiModelProperty("流程主键") @ApiModelProperty("流程主键")
private String flowKey; private String flowKey;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
...@@ -29,7 +29,7 @@ public class FlowsInfoVo { ...@@ -29,7 +29,7 @@ public class FlowsInfoVo {
private Integer id; private Integer id;
@ApiModelProperty("发起人的名字") @ApiModelProperty("发起人的名字")
private Long userName; private Integer userName;
@ApiModelProperty("流程名称") @ApiModelProperty("流程名称")
private String flowName; private String flowName;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.workflow_editer.entity.FormPage; import com.tykj.workflowcore.workflow_editer.entity.FormPage;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -25,7 +25,8 @@ import java.util.List; ...@@ -25,7 +25,8 @@ import java.util.List;
public class InFormPageVo { public class InFormPageVo {
@ApiModelProperty("页面id") @ApiModelProperty("页面id")
private Long id; private Integer id;
@ApiModelProperty("页面名称") @ApiModelProperty("页面名称")
private String pageName; private String pageName;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.api.entity.InvokeRequest; import com.tykj.workflowcore.api.entity.InvokeRequest;
import com.tykj.workflowcore.api.entity.Parameter; import com.tykj.workflowcore.api.entity.Parameter;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.base.page.JpaCustomOrder; import com.tykj.workflowcore.base.page.JpaCustomOrder;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
...@@ -17,7 +17,7 @@ import lombok.NoArgsConstructor; ...@@ -17,7 +17,7 @@ import lombok.NoArgsConstructor;
public class NodeInfoVo { public class NodeInfoVo {
@ApiModelProperty("主键id") @ApiModelProperty("主键id")
private Long id; private Integer id;
@ApiModelProperty("节点id") @ApiModelProperty("节点id")
private String nodeId; private String nodeId;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.base.page.JpaCustomOrder; import com.tykj.workflowcore.base.page.JpaCustomOrder;
import com.tykj.workflowcore.base.page.JpaCustomPage; import com.tykj.workflowcore.base.page.JpaCustomPage;
...@@ -26,7 +26,7 @@ import java.util.List; ...@@ -26,7 +26,7 @@ import java.util.List;
public class OutFormPageVo { public class OutFormPageVo {
@ApiModelProperty("主键id") @ApiModelProperty("主键id")
private Long id; private Integer id;
@ApiModelProperty("页面名称") @ApiModelProperty("页面名称")
private String pageName; private String pageName;
......
package com.tykj.workflowcore.workflow_editer.entity.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -20,7 +19,7 @@ import java.util.List; ...@@ -20,7 +19,7 @@ import java.util.List;
@Data @Data
public class PageEntityVo { public class PageEntityVo {
private Long pageId; private Integer pageId;
private List<String> entityIds; private List<String> entityIds;
} }
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.base.page.JpaCustomPage; import com.tykj.workflowcore.base.page.JpaCustomPage;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -21,7 +21,7 @@ import java.util.List; ...@@ -21,7 +21,7 @@ import java.util.List;
public class PageVo { public class PageVo {
@ApiModelProperty("用户id") @ApiModelProperty("用户id")
private Long userId; private Integer userId;
@ApiModelProperty("list集合") @ApiModelProperty("list集合")
private List list; private List list;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -20,7 +20,7 @@ public class SuspendVo { ...@@ -20,7 +20,7 @@ public class SuspendVo {
/** /**
* 流程id * 流程id
*/ */
private Long id; private Integer id;
/** /**
* 是否可用 0 挂起 1 激活 * 是否可用 0 挂起 1 激活
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -29,13 +29,13 @@ public class TaskVo { ...@@ -29,13 +29,13 @@ public class TaskVo {
private String comments; private String comments;
@ApiModelProperty("用户id") @ApiModelProperty("用户id")
private Long userId; private Integer userId;
@ApiModelProperty(value = "是否同意",notes = "0 同意, 1拒绝 ") @ApiModelProperty(value = "是否同意",notes = "0 同意, 1拒绝 ")
private Integer handlingOpinion; private Integer handlingOpinion;
@ApiModelProperty("转交人的id") @ApiModelProperty("转交人的id")
private Long toUserId; private Integer toUserId;
private Map<String,Object> map; private Map<String,Object> map;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
......
package com.tykj.workflowcore.workflow_editer.entity.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import com.tykj.workflowcore.workflow_editer.entity.VariableStorage; import com.tykj.workflowcore.workflow_editer.entity.VariableStorage;
import com.tykj.workflowcore.workflow_editer.vo.OutFormPageVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
/** /**
* @author HuangXiahao * @author HuangXiahao
* @version V1.0 * @version V1.0
...@@ -23,7 +17,7 @@ import javax.persistence.Id; ...@@ -23,7 +17,7 @@ import javax.persistence.Id;
@NoArgsConstructor @NoArgsConstructor
public class VariableStorageVo { public class VariableStorageVo {
private Long id; private Integer id;
private String flowKey; private String flowKey;
......
package com.tykj.workflowcore.workflow_editer.vo; package com.tykj.workflowcore.workflow_editer.entity.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
//package com.tykj.workflowcore.workflow_editer.mapper;
//
//import com.tykj.workflowcore.model_layer.model.TableInfo;
//import com.tykj.workflowcore.workflow_editer.entity.PageEntity;
//import org.springframework.data.jpa.repository.JpaRepository;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//
//import java.util.List;
//
///**
// * ClassName: PageEntityMapper
// * Package: com.tykj.mapper
// * Description:
// * Datetime: 2021/3/4 9:53
// *
// * @Author: zsp
// */
//public interface PageEntityMapper extends JpaRepository<PageEntity,Long>, JpaSpecificationExecutor<PageEntity> {
//
// /**
// * 根据页面id查询
// * @param pageId 页面id
// * @return
// */
// PageEntity findByPageId(Integer pageId);
//}
//
...@@ -2,13 +2,10 @@ package com.tykj.workflowcore.workflow_editer.service; ...@@ -2,13 +2,10 @@ package com.tykj.workflowcore.workflow_editer.service;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo; import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo;
import com.tykj.workflowcore.workflow_editer.vo.FlowsInfoVo; import com.tykj.workflowcore.workflow_editer.entity.vo.FlowsInfoVo;
import com.tykj.workflowcore.workflow_editer.vo.PageVo;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/** /**
* ClassName: FlowInfoService * ClassName: FlowInfoService
* Package: com.tykj.service * Package: com.tykj.service
......
package com.tykj.workflowcore.workflow_editer.service; package com.tykj.workflowcore.workflow_editer.service;
import com.tykj.workflowcore.model_layer.model.TableInfo; import com.tykj.workflowcore.model_layer.entity.TableInfo;
import com.tykj.workflowcore.workflow_editer.entity.FormPage; import com.tykj.workflowcore.workflow_editer.entity.FormPage;
import com.tykj.workflowcore.workflow_editer.vo.InFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.InFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.OutFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.PageFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.PageFormPageVo;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -39,13 +38,13 @@ public interface FormPageService { ...@@ -39,13 +38,13 @@ public interface FormPageService {
* @param id 页面id * @param id 页面id
* @return 页面信息 * @return 页面信息
*/ */
FormPage getPage(@PathVariable("id") Long id); FormPage getPage(@PathVariable("id") Integer id);
/** /**
* 根据页面id删除页面 * 根据页面id删除页面
* @param id 页面id * @param id 页面id
*/ */
void deletePage(Long id); void deletePage(Integer id);
/** /**
* 查询全部页面 * 查询全部页面
...@@ -59,5 +58,5 @@ public interface FormPageService { ...@@ -59,5 +58,5 @@ public interface FormPageService {
* @param pageIds 页面id * @param pageIds 页面id
* @return * @return
*/ */
List<TableInfo> findByPageIds(List<Long> pageIds); List<TableInfo> findByPageIds(List<Integer> pageIds);
} }
...@@ -18,7 +18,7 @@ public interface NodeInfoService { ...@@ -18,7 +18,7 @@ public interface NodeInfoService {
* @param nodeId 节点id * @param nodeId 节点id
* @return 返回页面id * @return 返回页面id
*/ */
Long findByNodeId(String nodeId); Integer findByNodeId(String nodeId);
/** /**
* 保存节点和页面的关系 * 保存节点和页面的关系
......
package com.tykj.workflowcore.workflow_editer.service; package com.tykj.workflowcore.workflow_editer.service;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.vo.*; import com.tykj.workflowcore.workflow_editer.entity.vo.*;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -98,7 +98,7 @@ public interface WorkFlowService { ...@@ -98,7 +98,7 @@ public interface WorkFlowService {
* @param userId 用户Id * @param userId 用户Id
*/ */
void claimTask(String taskId, Long userId); void claimTask(String taskId, Integer userId);
//历史查询 //历史查询
......
...@@ -23,7 +23,7 @@ public class DefaultUserServiceImpl implements UserService { ...@@ -23,7 +23,7 @@ public class DefaultUserServiceImpl implements UserService {
@Override @Override
public WorkFlowUser getCurrentUser() { public WorkFlowUser getCurrentUser() {
WorkFlowUser workFlowUser = new WorkFlowUser(); WorkFlowUser workFlowUser = new WorkFlowUser();
workFlowUser.setId(1L); workFlowUser.setId(1);
workFlowUser.setUserName("张三"); workFlowUser.setUserName("张三");
return workFlowUser; return workFlowUser;
} }
...@@ -34,7 +34,7 @@ public class DefaultUserServiceImpl implements UserService { ...@@ -34,7 +34,7 @@ public class DefaultUserServiceImpl implements UserService {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
WorkFlowUser workFlowUser = new WorkFlowUser(); WorkFlowUser workFlowUser = new WorkFlowUser();
workFlowUser.setUserName("张1"); workFlowUser.setUserName("张1");
workFlowUser.setId((long) i); workFlowUser.setId(i);
workFlowUsers.add(workFlowUser); workFlowUsers.add(workFlowUser);
} }
return workFlowUsers; return workFlowUsers;
......
...@@ -5,18 +5,14 @@ import com.github.wenhao.jpa.Specifications; ...@@ -5,18 +5,14 @@ import com.github.wenhao.jpa.Specifications;
import com.tykj.workflowcore.base.result.ApiException; import com.tykj.workflowcore.base.result.ApiException;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo; import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo; import com.tykj.workflowcore.workflow_editer.entity.vo.SearchFlowInfoVo;
import com.tykj.workflowcore.workflow_editer.mapper.FlowsInfoMapper; import com.tykj.workflowcore.workflow_editer.dao.FlowsInfoMapper;
import com.tykj.workflowcore.workflow_editer.service.FlowInfoService; import com.tykj.workflowcore.workflow_editer.service.FlowInfoService;
import com.tykj.workflowcore.workflow_editer.vo.FlowsInfoVo; import com.tykj.workflowcore.workflow_editer.entity.vo.FlowsInfoVo;
import com.tykj.workflowcore.workflow_editer.vo.PageVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Optional; import java.util.Optional;
/** /**
......
...@@ -4,14 +4,12 @@ package com.tykj.workflowcore.workflow_editer.service.impl; ...@@ -4,14 +4,12 @@ package com.tykj.workflowcore.workflow_editer.service.impl;
import com.github.wenhao.jpa.PredicateBuilder; import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
import com.tykj.workflowcore.model_layer.dao.TableInfoDao; import com.tykj.workflowcore.model_layer.dao.TableInfoDao;
import com.tykj.workflowcore.model_layer.model.TableInfo; import com.tykj.workflowcore.model_layer.entity.TableInfo;
import com.tykj.workflowcore.workflow_editer.entity.FlowsInfo;
import com.tykj.workflowcore.workflow_editer.entity.FormPage; import com.tykj.workflowcore.workflow_editer.entity.FormPage;
import com.tykj.workflowcore.workflow_editer.mapper.FormPageMapper; import com.tykj.workflowcore.workflow_editer.dao.FormPageMapper;
import com.tykj.workflowcore.workflow_editer.service.FormPageService; import com.tykj.workflowcore.workflow_editer.service.FormPageService;
import com.tykj.workflowcore.workflow_editer.vo.InFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.InFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.OutFormPageVo; import com.tykj.workflowcore.workflow_editer.entity.vo.PageFormPageVo;
import com.tykj.workflowcore.workflow_editer.vo.PageFormPageVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -52,7 +50,7 @@ public class FormPageServiceImpl implements FormPageService { ...@@ -52,7 +50,7 @@ public class FormPageServiceImpl implements FormPageService {
} }
@Override @Override
public FormPage getPage(@PathVariable("id") Long id) { public FormPage getPage(@PathVariable("id") Integer id) {
FormPage formPage = formPageMapper.findById(id).get(); FormPage formPage = formPageMapper.findById(id).get();
//时间排序 //时间排序
...@@ -60,7 +58,7 @@ public class FormPageServiceImpl implements FormPageService { ...@@ -60,7 +58,7 @@ public class FormPageServiceImpl implements FormPageService {
} }
@Override @Override
public void deletePage(Long id) { public void deletePage(Integer id) {
FormPage formPage = formPageMapper.findById(id).get(); FormPage formPage = formPageMapper.findById(id).get();
formPage.setDeleted(1); formPage.setDeleted(1);
formPageMapper.save(formPage); formPageMapper.save(formPage);
...@@ -80,9 +78,9 @@ public class FormPageServiceImpl implements FormPageService { ...@@ -80,9 +78,9 @@ public class FormPageServiceImpl implements FormPageService {
} }
@Override @Override
public List<TableInfo> findByPageIds(List<Long> pageIds) { public List<TableInfo> findByPageIds(List<Integer> pageIds) {
ArrayList<TableInfo> list = new ArrayList<>(); ArrayList<TableInfo> list = new ArrayList<>();
for (Long pageId : pageIds) { for (Integer pageId : pageIds) {
//通过pageId 查询出表id //通过pageId 查询出表id
String entityId = formPageMapper.findById(pageId).get().getEntityId(); String entityId = formPageMapper.findById(pageId).get().getEntityId();
//根据entityId查询出表 //根据entityId查询出表
......
package com.tykj.workflowcore.workflow_editer.service.impl; package com.tykj.workflowcore.workflow_editer.service.impl;
import com.tykj.workflowcore.workflow_editer.entity.NodeInfo; import com.tykj.workflowcore.workflow_editer.entity.NodeInfo;
import com.tykj.workflowcore.workflow_editer.mapper.NodePageMapper; import com.tykj.workflowcore.workflow_editer.dao.NodePageMapper;
import com.tykj.workflowcore.workflow_editer.service.NodeInfoService; import com.tykj.workflowcore.workflow_editer.service.NodeInfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -22,7 +22,7 @@ public class NodeInfoServiceImpl implements NodeInfoService { ...@@ -22,7 +22,7 @@ public class NodeInfoServiceImpl implements NodeInfoService {
@Autowired @Autowired
private NodePageMapper nodePageMapper; private NodePageMapper nodePageMapper;
@Override @Override
public Long findByNodeId(String nodeId) { public Integer findByNodeId(String nodeId) {
return nodePageMapper.findByNodeId(nodeId); return nodePageMapper.findByNodeId(nodeId);
} }
......
package com.tykj.workflowcore.workflow_editer.service.impl; package com.tykj.workflowcore.workflow_editer.service.impl;
import com.tykj.workflowcore.workflow_editer.entity.VariableStorage; import com.tykj.workflowcore.workflow_editer.entity.VariableStorage;
import com.tykj.workflowcore.workflow_editer.mapper.VariableStorageMapper; import com.tykj.workflowcore.workflow_editer.dao.VariableStorageMapper;
import com.tykj.workflowcore.workflow_editer.service.VariableStorageService; import com.tykj.workflowcore.workflow_editer.service.VariableStorageService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -5,13 +5,12 @@ import com.tykj.workflowcore.api.entity.InvokeRequest; ...@@ -5,13 +5,12 @@ import com.tykj.workflowcore.api.entity.InvokeRequest;
import com.tykj.workflowcore.api.entity.Parameter; import com.tykj.workflowcore.api.entity.Parameter;
import com.tykj.workflowcore.api.service.SpringBeanService; import com.tykj.workflowcore.api.service.SpringBeanService;
import com.tykj.workflowcore.workflow_editer.entity.*; import com.tykj.workflowcore.workflow_editer.entity.*;
import com.tykj.workflowcore.workflow_editer.mapper.FlowsInfoMapper; import com.tykj.workflowcore.workflow_editer.dao.FlowsInfoMapper;
import com.tykj.workflowcore.workflow_editer.service.NodeInfoService; import com.tykj.workflowcore.workflow_editer.entity.vo.*;
import com.tykj.workflowcore.workflow_editer.service.UserService; import com.tykj.workflowcore.workflow_editer.service.UserService;
import com.tykj.workflowcore.workflow_editer.service.VariableStorageService; import com.tykj.workflowcore.workflow_editer.service.VariableStorageService;
import com.tykj.workflowcore.workflow_editer.service.WorkFlowService; import com.tykj.workflowcore.workflow_editer.service.WorkFlowService;
import com.tykj.workflowcore.workflow_editer.util.UserServiceBeanUtil; import com.tykj.workflowcore.workflow_editer.util.UserServiceBeanUtil;
import com.tykj.workflowcore.workflow_editer.vo.*;
import org.dom4j.Attribute; import org.dom4j.Attribute;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.DocumentException; import org.dom4j.DocumentException;
...@@ -23,7 +22,6 @@ import org.flowable.common.engine.impl.identity.Authentication; ...@@ -23,7 +22,6 @@ import org.flowable.common.engine.impl.identity.Authentication;
import org.flowable.engine.*; import org.flowable.engine.*;
import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.flowable.engine.repository.Deployment; import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.DeploymentBuilder;
import org.flowable.engine.runtime.Execution; import org.flowable.engine.runtime.Execution;
import org.flowable.engine.runtime.ProcessInstance; import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.image.ProcessDiagramGenerator; import org.flowable.image.ProcessDiagramGenerator;
...@@ -31,8 +29,6 @@ import org.flowable.task.api.Task; ...@@ -31,8 +29,6 @@ import org.flowable.task.api.Task;
import org.flowable.task.api.TaskQuery; import org.flowable.task.api.TaskQuery;
import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.api.history.HistoricTaskInstance;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -323,9 +319,9 @@ public class WorkFlowServiceImpl implements WorkFlowService { ...@@ -323,9 +319,9 @@ public class WorkFlowServiceImpl implements WorkFlowService {
} }
@Override @Override
public void claimTask(String taskId, Long userId) { public void claimTask(String taskId, Integer userId) {
//当前登录人的Id //当前登录人的Id
taskService.claim(taskId,Long.toString(userId)); taskService.claim(taskId,Integer.toString(userId));
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论