Commit c1302825 authored by 廖旭伟's avatar 廖旭伟

自助终端后台

parents
Pipeline #2436 failed with stages
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mortals.xhx</groupId>
<artifactId>self-service</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.mortals.xhx</groupId>
<artifactId>common-lib</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>公共依赖库</description>
<dependencies>
<dependency>
<groupId>com.mortals.framework</groupId>
<artifactId>mortals-framework-springcloud</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
\ No newline at end of file
package com.mortals.xhx.common.code;
/**
* @author karlhoo
*/
public enum ApiRespCodeEnum {
/** 接收成功 */
SUCCESS(1, "接收成功"),
/** 执行失败 */
FAILED(2,"执行失败"),
;
private final Integer value;
private final String label;
ApiRespCodeEnum(Integer value, String label) {
this.value = value;
this.label = label;
}
public int getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 审核状态
* @author
*
*/
public enum ApproveStateEnum implements IBaseEnum {
UN_AUDIT(1, "未审核", SysConstains.STYLE_DEFAULT),
AUDITING(2, "审核中", SysConstains.STYLE_PRIMARY),
AUDIT_FIN(3, "审核完成", SysConstains.STYLE_PRIMARY);
private int value;
private String desc;
private String style;
ApproveStateEnum(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static ApproveStateEnum getByValue(int value) {
for (ApproveStateEnum examStatus : ApproveStateEnum.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (ApproveStateEnum item : ApproveStateEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 区域级别
*
* @author yiqimin
* @create 2018/09/26
*/
public enum AreaLevelEnum implements IBaseEnum {
PROVINCE(1, "省", SysConstains.STYLE_DEFAULT),
CITY(2, "市", SysConstains.STYLE_DEFAULT),
AREA(3, "区/县", SysConstains.STYLE_DEFAULT),
TOWN(4, "镇", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
AreaLevelEnum(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static AreaLevelEnum getByValue(int value) {
for (AreaLevelEnum e : AreaLevelEnum.values()) {
if (e.getValue() == value) {
return e;
}
}
return null;
}
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (AreaLevelEnum item : AreaLevelEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 资源类型
* @author
*
*/
public enum AuthType implements IBaseEnum {
UNLIMITED(0, "无限制", SysConstains.STYLE_DEFAULT),
UNLOGIN(1, "无需登录查看", SysConstains.STYLE_DEFAULT),
LOGIN(2, "需要登录查看", SysConstains.STYLE_DEFAULT),
AUTH(3, "需要角色权限查看", SysConstains.STYLE_PRIMARY);
//0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看,默认3
private int value;
private String desc;
private String style;
AuthType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static AuthType getByValue(int value) {
for (AuthType examStatus : AuthType.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (AuthType item : AuthType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.io.Serializable;
/**
* 审批模式
*
* @author: zxfei
* @date: 2021/8/26 9:58
*/
public enum CommentTypeEnum implements Serializable {
SP("审批"),
QS("签收"),
FQS("反签收"),
BH("驳回"),
CH("撤回"),
ZC("暂存"),
XTZX("系统执行"),
TJ("提交"),
CXTJ("重新提交"),
SPJS("审批结束"),
LCZZ("流程终止"),
WP("委派"),
ZH("知会"),
ZY("转阅"),
YY("已阅"),
ZB("转办"),
SQ("授权"),
SPBJQ("审批并加签"),
HJQ("后加签"),
QJQ("前加签"),
CFTG("重复跳过"),
XT("协同"),
PS("评审");
private String name;//名称
/**
* 通过type获取Msg
*
* @param type
* @return
* @Description:
*/
public static String getEnumMsgByType(String type) {
for (CommentTypeEnum e : CommentTypeEnum.values()) {
if (e.toString().equals(type)) {
return e.name;
}
}
return "";
}
CommentTypeEnum(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum CompareTypeEnum implements IBaseEnum {
DAY(1, "按日"),
MONTH(2, "按月");
private int value;
private String desc;
CompareTypeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
@Override
public String getDesc() {
return this.desc;
}
public static Map<String,String> getEnumMap() {
Map<String, String> resultMap= new LinkedHashMap<String, String>();
for (CompareTypeEnum item : CompareTypeEnum.values()) {
resultMap.put(item.getValue() + "", item.getDesc());
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 资源类型
* @author
*
*/
public enum DataSatus implements IBaseEnum {
DISENABLE(0, "禁用", SysConstains.STYLE_DEFAULT),
ENABLE(1, "启用", SysConstains.STYLE_DEFAULT),
CLOSE(2, "注销", SysConstains.STYLE_DEFAULT),
DELETE(3, "已删除", SysConstains.STYLE_DEFAULT),
OVERDUE(4, "过期", SysConstains.STYLE_DEFAULT),
USEOUT(5, "用完", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
DataSatus(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static DataSatus getByValue(int value) {
for (DataSatus examStatus : DataSatus.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (DataSatus item : DataSatus.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 资源类型
* @author
*
*/
public enum DataSatusEnum {
DISENABLE(0, "禁用"),
ENABLE(1, "启用"),
CLOSE(2, "注销"),
DELETE(3, "已删除"),
OVERDUE(4, "过期"),
USEOUT(5, "用完");
private int value;
private String desc;
DataSatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static DataSatusEnum getByValue(int value) {
for (DataSatusEnum examStatus : DataSatusEnum.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (DataSatusEnum item : DataSatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 流程状态
* @author
*
*/
public enum FlowStateType implements IBaseEnum {
/** 激活 */
active(1, "激活", SysConstains.STYLE_DEFAULT),
/** 挂起 */
suspend(2, "挂起", SysConstains.STYLE_PRIMARY);
private int value;
private String desc;
private String style;
FlowStateType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static FlowStateType getByValue(int value) {
for (FlowStateType examStatus : FlowStateType.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (FlowStateType item : FlowStateType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 流程通知状态
* @author
*
*/
public enum FlowStatusNotifyType implements IBaseEnum {
FLOW_START(0, "流程启动", SysConstains.STYLE_DEFAULT),
FLOW_END(1, "流程结束", SysConstains.STYLE_PRIMARY),
TASK_CREATE(2, "任务创建", SysConstains.STYLE_PRIMARY),
TASK_COMPLETE(3, "任务结束", SysConstains.STYLE_PRIMARY);
private int value;
private String desc;
private String style;
FlowStatusNotifyType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static FlowStatusNotifyType getByValue(int value) {
for (FlowStatusNotifyType examStatus : FlowStatusNotifyType.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (FlowStatusNotifyType item : FlowStatusNotifyType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum MenuAuthType implements IBaseEnum{
/** 无限制 */
UNLIMIT(0, "无限制", SysConstains.STYLE_DEFAULT),
/** 无需登录查看 */
WITHOUTLOGIN(1, "无需登录查看", SysConstains.STYLE_DEFAULT),
/** 需要登录查看 */
WITHLOGIN(2, "需要登录查看", SysConstains.STYLE_DEFAULT),
/** 需要角色权限查看 */
WITHAUTHORITY(3, "需要角色权限查看", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
MenuAuthType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static MenuAuthType getByValue(int value) {
for (MenuAuthType menuAuthType : MenuAuthType.values()) {
if (menuAuthType.getValue() == value) {
return menuAuthType;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (MenuAuthType item : MenuAuthType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum MenuComm implements IBaseEnum{
/** 非常用 */
UNCOMMON(0, "非常用", SysConstains.STYLE_DEFAULT),
/** 常用 */
COMMON(1, "常用", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
MenuComm(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static MenuComm getByValue(int value) {
for (MenuComm menuComm : MenuComm.values()) {
if (menuComm.getValue() == value) {
return menuComm;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (MenuComm item : MenuComm.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum MenuLinkType implements IBaseEnum{
/** 普通 */
NORMAL(0, "普通", SysConstains.STYLE_DEFAULT),
/** 弹出 */
POP(1, "弹出", SysConstains.STYLE_DEFAULT),
/** 脚本(JavaScript) */
SCRIPT(2, "脚本", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
MenuLinkType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static MenuLinkType getByValue(int value) {
for (MenuLinkType menuLinkType : MenuLinkType.values()) {
if (menuLinkType.getValue() == value) {
return menuLinkType;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (MenuLinkType item : MenuLinkType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum MenuType implements IBaseEnum{
/** 主菜单 */
MAIN(0, "主菜单", SysConstains.STYLE_DEFAULT),
/** 非主菜单 */
UNMAIN(1, "非主菜单", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
MenuType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static MenuType getByValue(int value) {
for (MenuType menuType : MenuType.values()) {
if (menuType.getValue() == value) {
return menuType;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (MenuType item : MenuType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 参数修改状态
* @author
*
*/
public enum ModStatusEnum {
/** 页面隐藏 */
HIDDEN(0, "隐藏"),
/** 页面可查看 */
VIEW(1, "查看"),
/** 页面可修改 */
EDIT(2, "修改"),
/** 页面可删除 */
DELETE(3, "删除"),
/** 页面可修改删除 */
EDITANDDELETE(4, "修改删除");
private int value;
private String desc;
ModStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static ModStatusEnum getByValue(int value) {
for (ModStatusEnum modStatus : ModStatusEnum.values()) {
if (modStatus.getValue() == value) {
return modStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (ModStatusEnum item : ModStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.HashMap;
import java.util.Map;
/**
* Created by chendilin on 2018/3/7.
*/
public enum OperTypeEnum {
SAVE(0,"添加"),
UPDATE(1,"更新"),
DELETE(2,"删除"),
OTHER(-1,"其它");
private int value;
private String msg;
private OperTypeEnum(int value,String msg) {
this.value = value;
this.msg = msg;
}
public int getValue() {
return this.value;
}
public static Map<String,String> getEnumMap(){
Map<String,String> resultMap = new HashMap<>();
OperTypeEnum[] operTypeEnum = OperTypeEnum.values();
for (OperTypeEnum typeEnum : operTypeEnum) {
resultMap.put(String.valueOf(typeEnum.value),typeEnum.msg);
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.io.Serializable;
/**
* 流程的状态
*
* @author: zxfei
* @date: 2021/8/26 9:58
*/
public enum ProcessStatusEnum implements Serializable {
SPZ("审批中"),
BH("驳回"),
CH("撤回"),
JQ("加签"),
ZC("暂存"),
ZB("转办"),
BJ("办结"),
ZZ("终止");
private String msg;
private String type;
ProcessStatusEnum(String msg) {
this.msg = msg;
}
/**
* 通过type获取Msg
*
* @param type
* @return
* @Description:
*/
public static String getEnumMsgByType(String type) {
for (ProcessStatusEnum e : ProcessStatusEnum.values()) {
if (e.toString().equals(type)) {
return e.msg;
}
}
return "";
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
/**
* 业务统一返回码
* @author linlc
*
*/
public enum ResultCodeEnum {
CODE_001(156001,"参数类型错误"),
CODE_002(156002,"部分参数为空"),
CODE_003(156003,"参数长度超过限制"),
CODE_004(156004,"日期格式错误"),
CODE_005(156005,"时间区间不合法"),
CODE_006(156006,"远端服务不可用"),
CODE_007(156007,"无效的签名"),
CODE_008(156008,"不合法的 AppID ,请开发者检查 AppID 的正确性,避免异常字符,注意大小写"),
CODE_009(156009,"请求来源地址不合法"),
CODE_010(156010,"没有相应的用户"),
CODE_011(156011,"不合法的文件类型"),
CODE_012(156012,"不合法的文件大小"),
CODE_013(156013,"上传文件缺失"),
CODE_014(156014,"不支持的图片格式"),
CODE_015(156015,"无效的url"),
CODE_016(156016,"设备编号不合法"),
CODE_017(356017,"设备编号不存在"),
CODE_018(356018,"设备当前在线状态为“离线”,无法使用!"),
CODE_019(356019,"设备当前投放状态为“待重投”,无法使用!"),
CODE_020(356020,"设备当前投放状态为“已报废”,无法使用!"),
CODE_021(356021,"设备当前投放状态为“初始化”,无法使用!"),
CODE_022(356022,"此设备当前启用状态为“禁用”,无法使用!"),
CODE_023(356023,"API 调用太频繁,请稍候再试"),
CODE_024(256024,"用户未授权该 api"),
CODE_025(156025,"解析 JSON/XML 内容错误"),
CODE_FAILUER(-1,"失败");
private int value;
private String desc;
ResultCodeEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return value;
}
public String getDesc() {
return desc;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 角色类型
* @author
*
*/
public enum RoleType implements IBaseEnum {
/** 系统内置角色 */
BUILT_IN(0, "系统内置角色", SysConstains.STYLE_DEFAULT),
/** 默认系统角色 */
SYSTEM_DEFAULT(1, "默认系统角色", SysConstains.STYLE_INFO),
/** 企业用户角色 */
CUSTOMER_DEFAULT(2, "企业用户角色", SysConstains.STYLE_PRIMARY),
/** 普通角色 */
NORMAL(4, "普通角色 ", SysConstains.STYLE_SUCCESS),;
//0:系统内置角色(不可删除),1:默认系统角色,2:默认新闻用户角色,3:默认资讯用户角色,4:普通角色,默认4
private int value;
private String desc;
private String style;
RoleType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static RoleType getByValue(int value) {
for (RoleType examStatus : RoleType.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (RoleType item : RoleType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 资源类型
* @author
*
*/
public enum SourceType implements IBaseEnum {
/** 系统资源 */
SYSTEM(0, "系统资源", SysConstains.STYLE_DEFAULT),
/** 开放资源 */
OPEN(1, "开放资源", SysConstains.STYLE_PRIMARY);
private int value;
private String desc;
private String style;
SourceType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static SourceType getByValue(int value) {
for (SourceType examStatus : SourceType.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (SourceType item : SourceType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.io.Serializable;
/**
* 启动参数
*
* @author: zxfei
* @date: 2021/8/26 9:59
*/
public enum StartVariableEnum implements Serializable {
USER("user", "人员信息"),
UDEPT("udept", "人员部门变量"),
UCOMPANY("ucompany", "人员公司变量"),
COMPANY_ROLE("company", "公司角色层级审批领导"),
MATRIX_COMPANY_ROLE("mcompany", "矩阵公司角色"),
MATRIX_DEPT_ROLE("mdept", "矩阵部门角色"),
FORM("form", "表单"),
LCDB("lcdb", "流程底表"),
LINE("line", "汇报线");
private String code;
private String msg;
StartVariableEnum(String code, String msg) {
this.msg = msg;
this.code = code;
}
/**
* 通过code获取Msg
*
* @param code
* @return
* @Description:
*/
public static String getEnumMsgByCode(String code) {
for (StartVariableEnum e : StartVariableEnum.values()) {
if (e.getCode().equals(code)) {
return e.msg;
}
}
return "";
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author
* @create 2018/01/12
*/
public enum TaskExcuteStatusEnum {
WAIT_RUN(0, "待执行"),
RUNNING(1, "执行中"),
SUCCESS_RUN(2, "执行成功"),
FAIL_RUN(3, "执行失败"),
CANCEL(4, "取消");
private int value;
private String desc;
TaskExcuteStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static TaskExcuteStatusEnum getByValue(int value) {
for (TaskExcuteStatusEnum taskExcuteStatusEnum : TaskExcuteStatusEnum.values()) {
if (taskExcuteStatusEnum.getValue() == value) {
return taskExcuteStatusEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (TaskExcuteStatusEnum item : TaskExcuteStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum TaskExcuteStrategyEnum{
/** 按日 */
DAY(1, "按日"),
/** 按周 */
WEEK(2, "按周"),
/** 按月 */
MONTH(3, "按月"),
/** 按间隔时间 */
INTERVAL(4, "按间隔时间");
private int value;
private String desc;
TaskExcuteStrategyEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static TaskExcuteStrategyEnum getByValue(int value) {
for (TaskExcuteStrategyEnum taskExcuteStrategy : TaskExcuteStrategyEnum.values()) {
if (taskExcuteStrategy.getValue() == value) {
return taskExcuteStrategy;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (TaskExcuteStrategyEnum item : TaskExcuteStrategyEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum TaskInterimExcuteStatusEnum{
/** 未启用 */
UNUSE(0, "未启用"),
/** 立即执行并保留 */
IMMEDIATE_EXECUTION(1, "立即执行并保留"),
/** 立即执行并删除 */
IMMEDIATE_EXECUTION_BEFORE_DELETE(2, "立即执行并删除");
private int value;
private String desc;
TaskInterimExcuteStatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static TaskInterimExcuteStatusEnum getByValue(int value) {
for (TaskInterimExcuteStatusEnum taskInterimExcuteStatus : TaskInterimExcuteStatusEnum.values()) {
if (taskInterimExcuteStatus.getValue() == value) {
return taskInterimExcuteStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (TaskInterimExcuteStatusEnum item : TaskInterimExcuteStatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
/**
* 上传文件类型枚举
*
* @author pengziyuan
*/
public enum UploadFileType implements IBaseEnum {
/** 表格 */
EXCEL(1, "表格", 1024 * 1023 * 100),
/** 图片 */
IMG(2, "图片", 1024 * 1024 * 10),
/** 压缩文件 */
ZIP(3, "压缩文件", 1024 * 1024 * 100),
/** PDF */
PDF(4, "PDF", 1024 * 1024 * 100),
/** 其他 */
OTHER(99, "其他", 1024 * 1024 * 100);
private int value;
private String desc;
private int maxSize;
UploadFileType(int value, String desc, int maxSize) {
this.value = value;
this.desc = desc;
this.maxSize = maxSize;
}
@Override
public int getValue() {
return this.value;
}
@Override
public String getDesc() {
return desc;
}
public int getMaxSize() {
return maxSize;
}
public static UploadFileType getFileType(String extension) {
if ("xls".equalsIgnoreCase(extension) || "xlsx".equalsIgnoreCase(extension)) {
return EXCEL;
}
if ("jpg".equalsIgnoreCase(extension) || "jpeg".equalsIgnoreCase(extension) || "png".equalsIgnoreCase(extension)
|| "gif".equalsIgnoreCase(extension)) {
return IMG;
}
if ("zip".equalsIgnoreCase(extension)) {
return ZIP;
}
if ("pdf".equalsIgnoreCase(extension)) {
return PDF;
}
return OTHER;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum ValidCodeType implements IBaseEnum{
IMAGE(0, "图片校验", SysConstains.STYLE_DEFAULT),
MOBILE(1, "手机校验", SysConstains.STYLE_DEFAULT),
EMAIL(2, "邮箱校验", SysConstains.STYLE_DEFAULT);
private int value;
private String desc;
private String style;
ValidCodeType(int value, String desc, String style) {
this.value = value;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static ValidCodeType getByValue(int value) {
for (ValidCodeType validCodeType : ValidCodeType.values()) {
if (validCodeType.getValue() == value) {
return validCodeType;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (ValidCodeType item : ValidCodeType.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum YesNoEnum implements IBaseEnum{
NO(0, "否"),
YES(1, "是");
private int value;
private String desc;
YesNoEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static YesNoEnum getByValue(int value) {
for (YesNoEnum YesNoEnum : YesNoEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (YesNoEnum item : YesNoEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
package com.mortals.xhx.common.keys;
import java.math.BigDecimal;
/**
* 业务参数类,这个类全部为field参数,可以直接从外部设置和获取
*
* @author karlhoo
*/
public final class BusizParams {
public static int WORK_ID;
/**
* 无限常量:-1
*/
public static int NO_LIMIT = -1;
/**
* 一天的分钟数
*/
public static long DAY_MINUTES = 24 * 60;
/**
* 现金类押金支付金额默认折扣
*/
public static BigDecimal DEFAULT_CASH_DEPOSIT_DISCOUNT = new BigDecimal("1.0");
/**
* 押金默认计费上限费用
*/
public static Long DEFAULT_BILL_LIMIT_FEE = 20000L;
/**
* 现金押金默认计费上限费用
*/
public static Long DEFAULT_CASH_BILL_LIMIT_FEE = 8000L;
/**
* 用户冻结的默认延时
*/
public static Integer DEFAULT_CUSTOMER_FREEZE_DELAY = 121;
/**
* 用户冻结的默认时长
*/
public static Integer DEFAULT_CUSTOMER_FREEZE_LENGHT = 1440;
/**
* 系统参数:按摩椅下发命令间隔时间(单位:秒,默认值:10秒)
*/
public static String SYS_PARAM_CHAIR_ISCMDRSP_INTERVAL = "chair_iscmdrsp_interval";
/**
* 系统参数:闪充待支付超时时间(单位:秒,默认值:600秒)
*/
public static String SYS_PARAM_WIRE_WAITLOAN_TIMEOUT = "wire_waitloan_timeout";
/**
* 系统参数:filetoken过期时间(单位:天,默认值:1天)
*/
public static String SYS_PARAM_PRINT_FILETOKEN_TIMEOUT = "print_filetoken_timeout";
/**
* 系统参数:打印机保存文件过期时间(单位:月,默认值:3)
*/
public static String SYS_PARAM_PRINT_FILE_TIMEOUT = "print_orderfile_timeout";
/**
* 系统参数:打印机保存文件存储使用方式(0:本地存储,1:fastdfs存储)
*/
public static String SYS_PARAM_PRINT_FILE_STORE_MODE = "print_file_store_mode";
/**
* 系统参数:word文件转换方式
*/
public static String SYS_PARAM_PRINT_WORD_CONVERT_METHOD = "print_word_convert_method";
/**
* 系统参数:文件访问域
*/
public static String SYS_PARAM_FILE_DOMAIN = "file_domain";
/**
* 流程参数
*/
public static String SYS_PARAM_FLOW_KEY = "oneThingKey";
}
package com.mortals.xhx.common.keys;
/**
* 关键操作失败时,用来缓存数据的logger名称
*
* @author karlhoo
*/
public interface CacheLoggers {
}
package com.mortals.xhx.common.keys;
/**
* redis缓存参数key
*
* @author karlhoo
*/
public final class RedisCacheKeys {
/**
* @return 文件访问的地址
*/
public static String getFileUrlKey() {
return "params:file:upload";
}
public static String getCoopsDistributedLockKey() {
return "coops:distributed:lock";
}
}
package com.mortals.xhx.common.keys;
/**
* 服务调用响应常量
*
* @author karlhoo
*/
public interface ResponseConstants {
/**
* 请求结果Code主键
*/
String KEY_RESULT_CODE = "code";
/**
* 请求结果Message主键
*/
String KEY_RESULT_MSG = "msg";
/**
* 请求结果Code值-成功
*/
int RESULT_VALUE_SUCCESS = 1;
/**
* 请求结果Code值-失败
*/
int RESULT_VALUE_FAILURE = -1;
}
\ No newline at end of file
package com.mortals.xhx.common.model;
import java.util.List;
import com.mortals.framework.model.PageInfo;
/**
* 列表查询结果数据
* @author lyb
*/
public class ListQueryResult<T> {
/**
* 列表数据
*/
private List<T> list;
/**
* 分页信息
*/
private PageInfo page;
public ListQueryResult() {
}
public ListQueryResult(List<T> list, PageInfo page) {
this.list = list;
this.page = page;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public PageInfo getPage() {
return page;
}
public void setPage(PageInfo page) {
this.page = page;
}
}
package com.mortals.xhx.common.model;
import lombok.Data;
/**
* @author: 流程实体类
* @date: 2021/7/29 14:13
* @description: //TODO 请完善注释信息
**/
@Data
public class RequestProcessReq {
private String processInstanceId;
private String modelId;
private String deployId;
private String userId;
private String dataKey;
private String taskId;
//设置审核人
private String assignee;
}
package com.mortals.xhx.common.model;
import java.util.HashMap;
import java.util.Map;
import com.mortals.framework.exception.AppException;
/**
* 请求结果
* @author lyb
*
* @param <T> 响应结果数据
*/
public class RequestResult<T> {
/**
* 响应码
*/
private Integer code;
/**
* 响应码描述
*/
private String msg;
/**
* 响应结果数据
*/
private T data;
/**
* 字典信息
*/
private Map<String, Map<String, String>> dict;
public RequestResult() {
this(ResponseCode.SUCCESS.getCode(), ResponseCode.SUCCESS.getMsg());
}
public RequestResult(ResponseCode code) {
this(code.getCode(), code.getMsg());
}
public RequestResult(AppException e) {
this(e.getCode(), e.getMessage());
}
public RequestResult(T data) {
this(ResponseCode.SUCCESS.getCode(), ResponseCode.SUCCESS.getMsg(), data);
}
public RequestResult(Integer code, String msg) {
this(code, msg, null);
}
public RequestResult(Integer code, String msg, T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public boolean isSuccess() {
return ResponseCode.SUCCESS.getCode().equals(this.code);
}
public boolean isFailure() {
return !isSuccess();
}
public void addDict(String name, Map<String, String> dict) {
if (this.dict == null) {
this.dict = new HashMap<String, Map<String, String>>();
}
this.dict.put(name, dict);
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public Map<String, Map<String, String>> getDict() {
return dict;
}
public void setDict(Map<String, Map<String, String>> dict) {
this.dict = dict;
}
public static enum ResponseCode {
/**
* 请求处理成功
*/
SUCCESS(1, "请求处理成功"),
/**
* 请求处理失败
*/
FAILURE(-1, "请求处理失败");
/**
* 响应码
*/
private Integer code;
/**
* 响应码描述
*/
private String msg;
private ResponseCode(Integer code, String msg) {
this.code = code;
this.msg = msg;
}
public Integer getCode() {
return code;
}
public String getMsg() {
return msg;
}
}
}
package com.mortals.xhx.common.model;
import com.mortals.framework.exception.AppException;
import com.mortals.xhx.common.pdu.api.ApiRespPdu;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @author: 流程实体类
* @date: 2021/7/29 14:13
* @description: //TODO 请完善注释信息
**/
@Data
public class RequestTaskReq {
private String processInstanceId;
private String modelId;
private String deployId;
private String procDefId;
private String userId;
private String dataKey;
private String taskId;
//设置审核人
private String assignee;
private Integer state;
}
package com.mortals.xhx.common.model;
/**
* @author: finegirl
* @date: 2021/8/1 22:52
* @description:
**/
public class SysRole {
}
package com.mortals.xhx.common.model;
/**
* @author: finegirl
* @date: 2021/8/1 22:51
* @description:
**/
public class SysUser {
}
package com.mortals.xhx.common.model;
/**
* 用户信息
* @author lyb
*/
public class UserInfo {
/**
* 用户ID
*/
private Long userId;
/**
* 用户名称
*/
private String userName;
public UserInfo() {
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
package com.mortals.xhx.common.pdu;
import com.mortals.framework.model.PageInfo;
import lombok.Data;
/**
* @author: zxfei
* @date: 2022/7/13 14:17
* @description:
**/
@Data
public class RespData<T> {
private T data;
private T entity;
private PageInfo pageInfo;
}
package com.mortals.xhx.common.pdu.api;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class ApiReqPdu<T> {
private String seq;
/**
* 透传数据
*/
private T transmission;
}
package com.mortals.xhx.common.pdu.api;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class ApiRespPdu<T> {
/**
* 结果编码
*/
private int code;
/**
* 结果描述
*/
private String msg;
/**
* 响应数据
*/
private T data;
}
package com.mortals.xhx.common.pdu.api;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class Member {
/**
* 会员编号
*/
private String code;
/**
* 会员手机号码
*/
private String phone;
}
package com.mortals.xhx.common.pdu.api;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class Page {
/**
* 每页记录数
*/
private int per;
/**
* 当前请求页数
*/
private int size;
/**
* 总页数
*/
private int total;
}
package com.mortals.xhx.common.pdu.flow;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* 工作流定义前端实体类
*
* @author: finegirl
* @date: 2021/7/31 23:38
*/
@Getter
@Setter
@ApiModel("工作流定义前端实体类")
public class DefinitionVoPdu implements Serializable {
@ApiModelProperty("流程定义ID")
private String deployId;
@ApiModelProperty("状态")
private Integer state;
}
package com.mortals.xhx.common.pdu.flow;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
@Data
@Builder
public class FlowCommentPdu implements Serializable {
/**
* 意见类别 0 正常意见 1 退回意见 2 驳回意见
*/
private String type;
/**
* 意见内容
*/
private String comment;
}
package com.mortals.xhx.common.pdu.flow;
import com.mortals.xhx.common.model.SysRole;
import com.mortals.xhx.common.model.SysUser;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 动态人员、组
*
* @author: finegirl
* @date: 2021/8/1 22:49
*/
@Data
public class FlowNextPdu implements Serializable {
private String type;
/**
* 数据类型(fixed,dynamc两种)
*/
private String dateType;
private String vars;
private String name;
private String assignee;
private List<String> candidateUsers;
private List<String> candidateGroups;
}
package com.mortals.xhx.common.pdu.flow;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* 流程定义实体类
*
* @author: finegirl
* @date: 2021/7/31 14:56
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("流程定义")
public class FlowProcDefPdu implements Serializable {
/**
* 流程id
*/
@ApiModelProperty("流程id")
private String id;
/**
* 流程名称
*/
@ApiModelProperty("流程名称")
private String name;
/**
* 流程key
*/
@ApiModelProperty("流程key")
private String key;
/**
* 流程分类
*/
@ApiModelProperty("流程分类")
private String category;
/**
* 配置表单名称
*/
@ApiModelProperty("配置表单名称")
private String formName;
/**
* 配置表单id
*/
@ApiModelProperty("配置表单id")
private Long formId;
/**
* 版本
*/
@ApiModelProperty("版本")
private int version;
/**
* 部署id
*/
@ApiModelProperty("部署ID")
private String deploymentId;
/**
* 流程定义状态: 1:激活 , 2:中止
*/
@ApiModelProperty("流程定义状态: 1:激活 , 2:中止")
private int suspensionState;
/**
* 部署时间
*/
@ApiModelProperty("部署时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date deploymentTime;
}
package com.mortals.xhx.common.pdu.flow;
import lombok.Data;
import java.io.Serializable;
/**
* 流程类
*
* @author: finegirl
* @date: 2021/7/31 21:15
*/
@Data
public class FlowSaveXmlPdu implements Serializable {
/**
* 流程名称
*/
private String name;
/**
* 流程分类
*/
private String category;
/**
* xml 文件
*/
private String xml;
}
package com.mortals.xhx.common.pdu.flow;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class FlowTaskNotifyPdu implements Serializable {
/**
* 用户审核列表(一个或者多个)
*/
private List<String> userNameList;
/**
* taskId
*/
private String taskId;
/**
* taskName
*/
private String taskName;
/**
* 租户Id
*/
private String tenantId;
}
package com.mortals.xhx.common.pdu.flow;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.xhx.feign.AttachmentEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 工作流任务
*
* @author: finegirl
* @date: 2021/7/31 23:38
*/
@Getter
@Setter
@ApiModel("工作流任务相关-返回参数")
public class FlowTaskPdu implements Serializable {
@ApiModelProperty("任务编号")
private String taskId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("是否为子任务,0否 1是")
private Integer subTask=0;
@ApiModelProperty("父任务编号")
private String parentTaskId;
@ApiModelProperty("业务系统key")
private String businessKey;
@ApiModelProperty("任务Key")
private String taskDefKey;
@ApiModelProperty("任务执行人Id")
private String assigneeId;
@ApiModelProperty("部门名称")
private String deptName;
@ApiModelProperty("流程发起人部门名称")
private String startDeptName;
@ApiModelProperty("任务执行人名称")
private String assigneeName;
@ApiModelProperty("流程发起人Id")
private String startUserId;
@ApiModelProperty("流程发起人名称")
private String startUserName;
@ApiModelProperty("流程类型")
private String category;
@ApiModelProperty("流程变量信息")
private Object procVars;
@ApiModelProperty("局部变量信息")
private Object taskLocalVars;
@ApiModelProperty("流程部署编号")
private String deployId;
@ApiModelProperty("流程ID")
private String procDefId;
@ApiModelProperty("流程key")
private String procDefKey;
@ApiModelProperty("流程定义名称")
private String procDefName;
@ApiModelProperty("流程定义内置使用版本")
private int procDefVersion;
@ApiModelProperty("流程实例ID")
private String procInsId;
@ApiModelProperty("历史流程实例ID")
private String hisProcInsId;
@ApiModelProperty("任务耗时")
private String duration;
@ApiModelProperty("任务意见")
private FlowCommentPdu comment;
@ApiModelProperty("候选执行人")
private String candidate;
@ApiModelProperty("任务创建时间")
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@ApiModelProperty("任务完成时间")
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date finishTime;
@ApiModelProperty("流程变量信息")
private Map<String, Object> values;
@ApiModelProperty("附件信息")
private List<AttachmentEntity> attachmentList;
/**
* 用户名称
*/
private String userCode;
@ApiModelProperty("审批人")
private String assignee;
@ApiModelProperty("候选人")
private List<String> candidateUsers;
@ApiModelProperty("审批组")
private List<String> candidateGroups;
@ApiModelProperty("业务平台标识")
private String platformSn;
}
package com.mortals.xhx.common.pdu.flow;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@Getter
@Setter
@ApiModel("工作流任务相关-返回参数")
public class FlowTaskVars implements Serializable {
@ApiModelProperty("任务Id")
private String taskId;
@ApiModelProperty("节点")
private String targetKey;
private String name;
@ApiModelProperty("审批人")
private String assignee;
@ApiModelProperty("候选人")
private List<String> candidateUsers;
@ApiModelProperty("候选人")
private String candidateUsersName;
@ApiModelProperty("候选人名")
private String candidateUsersIds;
@ApiModelProperty("审批组")
private List<String> candidateGroups;
@ApiModelProperty("审批组名")
private String candidateGroupsName;
@ApiModelProperty("审批组ids")
private String candidateGroupsids;
@ApiModelProperty("el表达式")
private String el;
@ApiModelProperty("是否多实例并行,0否1是")
private Integer multiple;
@ApiModelProperty("审核人列表")
private List<String> assigneeList;
public static void main(String[] args) {
String temp="[{\"el\":\"${assignee1}\",\"multiple\":0,\"name\":\"行政审批\",\"targetKey\":\"Activity_04yxg8r\",\"assignee\":\"finegirl\",\"assigneeName\":\"张三\"},{\"el\":\"${assignee2}\",\"multiple\":0,\"name\":\"经理审批\",\"targetKey\":\"Activity_0m7qwz2\",\"assignee\":\"zhaoxiaofei\",\"assigneeName\":\"赵啸非\"},{\"el\":\"assigneeList\",\"multiple\":1,\"name\":\"领导会签\",\"targetKey\":\"Activity_1uv5dhe\",\"assigneeList\":[\"zhang1\",\"zhangbao\"],\"assigneeName\":\"张1,张宝,\"}]\n";
List<FlowTaskVars> list = JSON.parseObject(temp, new TypeReference<List<FlowTaskVars>>() {
});
//构建提交参数
JSONObject jsonObject = new JSONObject();
for(FlowTaskVars var:list){
//判断是否并联
if(var.getMultiple()==0){
//key
String el = var.getEl();
String key = el.substring(2, el.length() - 1);
//值
String assignee = var.getAssignee();
jsonObject.put(key,assignee);
}else{
//key
String key = var.getEl();
JSONArray jsonArray = new JSONArray();
jsonArray.addAll(var.getAssigneeList());
jsonObject.put(key,jsonArray);
}
}
System.out.println(JSON.toJSONString(jsonObject));
}
}
package com.mortals.xhx.common.pdu.flow;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 工作流任务
*
* @author: finegirl
* @date: 2021/7/31 23:38
*/
@Getter
@Setter
@ApiModel("工作流任务相关-返回参数")
public class FlowTaskVoPdu implements Serializable {
@ApiModelProperty("任务Id")
private String taskId;
@ApiModelProperty("用户Id")
private String userId;
@ApiModelProperty("任务意见")
private String comment;
@ApiModelProperty("流程实例Id")
private String instanceId;
@ApiModelProperty("节点")
private String targetKey;
private String name;
@ApiModelProperty("流程变量信息")
private Map<String, Object> values;
@ApiModelProperty("审批人")
private String assignee;
@ApiModelProperty("候选人")
private List<String> candidateUsers;
@ApiModelProperty("审批组")
private List<String> candidateGroups;
@ApiModelProperty("租户Id")
private String tenantId;
@ApiModelProperty("el表达式")
private String el;
@ApiModelProperty("是否多实例并行,0否1是")
private Integer multiple;
}
package com.mortals.xhx.common.pdu.flow;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class FlowUserTaskPdu implements Serializable {
/**
* 用户id
*/
private String id;
/**
* 用户名称
*/
private String name;
/**
* 租户Id
*/
private String tenantId;
}
package com.mortals.xhx.common.pdu.flow;
import lombok.Data;
import java.io.Serializable;
/**
*
*
* @author: zxfei
* @date: 2021/8/5 13:28
*/
@Data
public class FlowViewerPdu implements Serializable {
private String key;
private boolean completed;
}
package com.mortals.xhx.common.pdu.sms;
import lombok.Data;
@Data
public class SmsSendReq {
private String mobile;
private String templeteId;
private String[] params;
}
package com.mortals.xhx.common.pdu.sms;
import lombok.Data;
@Data
public class SmsSendResp {
}
package com.mortals.xhx.feign;
import lombok.Data;
/**
* 附件实体类
*
* @author: zxfei
* @date: 2021/8/26 17:46
* @description:
**/
@Data
public class AttachmentEntity {
/**
* 附件名称
*/
protected String name;
/**
* 附件描述
*/
protected String desc;
/**
* 附件类型
*/
protected String type;
/**
* 附件下载地址
*/
protected String url;
}
package com.mortals.xhx.feign;
import com.mortals.xhx.common.code.CommentTypeEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 流程执行过程中的基本参数Req
*
* @author: zxfei
* @date: 2021/8/26 9:55
*/
@Data
public abstract class BaseTaskReq implements Serializable {
/**********************任务相关的参数**********************/
/**
* 任务id 必填
*/
@ApiModelProperty(value = "任务id", required = true)
private String taskId;
/**
* 流程实例的id
*/
@ApiModelProperty(value = "流程实例的id", required = true)
private String processInstanceId;
/**
* 节点id 选填
*/
@ApiModelProperty(value = "节点id")
private String activityId;
/**
* 节点名称 选填
*/
@ApiModelProperty(value = "节点名称")
private String activityName;
/**
* 流程实例状态 必填
*/
@ApiModelProperty(value = "流程实例状态", required = true)
private ProcessStatusEnum processStatusEnum;
/**********************审批意见的参数**********************/
/**
* 操作人code 必填
*/
@ApiModelProperty(value = "操作人code", required = true)
private String userCode;
/**
* 审批意见 必填
*/
@ApiModelProperty(value = "审批意见", required = true)
private String message;
/**
* 审批意见类型 必填
*/
@ApiModelProperty(value = "审批意见类型", required = true)
private CommentTypeEnum commentTypeEnum;
}
package com.mortals.xhx.feign;
public interface IFeign {
}
package com.mortals.xhx.feign.base;
import com.alibaba.fastjson.JSON;
import com.mortals.xhx.common.code.ApiRespCodeEnum;
import com.mortals.xhx.feign.IFeign;
import com.mortals.xhx.feign.base.pdu.DeptPdu;
import com.mortals.xhx.feign.base.pdu.SitePdu;
import com.mortals.xhx.feign.rsp.ApiResp;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "base-manager", path = "/base", fallbackFactory = BaseManagerFeignFallbackFactory.class)
public interface IApiBaseManagerFeign extends IFeign {
/**
* 根据条件查询站点列表
* @param query
* @return
*/
@PostMapping(value = "/site/list/noPage")
String getSitesByQuery(@RequestBody SitePdu query);
/**
* 根据条件查询站点列表
* @param query
* @return
*/
@PostMapping(value = "/dept/list")
String getDeptByQuery(@RequestBody DeptPdu query);
}
@Slf4j
@Component
class BaseManagerFeignFallbackFactory implements FallbackFactory<IApiBaseManagerFeign> {
@Override
public IApiBaseManagerFeign create(Throwable throwable) {
return new IApiBaseManagerFeign() {
@Override
public String getSitesByQuery(SitePdu query) {
ApiResp<String> failResp = new ApiResp<>();
failResp.setCode(ApiRespCodeEnum.FAILED.getValue());
failResp.setMsg("暂时无法获取站点列表,请稍后再试!");
return JSON.toJSONString(failResp);
}
@Override
public String getDeptByQuery(DeptPdu query) {
ApiResp<String> failResp = new ApiResp<>();
failResp.setCode(ApiRespCodeEnum.FAILED.getValue());
failResp.setMsg("暂时无法获取站点部门列表,请稍后再试!");
return JSON.toJSONString(failResp);
}
};
}
}
\ No newline at end of file
package com.mortals.xhx.feign.base.pdu;
import lombok.Data;
import java.util.List;
@Data
public class DeptPdu {
private List<Long> idList;
private Long siteId;
private Integer page;
/**分页每页显示数 -1为不分页*/
private Integer size;
}
package com.mortals.xhx.feign.base.pdu;
import lombok.Data;
import java.util.List;
@Data
public class SitePdu {
/** 区域IdList */
private List<String> areaCodeList;
private List<Long> idList;
private Integer page;
private Integer size;
}
package com.mortals.xhx.feign.device;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.device.DevicePdu;
import com.mortals.xhx.feign.IFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 设备 Feign接口
* @author zxfei
* @date 2022-10-26
*/
@FeignClient(name = "device-manager", path = "/m", fallbackFactory = DeviceFeignFallbackFactory.class)
public interface IDeviceFeign extends IFeign {
/**
* 查看设备列表
*
* @param devicePdu
* @return
*/
@PostMapping(value = "/device/list")
Rest<RespData<List<DevicePdu>>> list(@RequestBody DevicePdu devicePdu);
/**
* 查看设备
*
* @param id
* @return
*/
@GetMapping(value = "/device/info")
Rest<DevicePdu> info(@RequestParam(value = "id") Long id);
/**
* 删除设备
*
* @param ids
* @return
*/
@GetMapping(value = "/device/delete")
Rest<Void> delete(Long[] ids,@RequestHeader("Authorization") String authorization);
/**
* 设备保存更新
*
* @param devicePdu
* @return
*/
@PostMapping(value = "/device/save")
Rest<RespData<DevicePdu>> save(@RequestBody DevicePdu devicePdu,@RequestHeader("Authorization") String authorization);
}
@Slf4j
@Component
class DeviceFeignFallbackFactory implements FallbackFactory<IDeviceFeign> {
@Override
public IDeviceFeign create(Throwable t) {
return new IDeviceFeign() {
@Override
public Rest<RespData<List<DevicePdu>>> list(DevicePdu devicePdu) {
return Rest.fail("暂时无法获取设备列表,请稍后再试!");
}
@Override
public Rest<DevicePdu> info(Long id) {
return Rest.fail("暂时无法获取设备详细,请稍后再试!");
}
@Override
public Rest<Void> delete(Long[] ids, String authorization) {
return Rest.fail("暂时无法删除设备,请稍后再试!");
}
@Override
public Rest<RespData<DevicePdu>> save(DevicePdu devicePdu, String authorization) {
return Rest.fail("暂时无法保存设备,请稍后再试!");
}
};
}
}
package com.mortals.xhx.feign.flowable;
import com.mortals.xhx.feign.IFeign;
import com.mortals.xhx.feign.req.BaseFlowReq;
import com.mortals.xhx.feign.req.BaseQuery;
import com.mortals.xhx.feign.req.DefinitionReq;
import com.mortals.xhx.feign.rsp.ApiResp;
import com.mortals.xhx.feign.rsp.DefinitionDeployRsp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 工作流程访问
*
* @author: zxfei
* @date: 2021/8/31 9:34
*/
@FeignClient(name = "workflow-manager",path = "/m")
public interface IApiFlowDefinitionFeign extends IFeign {
/**
* 流程部署列表查询
*
* @param req
* @return
*/
@PostMapping("/api/definition/deploy/list")
ApiResp<DefinitionDeployRsp> deploymentsList(@RequestBody BaseFlowReq<BaseQuery> req);
/**
* 激活或挂起流程定义(已经部署)
*
* @param req
* @return
*/
@PostMapping("/api/definition/deploy/updateState")
ApiResp<String> updateState(@RequestBody DefinitionReq req);
/**
* 激活或挂起流程定义(已经部署)
*
* @param req
* @return
*/
@PostMapping("/api/definition/deploy/readXml")
ApiResp<String> readXml(@RequestBody DefinitionReq req);
}
\ No newline at end of file
package com.mortals.xhx.feign.flowable;
import com.mortals.framework.exception.AppException;
import com.mortals.xhx.common.pdu.api.ApiRespPdu;
import com.mortals.xhx.common.pdu.sms.SmsSendReq;
import com.mortals.xhx.feign.IFeign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 工作流api
*/
@FeignClient(name = "government-flowable",path = "/m")
public interface IApiFlowFeign extends IFeign {
/**
* 流程部署
*
* @param modelId 流程ID,来自 ACT_DE_MODEL
* @return
* @throws AppException
*/
@PostMapping(value = "/flowable/api/deploy")
ApiRespPdu<String> deploy(@RequestParam("modelId") String modelId) throws AppException;
/**
* 启动流程
*
* @param deployId 部署的流程 Id,来自 ACT_RE_PROCDEF
* @param userId 用户 Id
* @param dataKey 数据 Key,业务键,一般为表单数据的 ID,仅作为表单数据与流程实例关联的依据
* @return
* @throws AppException
*/
@PostMapping(value = "/flowable/api/start")
ApiRespPdu<String> start(@RequestParam(value = "deployId") String deployId, @RequestParam(value = "userId") String userId, @RequestParam(value = "dataKey") String dataKey);
/**
* 设置任务参数
*
* @param taskId 任务ID
* @param map 用户列表
* @return
*/
@RequestMapping(value = "/flowable/api/setVariables", method = RequestMethod.POST)
ApiRespPdu<String> setVariables(@RequestParam(value = "taskId") String taskId, @RequestBody Map<String, Object> map);
/**
* 设置任务参数
*
* @param taskId 任务ID
* @param key 键
* @param value 值
* @return
*/
@RequestMapping(value = "/setVariable", method = RequestMethod.POST)
ApiRespPdu<String> setVariable(@RequestParam(value = "taskId") String taskId,
@RequestParam(value = "key") String key,
@RequestParam(value = "value") Object value);
/**
* 设置任务参数,List 使用
*
* @param taskId 任务ID
* @param key 键
* @param value 值
* @return
*/
@RequestMapping(value = "/flowable/api/setListVariable", method = RequestMethod.POST)
ApiRespPdu<String> setListVariable(@RequestParam(value = "taskId") String taskId,
@RequestParam(value = "key") String key,
@RequestParam(value = "value") List<String> value);
/**
* 任务处理1
*
* @param taskId 任务 Id,来自 ACT_RU_TASK
* @return
*/
@RequestMapping(value = "/flowable/api/task", method = RequestMethod.POST)
ApiRespPdu<String> task(@RequestParam(value = "taskId") String taskId);
/**
* 任务处理
*
* @param taskId 任务 Id,来自 ACT_RU_TASK
* @param assignee 设置审核人,替换
* @param map 完成任务需要的条件参数
* @return
*/
@RequestMapping(value = "/flowable/api/taskByAssignee", method = RequestMethod.POST)
ApiRespPdu<String> taskByAssignee(@RequestParam(value = "taskId") String taskId,
@RequestParam(value = "assignee") String assignee,
@RequestBody Map<String, Object> map);
/**
* 中止流程
*
* @param processId 流程ID
* @return
*/
@RequestMapping(value = "/flowable/api/deleteProcess", method = RequestMethod.POST)
ApiRespPdu<String> deleteProcess(@RequestParam(value = "processId") String processId);
/**
* 获取正在运行的数据 Id 列表
*
* @return
*/
@RequestMapping(value = "/flowable/api/getRuntimeDataId", method = RequestMethod.POST)
ApiRespPdu<List<String>> getRuntimeDataId();
/**
* 根据用户,获取需要审核的业务键 business_key 列表
*
* @param userId 用户 Id
* @return
*/
@RequestMapping(value = "/flowable/api/getRuntimeBusinessKeyByUser", method = RequestMethod.POST)
ApiRespPdu<List<Map<String, Object>>> getRuntimeBusinessKeyByUser(@RequestParam(value = "userId") String userId);
/**
* 获取组,获取需要审核的业务键 business_key 列表
*
* @param groupIds 组 Id
* @return
*/
@RequestMapping(value = "/flowable/api/getRuntimeBusinessKeyByGroup", method = RequestMethod.POST)
ApiRespPdu<List<Map<String, Object>>> getRuntimeBusinessKeyByGroup(@RequestBody List<String> groupIds);
/**
* 获取用户审核历史
*
* @param userId 发起人 Id
* @return
*/
@RequestMapping(value = "/flowable/api/getHistoryByUser", method = RequestMethod.POST)
ApiRespPdu<List<Map<String, Object>>> getHistoryByUser(@RequestParam(value = "userId") String userId);
/**
* 通过流程实例 Id,判断流程是否结束
*
* @param processInstanceId 流程实例 Id
* @return true 结束,false 未结束
*/
@RequestMapping(value = "/flowable/api/checkProcessInstanceFinish", method = RequestMethod.POST)
ApiRespPdu<Boolean> checkProcessInstanceFinish(@RequestParam(value = "processInstanceId") String processInstanceId);
/**
* 根据任务节点获取流程实例 Id
*
* @param taskId 任务节点 Id
* @return
*/
@RequestMapping(value = "/flowable/api/getTaskInfo", method = RequestMethod.POST)
ApiRespPdu<String> getTaskInfo(@RequestParam(value = "taskId") String taskId);
/**
* 根据流程实例 ID 获取任务进度流程图
*
* @param processInstanceId 流程实例id
* @return base64图片数据
* @throws AppException
*/
@RequestMapping(value = "/flowable/api/getProcessDiagram", method = RequestMethod.POST)
String getProcessDiagram(@RequestParam("processInstanceId") String processInstanceId);
/**
* 根据任务 ID 获取任务进度流程图
*
* @param taskId 任务节点 Id
* @return
*/
@RequestMapping(value = "/flowable/api/getTaskProcessDiagram", method = RequestMethod.POST)
ApiRespPdu<String> getTaskProcessDiagram(@RequestParam(value = "taskId") String taskId);
}
package com.mortals.xhx.feign.processinstance;
import lombok.Data;
/**
* 实例通用请求
* @author: zxfei
* @date: 2021/8/26 10:42
* @description:
**/
@Data
public class ProcessCommonReq {
/**
* 处理人Id
*/
private String userCode;
/**
* 流程实例id
*/
private String processInstanceId;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment