@ -278,9 +279,13 @@ public class ChartServiceImpl extends Service implements ChartService {
if(showJob){
// 查询部门下的岗位
if(isRealTime){
sql="select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '"+departmentId+"'";
sql="select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '"+departmentId+"' and b.ec_company='"+subcompanyid1+"'";
}else{
sql="select jobid as id ,jobname as name from jcl_chart_job where departmentid = '"+departmentId+"' and versionid = "+versionId;
rs.executeQuery("select subcompanyid from jcl_chart_department where departmentid = '"+departmentId+"' and versionid = "+versionId);
rs.next();
Stringsubcompanyid=rs.getString("subcompanyid");
sql="select jobid as id ,jobname as name from jcl_chart_job where departmentid = '"+departmentId+"' and subcompanyid = '"+subcompanyid+"' and versionid = "+versionId;
}
rs.executeQuery(sql);
while(rs.next()){
@ -643,9 +648,10 @@ public class ChartServiceImpl extends Service implements ChartService {
// sql = "select id from " + SUB_COMPANY_TABLE + " where (supsubcomid is null or supsubcomid = '0') and companyid = '" + fObjId + "'";
// break;
// case "1":
// if (hasVirtualFields && !showVirtual) {
// sql = "select a.id from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and (b.fblx is null or b.fblx != '1') and a.supsubcomid = '" + fObjId + "' union select a.id from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and (b.bmlx is null or b.bmlx != '1') and subcompanyid1 = '" + fObjId + "'";
// } else {
// sql = "select id from " + SUB_COMPANY_TABLE + " where (canceled is null or canceled != '1') and supsubcomid = '" + fObjId + "' union select id from " + DEPARTMENT_TABLE + " where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
// }
// break;
// case "2":
// if (hasVirtualFields && !showVirtual) {
// sql = "select a.id from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid where (canceled is null or canceled != '1') and (b.bmlx is null or b.bmlx != '1') and a.supdepid = '" + fObjId + "'";
// } else {
// sql = "select id from " + DEPARTMENT_TABLE + " where (canceled is null or canceled != '1') and supdepid = '" + fObjId + "'";
booleanexecuteUpdate=rs.executeUpdate("update HrmCompany set COMPANYNAME = ?,COMPANYDESC=?,COMPANYWEB=? where id = ?",companyname,companydesc,companyweb,id);
//TODO new GroupTriggerRunnable(params).run();
returnexecuteUpdate;
}
@ -93,10 +93,10 @@ public class GroupServiceImpl extends Service implements GroupService {