Merge pull request 'v3' (#185) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/185
This commit is contained in:
commit
914649a35b
|
|
@ -29,4 +29,14 @@ public interface ChartService {
|
|||
Map<String, Object> getDepartmentDetail(Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 根据Id获取版本日期
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/7/11 2:53 PM
|
||||
* @param: [id]
|
||||
* @return: java.lang.String
|
||||
*/
|
||||
String selectVersionDate(String id);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
|
||||
String depth = Util.null2String(params.get("level"));
|
||||
|
||||
//版本id
|
||||
String id = Util.null2String(params.get("id"));
|
||||
|
||||
// 初始化表名
|
||||
initTableNameByClass(dimension);
|
||||
|
||||
|
|
@ -71,8 +74,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
String sql = "";
|
||||
|
||||
ChartPO topChartPO = null;
|
||||
//TODO 查询当前实际数据
|
||||
sql = getRealTimeTopSql(root, dimension);
|
||||
//查询当前实际数据
|
||||
if("0".equals(id)){
|
||||
sql = getRealTimeTopSql(root, dimension);
|
||||
}else {
|
||||
sql = getLastTimeTopSql(root,dimension,id);
|
||||
}
|
||||
|
||||
rs.executeQuery(sql);
|
||||
|
||||
// 封装顶部节点
|
||||
|
|
@ -99,6 +107,8 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> asyncCompanyData(Map<String, Object> params) {
|
||||
|
||||
|
|
@ -307,6 +317,29 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectVersionDate(String id) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select recorddate from jcl_org_chartversion where id = ?",id);
|
||||
rs.next();
|
||||
return rs.getString("recorddate");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史顶部元素sql
|
||||
* @param root
|
||||
* @param dimension 维度ID
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private String getLastTimeTopSql(String root, String dimension, String id) {
|
||||
if ("0".equals(root)) {
|
||||
//查询集团维度历史数据
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询实时数据,顶级元素SQL
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue