diff --git a/src/com/engine/organization/service/impl/OrgChartServiceImpl.java b/src/com/engine/organization/service/impl/OrgChartServiceImpl.java index 0c116879..f216f356 100644 --- a/src/com/engine/organization/service/impl/OrgChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/OrgChartServiceImpl.java @@ -611,9 +611,15 @@ public class OrgChartServiceImpl extends Service implements OrgChartService { Map datas = new HashMap<>(); RecordSet rs = new RecordSet(); String fclass = Util.null2String(params.get("fclass")); + String timeName = Util.null2String(params.get("timeName")); List timeLinesBOList = new ArrayList<>(); timeLinesBOList.add(TimeLinesBO.builder().key(0).id(0).title("当前版本").color("blue").time("").build()); - rs.executeQuery("SELECT id,recorddate,description from JCL_ORG_CHARTVERSION where fclass = ? and deletetype = ? order by id desc", fclass, 0); + String sql = "SELECT id,recorddate,description from JCL_ORG_CHARTVERSION where fclass = ? and deletetype = ?"; + if (StringUtils.isNotEmpty(timeName)) { + sql += " and description like '%"+timeName+"%'"; + } + sql += " order by id desc"; + rs.executeQuery(sql, fclass, 0); while (rs.next()) { timeLinesBOList.add(TimeLinesBO.builder() .key(rs.getInt("id"))