From 54abf562a474a3be9d840a21ca47f32344724bee Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 11 Jul 2023 16:06:23 +0800 Subject: [PATCH] v3 --- .../service/impl/ChartServiceImpl.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/com/engine/organization/service/impl/ChartServiceImpl.java b/src/com/engine/organization/service/impl/ChartServiceImpl.java index af1d6c63..28207e6c 100644 --- a/src/com/engine/organization/service/impl/ChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/ChartServiceImpl.java @@ -329,15 +329,24 @@ public class ChartServiceImpl extends Service implements ChartService { * 获取历史顶部元素sql * @param root * @param dimension 维度ID - * @param id + * @param vesionId * @return */ - private String getLastTimeTopSql(String root, String dimension, String id) { + private String getLastTimeTopSql(String root, String dimension, String vesionId) { if ("0".equals(root)) { - //查询集团维度历史数据 - + //查询集团维度历史版本 + if ("0".equals(dimension)) { + //组织维度 + return "select id,companyname as name,'0' as type from hrmcompany"; + } else { + //查询其他维度集团版本信息 + return "select id,companyname as name,'0' as type from jcl_chart_companyvirtual where " + + " versionid = "+vesionId+" and companyvirtualid = "+dimension; + } + }else { + return "select id,subcompanyname as name,'1' as type from jcl_chart_subcompanyvirtual where " + + " versionid= "+vesionId+" and subcompanyvirtualid"+root; } - return null; } /**