|
|
@ -316,24 +316,24 @@ public class CoreHqlPack {
|
|
|
|
* @param dictionary
|
|
|
|
* @param dictionary
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static String packHqlSysDictionary(SysDictionary dictionary) {
|
|
|
|
public static DdlPackBean packHqlSysDictionaryPage(SysDictionary dictionary) {
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
|
|
// hql拼接
|
|
|
|
// hql拼接
|
|
|
|
HqlPack.getStringLikerPack(dictionary.getName(), "name", result);
|
|
|
|
DdlPreparedPack.getStringLikerPack(dictionary.getName(), "name", result);
|
|
|
|
HqlPack.getStringLikerPack(dictionary.getDictionaryCode(), "dictionaryCode", result);
|
|
|
|
DdlPreparedPack.getStringLikerPack(dictionary.getDictionaryCode(), "dictionaryCode", result);
|
|
|
|
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(), "dictionarySoftType", result);
|
|
|
|
DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(), "dictionarySoftType", result);
|
|
|
|
// 默认查询非顶级字典
|
|
|
|
// 默认查询非顶级字典
|
|
|
|
if (dictionary.getParentId() == null || dictionary.getParentId() < 1){
|
|
|
|
if (dictionary.getParentId() == null || dictionary.getParentId() < 1){
|
|
|
|
HqlPack.getNumNOEqualPack(CommonEnumUtil.PARENT.DEFAULT.getValue(), "parentId", result);
|
|
|
|
DdlPreparedPack.getNumNOEqualPack(CommonEnumUtil.PARENT.DEFAULT.getValue(), "parentId", result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HqlPack.getNumEqualPack(dictionary.getParentId(), "parentId", result);
|
|
|
|
DdlPreparedPack.getNumEqualPack(dictionary.getParentId(), "parentId", result);
|
|
|
|
HqlPack.getStringLikerPack(dictionary.getParentCodeRdd(),"parentCodeRdd", result);
|
|
|
|
DdlPreparedPack.getStringLikerPack(dictionary.getParentCodeRdd(),"parentCodeRdd", result);
|
|
|
|
|
|
|
|
|
|
|
|
// 添加默认排序
|
|
|
|
// 添加默认排序
|
|
|
|
HqlPack.getOrderDefault(dictionary);
|
|
|
|
DdlPreparedPack.getOrderDefault(dictionary);
|
|
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -550,20 +550,20 @@ public class CoreHqlPack {
|
|
|
|
* @param dictionary
|
|
|
|
* @param dictionary
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static String packHqlSysDictionaryCode(SysDictionary dictionary){
|
|
|
|
public static DdlPackBean packHqlSysDictionaryCode(SysDictionary dictionary){
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
|
|
// and
|
|
|
|
// and
|
|
|
|
HqlPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result);
|
|
|
|
DdlPreparedPack.getStringEqualPack(dictionary.getDictionaryCode(),"dictionaryCode",result);
|
|
|
|
HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
|
|
|
|
DdlPreparedPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
|
|
|
|
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
|
|
|
|
DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
|
|
|
|
// not
|
|
|
|
// not
|
|
|
|
HqlPack.getNumNOEqualPack(dictionary.getId(),"id",result);
|
|
|
|
DdlPreparedPack.getNumNOEqualPack(dictionary.getId(),"id",result);
|
|
|
|
|
|
|
|
|
|
|
|
// 添加默认排序
|
|
|
|
// 添加默认排序
|
|
|
|
HqlPack.getOrderDefault(dictionary);
|
|
|
|
DdlPreparedPack.getOrderDefault(dictionary);
|
|
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -571,20 +571,20 @@ public class CoreHqlPack {
|
|
|
|
* @param dictionary
|
|
|
|
* @param dictionary
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static String packHqlSysDictionaryValue(SysDictionary dictionary){
|
|
|
|
public static DdlPackBean packHqlSysDictionaryValue(SysDictionary dictionary){
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
|
|
// and
|
|
|
|
// and
|
|
|
|
HqlPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result);
|
|
|
|
DdlPreparedPack.getStringEqualPack(dictionary.getDictionaryValue(),"dictionaryValue",result);
|
|
|
|
HqlPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
|
|
|
|
DdlPreparedPack.getNumEqualPack(dictionary.getParentId(),"parentId",result);
|
|
|
|
HqlPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
|
|
|
|
DdlPreparedPack.getNumEqualPack(dictionary.getDictionarySoftType(),"dictionarySoftType",result);
|
|
|
|
// not
|
|
|
|
// not
|
|
|
|
HqlPack.getNumNOEqualPack(dictionary.getId(),"id",result);
|
|
|
|
DdlPreparedPack.getNumNOEqualPack(dictionary.getId(),"id",result);
|
|
|
|
|
|
|
|
|
|
|
|
// 添加默认排序
|
|
|
|
// 添加默认排序
|
|
|
|
HqlPack.getOrderDefault(dictionary);
|
|
|
|
DdlPreparedPack.getOrderDefault(dictionary);
|
|
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -932,4 +932,22 @@ public class CoreHqlPack {
|
|
|
|
|
|
|
|
|
|
|
|
return packBean;
|
|
|
|
return packBean;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 按条件查询字典
|
|
|
|
|
|
|
|
* @param sysDictionary
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static DdlPackBean packHqlSysDictionary(SysDictionary sysDictionary){
|
|
|
|
|
|
|
|
DdlPackBean packBean = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(sysDictionary.getName(), "name", packBean);
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(sysDictionary.getDictionaryCode(), "dictionaryCode", packBean);
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(sysDictionary.getParentCodeRdd(), "parentCodeRdd", packBean);
|
|
|
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(sysDictionary.getParentId(),"parentId",packBean);
|
|
|
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(sysDictionary.getDictionarySoftType(), "dictionarySoftType", packBean);
|
|
|
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(sysDictionary.getDictionaryGroup(),"dictionaryGroup",packBean);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return packBean;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|