|
|
@ -4,7 +4,9 @@ import com.engine.common.util.ServiceUtil;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.organization.entity.chart.ChartPO;
|
|
|
|
import com.engine.organization.entity.chart.ChartPO;
|
|
|
|
import com.engine.organization.entity.chart.CompanyTreePO;
|
|
|
|
import com.engine.organization.entity.chart.CompanyTreePO;
|
|
|
|
|
|
|
|
import com.engine.organization.entity.chart.StatisticsVO;
|
|
|
|
import com.engine.organization.entity.chart.TreeSelect;
|
|
|
|
import com.engine.organization.entity.chart.TreeSelect;
|
|
|
|
|
|
|
|
import com.engine.organization.enums.ModuleTypeEnum;
|
|
|
|
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
|
|
|
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
|
|
|
import com.engine.organization.service.ChartService;
|
|
|
|
import com.engine.organization.service.ChartService;
|
|
|
|
import com.engine.organization.service.OrgChartService;
|
|
|
|
import com.engine.organization.service.OrgChartService;
|
|
|
@ -13,6 +15,7 @@ import com.engine.organization.util.OrganizationAssert;
|
|
|
|
import com.engine.organization.util.OrganizationDateUtil;
|
|
|
|
import com.engine.organization.util.OrganizationDateUtil;
|
|
|
|
import com.engine.organization.util.db.DBType;
|
|
|
|
import com.engine.organization.util.db.DBType;
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
@ -515,6 +518,45 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Map<String, Object> selectStatistics(Map<String, Object> params) {
|
|
|
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
|
|
|
Map<String, Object> result = new HashMap<>(4);
|
|
|
|
|
|
|
|
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
|
|
|
|
|
|
|
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
|
|
|
|
|
|
|
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
|
|
|
|
|
|
|
|
List<StatisticsVO> statisticsVOS = new ArrayList<>();
|
|
|
|
|
|
|
|
rs.executeQuery("select id,data_id,super_id,type,on_job_num,staff_num,creator,create_time,update_time from jcl_org_onjob");
|
|
|
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
|
|
|
Integer type = Util.getIntValue(rs.getString("type"));
|
|
|
|
|
|
|
|
String dataIdName = "";
|
|
|
|
|
|
|
|
String superIdName = "";
|
|
|
|
|
|
|
|
if (ModuleTypeEnum.subcompanyfielddefined.getValue().equals(type)) {
|
|
|
|
|
|
|
|
dataIdName = subCompanyComInfo.getSubCompanyname(Util.null2String((rs.getString("data_id"))));
|
|
|
|
|
|
|
|
superIdName = subCompanyComInfo.getSubCompanyname(Util.null2String((rs.getString("super_id"))));
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
dataIdName = departmentComInfo.getDepartmentname(Util.null2String((rs.getString("data_id"))));
|
|
|
|
|
|
|
|
superIdName = departmentComInfo.getDepartmentname(Util.null2String((rs.getString("super_id"))));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StatisticsVO statisticsVO = StatisticsVO.builder()
|
|
|
|
|
|
|
|
.key(Util.getIntValue(rs.getString("id")))
|
|
|
|
|
|
|
|
.dataIdName(dataIdName)
|
|
|
|
|
|
|
|
.superIdName(superIdName)
|
|
|
|
|
|
|
|
.type(type)
|
|
|
|
|
|
|
|
.onJobNum(Util.getIntValue(rs.getString("on_job_num")))
|
|
|
|
|
|
|
|
.staffNum(Util.getIntValue(rs.getString("staff_num")))
|
|
|
|
|
|
|
|
.creator(resourceComInfo.getLastname(Util.null2String(rs.getString("creator"))))
|
|
|
|
|
|
|
|
.createTime(Util.null2String(rs.getString("create_time")))
|
|
|
|
|
|
|
|
.updateTime(Util.null2String(rs.getString("update_time")))
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
statisticsVOS.add(statisticsVO);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
result.put("result",statisticsVOS);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 添加树结构所有上级节点
|
|
|
|
* 添加树结构所有上级节点
|
|
|
|
*
|
|
|
|
*
|
|
|
|