按钮功能接口

yun-zuoyi
yunhao.wang 6 years ago
parent a6dd9e53ec
commit 865add1f7f

@ -1,9 +1,6 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
import javafx.scene.chart.Chart;
import java.util.Date;
/**
* @Description :
@ -1572,9 +1569,9 @@ public class BlockFormEnumUtil {
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TRIGGER_EFFECT {
public enum BUTTON_TRIGGER_EFFECT {
DIALOG(10, "DIALOG", "弹出窗口"),
WINDOW_NEW(20, "NEW_WINDOW", "新开窗口"),
NEW_WINDOW(20, "NEW_WINDOW", "新开窗口"),
SQL(30, "SQL", "执行SQL"),
CLASS_METHOD(40, "CLASS_METHOD", "执行类方法");
@ -1582,7 +1579,7 @@ public class BlockFormEnumUtil {
private String name;
private String description;
TRIGGER_EFFECT(int value, String name, String description) {
BUTTON_TRIGGER_EFFECT(int value, String name, String description) {
this.value = value;
this.name = name;
this.description = description;
@ -1600,7 +1597,7 @@ public class BlockFormEnumUtil {
return name;
}
public static TRIGGER_EFFECT valueOf(int val) {
public static BUTTON_TRIGGER_EFFECT valueOf(int val) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];

@ -9,7 +9,6 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -26,31 +25,39 @@ import javax.persistence.Table;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BF_BUTTON")
@Api(value="表单按钮",description = "表单按钮")
@Table(name = "BF_BUTTON")
@Api(value = "表单按钮", description = "表单按钮")
public class BfButton extends BaseBean {
@Column(name="BUTTON_NAME")
@ApiParam(value ="按钮名称")
@Column(name = "BUTTON_NAME")
@ApiParam(value = "按钮名称")
private String buttonName;
// 枚举:BlockFormEnumUtil.TRIGGER_EFFECT
@Column(name="TRIGGER_MODE")
@ApiParam(value ="触发方式")
// 枚举:BlockFormEnumUtil.BUTTON_TRIGGER_EFFECT
@Column(name = "TRIGGER_MODE")
@ApiParam(value = "触发方式")
private Integer triggerMode;
public Integer getTriggerMode() {
if (triggerMode == null) {
return null;
} else {
return triggerMode.intValue();
}
}
// 关联表单功能表id
@Column(name="METHOD_ID")
@ApiParam(value ="表单功能id")
@Column(name = "METHOD_ID")
@ApiParam(value = "表单功能id")
@JsonSerialize(using = ToStringSerializer.class)
private Long methodId;
@Column(name="METHOD_NAME_RDD")
@ApiParam(value ="表单功能名称")
@Column(name = "METHOD_NAME_RDD")
@ApiParam(value = "表单功能名称")
private String methodNameRdd;
// 执行类方法,sql,脚本
@Column(name="METHOD_CONTENT")
@ApiParam(value ="执行内容")
@Column(name = "METHOD_CONTENT")
@ApiParam(value = "执行内容")
private String methodContent;
}

@ -164,4 +164,19 @@ public final class FormHqlPack {
return result.toString();
}
/**
*
* @param bfButton
*/
public static String packHqlBfButton(BfButton bfButton){
StringBuffer result = new StringBuffer();
HqlPack.getStringLikerPack(bfButton.getButtonName(), "buttonName", result);
HqlPack.getNumEqualPack(bfButton.getTriggerMode(), "triggerMode", result);
HqlPack.getNumEqualPack(bfButton.getIsDeleted(), "isDeleted", result);
result.append(bfButton.orderBy());
return result.toString();
}
}

Loading…
Cancel
Save