|
|
|
@ -610,16 +610,18 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
" a.subcompanycode,\n" +
|
|
|
|
|
" a.limitusers,\n" +
|
|
|
|
|
" a.tlevel,\n" +
|
|
|
|
|
" c.fblx as isvirtual\n" +
|
|
|
|
|
" c.fblx as isvirtual,d.on_job_num,d.staff_num \n" +
|
|
|
|
|
" from hrmsubcompany a\n" +
|
|
|
|
|
" left join hrmsubcompany b on a.supsubcomid = b.id\n" +
|
|
|
|
|
" left join hrmsubcompanydefined c on a.id = c.subcomid ";
|
|
|
|
|
" left join hrmsubcompanydefined c on a.id = c.subcomid " +
|
|
|
|
|
" left join JCL_ORG_ONJOB d on a.id=d.data_id and d.type=1 ";
|
|
|
|
|
deptQuerySql = "select a.id as departmentid, a.departmentmark, a.departmentname, a.subcompanyid1 as subcompanyid, " +
|
|
|
|
|
"b.SUBCOMPANYNAME as subcompany,a.supdepid as supdepartmentid,c.departmentname as supdepartment," +
|
|
|
|
|
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,a.bmfzr as fleader " +
|
|
|
|
|
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,a.bmfzr as fleader,e.on_job_num,e.staff_num " +
|
|
|
|
|
"from hrmdepartment a left join hrmsubcompany b on a.subcompanyid1 = b.id " +
|
|
|
|
|
"left join hrmdepartment c on a.supdepid = c.id " +
|
|
|
|
|
"left join hrmdepartmentdefined d on a.id=d.deptid";
|
|
|
|
|
"left join hrmdepartmentdefined d on a.id=d.deptid " +
|
|
|
|
|
"left join JCL_ORG_ONJOB e on a.id=e.data_id and e.type=2 ";
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
subCompanyQuerySql = "select a.id as subcompanyid,\n" +
|
|
|
|
@ -631,9 +633,12 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
" a.canceled,\n" +
|
|
|
|
|
" a.subcompanycode,\n" +
|
|
|
|
|
" a.limitusers,\n" +
|
|
|
|
|
" a.tlevel\n" +
|
|
|
|
|
" a.tlevel,\n" +
|
|
|
|
|
" c.on_job_num,\n" +
|
|
|
|
|
" c.staff_num\n" +
|
|
|
|
|
" from hrmsubcompany a\n" +
|
|
|
|
|
" left join hrmsubcompany b on a.supsubcomid = b.id";
|
|
|
|
|
" left join hrmsubcompany b on a.supsubcomid = b.id\n" +
|
|
|
|
|
" left join JCL_ORG_ONJOB c on a.id=c.data_id and c.type=1 ";
|
|
|
|
|
deptQuerySql = "select a.id as departmentid,\n" +
|
|
|
|
|
" a.departmentmark,\n" +
|
|
|
|
|
" a.departmentname,\n" +
|
|
|
|
@ -645,10 +650,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
" a.departmentcode,\n" +
|
|
|
|
|
" a.coadjutant,\n" +
|
|
|
|
|
" a.tlevel,\n" +
|
|
|
|
|
" a.bmfzr as fleader\n" +
|
|
|
|
|
" a.bmfzr as fleader,\n" +
|
|
|
|
|
" d.on_job_num,\n" +
|
|
|
|
|
" d.staff_num" +
|
|
|
|
|
" from hrmdepartment a\n" +
|
|
|
|
|
" left join hrmsubcompany b on a.subcompanyid1 = b.id\n" +
|
|
|
|
|
" left join hrmdepartment c on a.supdepid = c.id";
|
|
|
|
|
" left join hrmdepartment c on a.supdepid = c.id\n" +
|
|
|
|
|
" left join JCL_ORG_ONJOB d on a.id=d.data_id and d.type=2 ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -672,12 +680,14 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
insertList.add(currentDate);
|
|
|
|
|
insertList.add(virtualFlag ? Util.getIntValue(rs.getString("isvirtual"), 0) : 0);
|
|
|
|
|
insertList.add(StringUtils.isBlank(versionId) ? null : Util.getIntValue(versionId));
|
|
|
|
|
insertList.add(Util.getIntValue(rs.getString("on_job_num"),0));
|
|
|
|
|
insertList.add(Util.getIntValue(rs.getString("staff_num"),0));
|
|
|
|
|
insertParamList.add(insertList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String insertSubSql = "insert into jcl_chart_subcompany(creater, subcompanyid, subcompanyname, subcompanydesc, company,\n" +
|
|
|
|
|
" supsubcompanyid, supsubcompany, canceled, subcompanycode, limitusers,\n" +
|
|
|
|
|
" tlevel, versiondate, isvirtual,versionId) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
|
|
" tlevel, versiondate, isvirtual,versionId,job_num,staff_num) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
|
|
insertData(recordSetTrans, insertSubSql, insertParamList);
|
|
|
|
|
|
|
|
|
|
//当前部门版本存储
|
|
|
|
@ -701,11 +711,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
|
insertList.add(currentDate);
|
|
|
|
|
insertList.add(virtualFlag ? Util.getIntValue(rs.getString("isvirtual"), 0) : 0);
|
|
|
|
|
insertList.add(StringUtils.isBlank(versionId) ? null : Util.getIntValue(versionId));
|
|
|
|
|
insertList.add(Util.getIntValue(rs.getString("on_job_num"),0));
|
|
|
|
|
insertList.add(Util.getIntValue(rs.getString("staff_num"),0));
|
|
|
|
|
insertParamList.add(insertList);
|
|
|
|
|
}
|
|
|
|
|
String insertDeptSql = "insert into jcl_chart_department(creater, departmentid, departmentmark, departmentname, subcompanyid,\n" +
|
|
|
|
|
" subcompany, supdepartmentid, supdepartment, canceled, departmentcode,\n" +
|
|
|
|
|
" coadjutant, fleader,versiondate, isvirtual,versionid) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
|
|
" coadjutant, fleader,versiondate, isvirtual,versionid,job_num,staff_num) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
|
|
|
|
insertData(recordSetTrans, insertDeptSql, insertParamList);
|
|
|
|
|
|
|
|
|
|
//当前岗位版本存储
|
|
|
|
|