sql_join=sql_join+" left join cus_fielddata t"+int_scopeId+" on a.id = t"+int_scopeId+".id and t"+int_scopeId+".scope='HrmCustomFieldByInfoType' and t"+int_scopeId+".scopeid = "+str_scopeId;
}
sql="SELECT 't'||(SCOPEID+100)||'.field'||fieldid colname FROM CUS_FORMFIELD WHERE SCOPE = 'HrmCustomFieldByInfoType'";
sql="DELETE FROM UF_JCL_KQ_JQYE WHERE jqid IN (101,102) AND ygid IN (SELECT id FROM CUS_FIELDDATA WHERE SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID = -1 AND Field21 != 'R' AND Field21 != 'E')";
Stringsql="select a.id userid,a.*,b.* from hrmresource a left join cus_fielddata b on a.id=b.id where a.status <> '5' and a.status <> '4' and a.status <> '7' and a.id in (";
StringqueryDepartEmployeeSql="select resourceid ,changedate,type_n from HRMSTATUSHISTORY where changedate is not null";
if(params.containsKey("empid")){
queryDepartEmployeeSql=queryDepartEmployeeSql+" and resourceid = "+empId;
sql="select a.id userid,a.*,b.* from hrmresource a left join cus_fielddata b on a.id=b.id where a.status <> '5' and a.status <> '4' and a.status <> '7' and a.id = "+Util.null2String(params.get("empid"))+" and a.id in (";