|
|
|
@ -4,32 +4,10 @@ import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysBarcodeRule;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysConfig;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysDepartment;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysDictionary;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysFile;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLabelTemplate;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLabelTemplateParam;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleLanguage;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleResource;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysMenu;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysMessage;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysOrderNoRule;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysOrganize;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysPosition;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserDepartment;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserMessage;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysRefUserRole;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysRole;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysTask;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysTaskCycle;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysTaskPlan;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysTool;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysToolType;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysUser;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SysUserInfo;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
|
import org.apache.commons.beanutils.ConvertUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@ -42,6 +20,10 @@ import java.util.stream.Collectors;
|
|
|
|
|
**/
|
|
|
|
|
public class CoreHqlPack {
|
|
|
|
|
|
|
|
|
|
private CoreHqlPack() {
|
|
|
|
|
throw new IllegalStateException("Utility class");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* In 参数封装
|
|
|
|
|
* @param columnName
|
|
|
|
@ -81,6 +63,11 @@ public class CoreHqlPack {
|
|
|
|
|
|
|
|
|
|
if(resource != null){
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(resource.getResourceType(),"resourceType",result);
|
|
|
|
|
// 是否多类型查询
|
|
|
|
|
if(StringUtils.isNotBlank(resource.getResourceTypes())){
|
|
|
|
|
DdlPreparedPack.getInPackArray((Integer[]) ConvertUtils.convert(resource.getResourceTypes().split(","), Integer.class), "resourceType", result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(resource.getSoftType(),"softType",result);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(resource.getIsSystem(),"isSystem",result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(resource.getLanguageCode(),"languageCode",result);
|
|
|
|
@ -630,7 +617,7 @@ public class CoreHqlPack {
|
|
|
|
|
HqlPack.getNumEqualPack(userInfo.getUserInfoStatus(),"userInfoStatus",result);
|
|
|
|
|
HqlPack.getStringEqualPack(userInfo.getOrganizeCode(),"organizeCode",result);
|
|
|
|
|
|
|
|
|
|
if(userInfo.getDepartmentIdList() != null && userInfo.getDepartmentIdList().size() > 0){
|
|
|
|
|
if(userInfo.getDepartmentIdList() != null && !userInfo.getDepartmentIdList().isEmpty()){
|
|
|
|
|
HqlPack.getInPack(StringUtils.join(userInfo.getDepartmentIdList(), ","), "departmentId", result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -653,7 +640,7 @@ public class CoreHqlPack {
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(userInfo.getOrganizeCode(),"organizeCode",result);
|
|
|
|
|
DdlPreparedPack.getInPackList(idList,"id",result);
|
|
|
|
|
|
|
|
|
|
if(userInfo.getDepartmentIdList() != null && userInfo.getDepartmentIdList().size() > 0){
|
|
|
|
|
if(userInfo.getDepartmentIdList() != null && !userInfo.getDepartmentIdList().isEmpty() ){
|
|
|
|
|
DdlPreparedPack.getInPackList(userInfo.getDepartmentIdList(),"departmentId",result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -677,7 +664,7 @@ public class CoreHqlPack {
|
|
|
|
|
|
|
|
|
|
// And
|
|
|
|
|
HqlPack.getNumEqualPack(userInfo.getUserInfoStatus(),"userInfoStatus",result);
|
|
|
|
|
if(idList != null && idList.size() > 0){
|
|
|
|
|
if(idList != null && !idList.isEmpty()){
|
|
|
|
|
HqlPack.getInPack(StringUtils.join(idList, ","), "id", result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -977,7 +964,7 @@ public class CoreHqlPack {
|
|
|
|
|
*/
|
|
|
|
|
public static DdlPackBean packHqlSysOrganize(List<SysRefUserDepartment> sysRefUserDepartments){
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean();
|
|
|
|
|
DdlPreparedPack.getInPackList(sysRefUserDepartments.stream().map(d -> d.getOrganizeId()).collect(Collectors.toList()),"id",packBean);
|
|
|
|
|
DdlPreparedPack.getInPackList(sysRefUserDepartments.stream().map(SysRefUserDepartment::getOrganizeId).collect(Collectors.toList()),"id",packBean);
|
|
|
|
|
|
|
|
|
|
return packBean;
|
|
|
|
|
}
|
|
|
|
|