|
|
|
@ -1,10 +1,7 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.form.sqlpack;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.form.bean.BfLayout;
|
|
|
|
|
import cn.estsh.i3plus.pojo.form.bean.BfLayoutRow;
|
|
|
|
|
import cn.estsh.i3plus.pojo.form.bean.BfMenu;
|
|
|
|
|
import cn.estsh.i3plus.pojo.form.bean.BfMethod;
|
|
|
|
|
import cn.estsh.i3plus.pojo.form.bean.*;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -63,32 +60,31 @@ public final class FormHqlPack {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据表单布局查询表单布局行
|
|
|
|
|
* @param bfLayout 表单布局
|
|
|
|
|
* @param bfLayoutRow 表单布局
|
|
|
|
|
* @return hql
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlBfLayoutRowByBfLayout(BfLayout bfLayout) {
|
|
|
|
|
public static String packHqlBfLayoutRow(BfLayoutRow bfLayoutRow) {
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayout.getId(), "layoutId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayout.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutRow.getLayoutId(), "layoutId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutRow.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
|
|
|
|
|
result.append(bfLayout.orderBy());
|
|
|
|
|
result.append(bfLayoutRow.orderBy());
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据表单布局行查询表单布局列
|
|
|
|
|
* @param bfLayoutRow 表单布局行
|
|
|
|
|
* @param bfLayoutColumn 表单布局行
|
|
|
|
|
* @return hql
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlBfLayoutColumnByBfLayoutRow(BfLayoutRow bfLayoutRow) {
|
|
|
|
|
public static String packHqlBfLayoutColumn(BfLayoutColumn bfLayoutColumn) {
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutRow.getLayoutId(), "layoutId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutRow.getId(), "layoutRowId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutRow.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutColumn.getLayoutRowId(), "layoutRowId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfLayoutColumn.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
|
|
|
|
|
result.append(bfLayoutRow.orderBy());
|
|
|
|
|
result.append(bfLayoutColumn.orderBy());
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -103,6 +99,7 @@ public final class FormHqlPack {
|
|
|
|
|
HqlPack.getStringLikerPack(bfMenu.getMenuName(), "menuName", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfMenu.getParentId(), "parentId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfMenu.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
result.append(bfMenu.orderBy());
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
@ -118,6 +115,23 @@ public final class FormHqlPack {
|
|
|
|
|
HqlPack.getStringLikerPack(bfMethod.getMethodName(), "methodName", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfMethod.getLayoutId(), "layoutId", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfMethod.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
result.append(bfMethod.orderBy());
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 表单拦截器复杂查询
|
|
|
|
|
* @param bfIntercept 查询条件
|
|
|
|
|
* @return hql
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlBfIntercept(BfIntercept bfIntercept) {
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
HqlPack.getStringLikerPack(bfIntercept.getInterceptName(), "interceptName", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfIntercept.getExecuteMode(), "executeMode", result);
|
|
|
|
|
HqlPack.getNumEqualPack(bfIntercept.getIsDeleted(), "isDeleted", result);
|
|
|
|
|
result.append(bfIntercept.orderBy());
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|