|
|
|
@ -1,9 +1,13 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.platform.sqlpack;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.Department;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.Position;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleLanguage;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleResource;
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description : 平台对象封装
|
|
|
|
|
* @Reference :
|
|
|
|
@ -50,4 +54,57 @@ public class CoreHqlPack {
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 岗位复杂查询
|
|
|
|
|
* @param position
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlPosition(Position position) {
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 岗位名称
|
|
|
|
|
HqlPack.getStringLikerPack(position.getName(),"positionName",result);
|
|
|
|
|
// 岗位代码
|
|
|
|
|
HqlPack.getStringLikerPack(position.getPositionCode(),"positionCode",result);
|
|
|
|
|
// 父级岗位
|
|
|
|
|
HqlPack.getNumEqualPack(position.getId(),"parentId",result);
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 岗位
|
|
|
|
|
* @param columnName
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlIds(String columnName,String[] params){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 参数数组
|
|
|
|
|
HqlPack.getInPack(Arrays.toString(params),columnName,result);
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 部门复杂查询
|
|
|
|
|
* @param department
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static String packHqlPosition(Department department) {
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
// 部门名称
|
|
|
|
|
HqlPack.getStringLikerPack(department.getDepartmentName(),"positionName",result);
|
|
|
|
|
// 部门代码
|
|
|
|
|
HqlPack.getStringLikerPack(department.getDepartmentName(),"positionCode",result);
|
|
|
|
|
// 父级部门id
|
|
|
|
|
HqlPack.getNumEqualPack(department.getId(),"parentId",result);
|
|
|
|
|
// 所属组织id
|
|
|
|
|
HqlPack.getNumEqualPack(department.getOrganizeId(),"organizeId",result);
|
|
|
|
|
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|