|
|
|
@ -53,33 +53,47 @@ public class CoreHqlPack {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* In 参数封装
|
|
|
|
|
* @param columnName
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlIds(String columnName,String[] params){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 参数数组 [1,2,3] -> "1,2,3"
|
|
|
|
|
HqlPack.getInPack(String.join(",",params),columnName,result);
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 岗位复杂查询
|
|
|
|
|
* @param position
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlDepartment(Position position) {
|
|
|
|
|
public static String packHqlPosition(Position position){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 岗位名称
|
|
|
|
|
HqlPack.getStringLikerPack(position.getName(),"positionName",result);
|
|
|
|
|
// 岗位代码
|
|
|
|
|
// 查询参数封装
|
|
|
|
|
HqlPack.getNumEqualPack(position.getParentId(),"parentId",result);
|
|
|
|
|
HqlPack.getStringLikerPack(position.getName(),"name",result);
|
|
|
|
|
HqlPack.getStringLikerPack(position.getPositionCode(),"positionCode",result);
|
|
|
|
|
// 父级岗位
|
|
|
|
|
HqlPack.getNumEqualPack(position.getId(),"parentId",result);
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* In 参数封装
|
|
|
|
|
* @param columnName
|
|
|
|
|
* 组织复杂查询
|
|
|
|
|
* @param organize
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlIds(String columnName,String[] params){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
public static String packHqlOrganize(Organize organize){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 查询参数封装
|
|
|
|
|
HqlPack.getNumEqualPack(organize.getParentId(),"parentId",result);
|
|
|
|
|
HqlPack.getStringLikerPack(organize.getName(),"name",result);
|
|
|
|
|
HqlPack.getStringLikerPack(organize.getOrganizeCode(),"organizeCode",result);
|
|
|
|
|
|
|
|
|
|
// 参数数组 [1,2,3] -> "1,2,3"
|
|
|
|
|
HqlPack.getInPack(String.join(",",params),columnName,result);
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -88,33 +102,45 @@ public class CoreHqlPack {
|
|
|
|
|
* @param department
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlDepartment(Department department) {
|
|
|
|
|
public static String packHqlDepartment(Department department){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 部门名称
|
|
|
|
|
HqlPack.getStringLikerPack(department.getName(),"positionName",result);
|
|
|
|
|
// 部门代码
|
|
|
|
|
HqlPack.getStringLikerPack(department.getDepartmentCode(),"positionCode",result);
|
|
|
|
|
// 父级部门id
|
|
|
|
|
HqlPack.getNumEqualPack(department.getId(),"parentId",result);
|
|
|
|
|
// 所属组织id
|
|
|
|
|
HqlPack.getNumEqualPack(department.getOrganizeId(),"organizeId",result);
|
|
|
|
|
// 查询参数封装
|
|
|
|
|
HqlPack.getNumEqualPack(department.getParentId(),"parentId",result);
|
|
|
|
|
HqlPack.getStringLikerPack(department.getName(),"name",result);
|
|
|
|
|
HqlPack.getStringLikerPack(department.getDepartmentCode(),"departmentCode",result);
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 岗位复杂查询
|
|
|
|
|
* @param position
|
|
|
|
|
* 系统权限复杂查询
|
|
|
|
|
* @param menu
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlPosition(Position position){
|
|
|
|
|
public static String packHqlSysMenu(SysMenu menu){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 查询参数封装
|
|
|
|
|
HqlPack.getNumEqualPack(position.getParentId(),"parentId",result);
|
|
|
|
|
HqlPack.getStringLikerPack(position.getName(),"name",result);
|
|
|
|
|
HqlPack.getStringLikerPack(position.getPositionCode(),"positionCode",result);
|
|
|
|
|
HqlPack.getNumEqualPack(menu.getParentId(),"parentId",result);
|
|
|
|
|
HqlPack.getNumEqualPack(menu.getMenuStatus(),"menuStatus",result);
|
|
|
|
|
HqlPack.getStringLikerPack(menu.getName(),"name",result);
|
|
|
|
|
HqlPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result);
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 系统角色复杂查询
|
|
|
|
|
* @param role
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlSysRole(SysRole role){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 查询参数封装
|
|
|
|
|
HqlPack.getNumEqualPack(role.getRoleStatusId(),"roleStatusId",result);
|
|
|
|
|
HqlPack.getStringLikerPack(role.getName(),"name",result);
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|