|
|
|
@ -57,8 +57,9 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
|
String fieldid = bb.getPropValue("sship", "fieldid");
|
|
|
|
|
String sitehead = bb.getPropValue("sship", "sitehead");
|
|
|
|
|
List<Integer> ids = new ArrayList<>();
|
|
|
|
|
rs.executeQuery("select id from cus_fielddata where "+fieldid+" = 3 and scopeid = 3 and scope = 'HrmCustomFieldByInfoType'");
|
|
|
|
|
rs.executeQuery("select id from cus_fielddata where "+fieldid+" = ? and scopeid = 3 and scope = 'HrmCustomFieldByInfoType'",sitehead);
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
ids.add(Util.getIntValue(rs.getString("id")));
|
|
|
|
|
}
|
|
|
|
@ -70,12 +71,15 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|
|
|
|
public List<PersonTableVO> selectPerson(PersonTableParam personTableParam) {
|
|
|
|
|
List<PersonTablePO> poList;
|
|
|
|
|
ResourceComInfo rInfo = new ResourceComInfo();
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
|
String shareholder = bb.getPropValue("sship", "shareholder");
|
|
|
|
|
String committee = bb.getPropValue("sship", "committee");
|
|
|
|
|
switch(personTableParam.getId()){
|
|
|
|
|
case "S-1":
|
|
|
|
|
poList = selectByLevel(5);
|
|
|
|
|
poList = selectByLevel(Integer.valueOf(shareholder));
|
|
|
|
|
break;
|
|
|
|
|
case "C-1":
|
|
|
|
|
poList = selectByLevel(4);
|
|
|
|
|
poList = selectByLevel(Integer.valueOf(committee));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
poList = selectByDeptId(personTableParam.getId());
|
|
|
|
@ -94,8 +98,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
List<PersonTablePO> poList = new ArrayList<>();
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
|
//String fieldid = bb.getPropValue("sship.properties", "fieldid");
|
|
|
|
|
String fieldid = "field19";
|
|
|
|
|
String fieldid = bb.getPropValue("sship", "fieldid");
|
|
|
|
|
rs.executeQuery("select h.id,h.lastname,h.workcode,h.sex,h.managerid,h.loginid from hrmresource h\n" +
|
|
|
|
|
" left join cus_fielddata c on h.id = c.id\n" +
|
|
|
|
|
" where c.scopeid = 3 and c.scope = 'HrmCustomFieldByInfoType' and c."+fieldid+" = ?",level);
|
|
|
|
@ -137,8 +140,23 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|
|
|
|
* 获取指定组织树
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
private TreeDataVO getBaseTreeData() {
|
|
|
|
|
return null;
|
|
|
|
|
int uid = user.getUID();
|
|
|
|
|
List<Integer> idList = selectCusSiteHead();
|
|
|
|
|
boolean contains = idList.contains(uid);
|
|
|
|
|
DepartmentComInfo dInfo = new DepartmentComInfo();
|
|
|
|
|
ResourceComInfo rInfo = new ResourceComInfo();
|
|
|
|
|
String departmentId = rInfo.getDepartmentID(String.valueOf(uid));
|
|
|
|
|
TreeDataVO build = TreeDataVO.builder()
|
|
|
|
|
.id(departmentId)
|
|
|
|
|
.label(contains ? dInfo.getDepartmentName(departmentId) : rInfo.getLastname(String.valueOf(uid)))
|
|
|
|
|
.build();
|
|
|
|
|
boolean manager = hrmCommonService.isManager(uid);
|
|
|
|
|
if (manager) {
|
|
|
|
|
build.setChildrens(recursionDepartment(uid));
|
|
|
|
|
}
|
|
|
|
|
return build;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -171,7 +189,8 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|
|
|
|
ChartChildrensVO build = ChartChildrensVO.builder()
|
|
|
|
|
.id(departmentId)
|
|
|
|
|
.pid("C-1")
|
|
|
|
|
.label(dInfo.getDepartmentmark(departmentId))
|
|
|
|
|
//.label(dInfo.getDepartmentmark(departmentId))
|
|
|
|
|
.label(rInfo.getLastname(String.valueOf(item)))
|
|
|
|
|
.build();
|
|
|
|
|
boolean manager = hrmCommonService.isManager(item);
|
|
|
|
|
if (manager) {
|
|
|
|
@ -204,7 +223,8 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
|
|
|
|
ChartChildrensVO build = ChartChildrensVO.builder()
|
|
|
|
|
.id(departmentId)
|
|
|
|
|
.pid(item)
|
|
|
|
|
.label(dInfo.getDepartmentmark(departmentId))
|
|
|
|
|
//.label(dInfo.getDepartmentmark(departmentId))
|
|
|
|
|
.label(rInfo.getLastname(String.valueOf(item)))
|
|
|
|
|
.build();
|
|
|
|
|
boolean manager = hrmCommonService.isManager(Integer.valueOf(item));
|
|
|
|
|
if (manager) {
|
|
|
|
|