// String sql = "select row_number() over(order by id asc) rownum,id from hrmresource where "+conditions;
// sql = "select top 1 a.id from ( "+sql+" ) a where a.rownum>"+startindex;
// String queryDatatablesql = "select top "+pageSize+" id,subcompanyid1,departmentid,workcode,lastname from hrmresource where id >=("+sql+") and "+conditions;
// String sql = "select id from hrmresource where "+conditions+" limit "+startindex+",1";
// String querySql = "select id,subcompanyid1,departmentid,workcode,lastname from hrmresource where id >=("+sql+") and "+conditions+" limit "+pageSize;
// log.info("queryDatatablesql : {}",querySql);
// dataTable = DbTools.getSqlToList(querySql);
// }
StringquerySql="select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if(!conditions.equals("")){
querySql=querySql+" where "+conditions;
if("".equals(psersongroup)){
StringquerySql="select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if(!conditions.equals("")){
querySql=querySql+" where "+conditions;
}
dataTable=DbTools.getSqlToList(querySql);
}
dataTable=DbTools.getSqlToList(querySql);
}else{
StringquerySql="select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if(!conditions.equals("")){
querySql=querySql+" where "+conditions;
if("".equals(psersongroup)){
StringquerySql="select id,subcompanyid1,departmentid,workcode,lastname from hrmresource ";
if(!conditions.equals("")){
querySql=querySql+" where "+conditions;
}
dataTable=DbTools.getSqlToList(querySql);
}
dataTable=DbTools.getSqlToList(querySql);
Stringsql="select a.list_type,b.mainid,b.empid,b.filters,b.bdate,b.edate from uf_ryqz a left join uf_ryqz_dt1 b on a.id=b.mainid where a.userfor=5 and a.fzgly=?";
@ -184,10 +193,8 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
filters=filters.replace("or","or");
sql="select id,seclevel from hrmresource where "+conditions;
if(filters.contains("field")){
sql="select a.id from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters+" and "+conditions;
sql="select a.id from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters+" and "+conditions;
@ -321,10 +321,8 @@ public class PersongroupCommonUtil {
//条件清单
Stringsql="select id,seclevel from hrmresource where 1=1 ";
if(filters.contains("field")){
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
sql="select id,seclevel from hrmresource where 1=1 ";
filters=filters.replace("and","and");
filters=filters.replace("or","or");
if(filters.contains("field")){
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
Stringsql="select b.mainid,b.empid,b.filters,b.bdate,b.edate,a.list_type from uf_ryqz a left join uf_ryqz_dt1 b on a.id=b.mainid where mainid = "+empGroupId;
sql="select id,seclevel from hrmresource where 1=1 ";
filters=filters.replace("and","and");
filters=filters.replace("or","or");
if(filters.contains("field")){
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
sql="select id,seclevel from hrmresource where 1=1 ";
filters=filters.replace("and","and");
filters=filters.replace("or","or");
if(filters.contains("field")){
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and scopeid=-1 and "+filters;
sql="select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;