回溯组织架构图接口开发

danikor
dxfeng 2 years ago
parent 8a2b024de7
commit 3191564961

@ -29,15 +29,10 @@ public class DanikorOrgChartManager {
private String sql = ""; private String sql = "";
private String status = ""; private String status = "";
private String docStatus = "";
private String customerType = "";
private String customerStatus = "";
private String workType = "";
private String projectStatus = "";
private HttpServletRequest request = null; private HttpServletRequest request = null;
private String cmd = ""; private String cmd = "";
private int labelIndex = -1; private int labelIndex = -1;
private Map params = null; private Map<String, Object> params = null;
private String[] cg; private String[] cg;
private boolean isPOrg = false; private boolean isPOrg = false;
private boolean isShow = false; private boolean isShow = false;
@ -45,13 +40,13 @@ public class DanikorOrgChartManager {
private String companyCountSql = ""; private String companyCountSql = "";
private String subCompanyCountSql = ""; private String subCompanyCountSql = "";
private String departmentCountSql = ""; private String departmentCountSql = "";
private RecordSet rs = null; private final RecordSet rs;
private String defaultHref = ""; private String defaultHref = "";
private List<MOrgChart> list = null; private final List<MOrgChart> list;
private User user; private User user;
private String subCompanyTabName = ""; private String subCompanyTabName = "";
private String departmentTableName = ""; private String departmentTableName = "";
private int shownum = 1; private int showNum = 1;
OrgOperationUtil OrgOperationUtil; OrgOperationUtil OrgOperationUtil;
AppDetachComInfo adci = null; AppDetachComInfo adci = null;
private Boolean useAppDetach; private Boolean useAppDetach;
@ -71,7 +66,7 @@ public class DanikorOrgChartManager {
OrgOperationUtil = new OrgOperationUtil(); OrgOperationUtil = new OrgOperationUtil();
} }
public void init(User user, HttpServletRequest request, Map map, String cg, boolean isPOrg, HrmCompanyVirtual cvBean, Map reqeustMap) { public void init(User user, HttpServletRequest request, Map<String, Object> map, String cg, boolean isPOrg, HrmCompanyVirtual cvBean, Map<String, Object> requestMap) {
this.user = user; this.user = user;
this.request = request; this.request = request;
this.params = map; this.params = map;
@ -84,34 +79,31 @@ public class DanikorOrgChartManager {
isCurrentDate = false; isCurrentDate = false;
syncSearchSql = " and sync_date ='" + syncDate + "'"; syncSearchSql = " and sync_date ='" + syncDate + "'";
} }
if (reqeustMap != null) { if (requestMap != null) {
this.cmd = reqeustMap.containsKey("cmd") ? StringUtil.vString(reqeustMap.get("cmd")) : ""; this.cmd = requestMap.containsKey("cmd") ? StringUtil.vString(requestMap.get("cmd")) : "";
sorgid = reqeustMap.containsKey("sorgid") ? StringUtil.vString(reqeustMap.get("sorgid")) : "1"; sorgid = requestMap.containsKey("sorgid") ? StringUtil.vString(requestMap.get("sorgid")) : "1";
} }
this.cg = StringUtil.vString(cg).split(";"); this.cg = StringUtil.vString(cg).split(";");
this.isPOrg = isPOrg; this.isPOrg = isPOrg;
this.defaultHref = weaver.general.GCONST.getContextPath() + "/spa/hrm/index_mobx.html#/main/hrm/orgStaff?_fromURL=HrmResourceSearchResult&from=hrmorg&virtualtype=" + sorgid + "&departmentid={param}"; this.defaultHref = weaver.general.GCONST.getContextPath() + "/spa/hrm/index_mobx.html#/main/hrm/orgStaff?_fromURL=HrmResourceSearchResult&from=hrmorg&virtualtype=" + sorgid + "&departmentid={param}";
this.cvBean = cvBean; this.cvBean = cvBean;
checkAppInfo(user); checkAppInfo();
initParams(); initParams();
initLabelIndex(); initLabelIndex();
initCountSql(); initCountSql();
this.subCompanyTabName = this.isCurrentDate ? "hrmsubcompany" : "hrmsubcompany_back"; this.subCompanyTabName = this.isCurrentDate ? "hrmsubcompany" : "hrmsubcompany_back";
String appointCompanySql = this.isPOrg ? "" : ("t.companyid = " + cvBean.getId() + " and "); String appointCompanySql = this.isPOrg ? "" : ("t.companyid = " + cvBean.getId() + " and ");
String supcompanyConditionSql = " and tlevel <= " + this.shownum; String supcompanyConditionSql = " and tlevel <= " + this.showNum;
boolean isMysql = false; boolean isMysql = DialectUtil.isMySql(rs.getDBType());
if (DialectUtil.isMySql(rs.getDBType())) {
isMysql = true;
}
String hasnextsql = this.getHasNextBySubCompanySql(isMysql); String hasnextsql = this.getHasNextBySubCompanySql(isMysql);
this.sql = "select t.id,t.subcompanyname,t.supsubcomid,(" + this.subCompanyCountSql + (getDetachSql("").equals("") ? "" : " and " + getDetachSql("")) + syncSearchSql + ")," + this.sql = "select t.id,t.subcompanyname,t.supsubcomid,(" + this.subCompanyCountSql + (getDetachSql("").equals("") ? "" : " and " + getDetachSql("")) + ")," +
"(select COUNT(id) from " + subCompanyTabName + " where supsubcomid = t.id " + syncSearchSql + ") as supCount" + "(select COUNT(id) from " + subCompanyTabName + " where supsubcomid = t.id " + syncSearchSql + ") as supCount" +
hasnextsql + ",t.tlevel from " + subCompanyTabName + " t where " + appointCompanySql + "(t.canceled IS NULL OR t.canceled !='1') and t.id != t.supsubcomid " + (this.cg.length > 0 ? StringUtil.vString(this.cg[0]) : "") + supcompanyConditionSql + syncSearchSql + " order by t.supsubcomid,t.showorder,t.subcompanyname"; hasnextsql + ",t.tlevel from " + subCompanyTabName + " t where " + appointCompanySql + "(t.canceled IS NULL OR t.canceled !='1') and t.id != t.supsubcomid " + (this.cg.length > 0 ? StringUtil.vString(this.cg[0]) : "") + supcompanyConditionSql + syncSearchSql + " order by t.supsubcomid,t.showorder,t.subcompanyname";
this.rs.executeSql(this.sql); this.rs.execute(this.sql);
rs.writeLog("init:" + this.sql); rs.writeLog("init:" + this.sql);
MOrgChart bean = null; MOrgChart bean;
while (this.rs.next()) { while (this.rs.next()) {
int subHasNext = this.rs.getInt(6); int subHasNext = this.rs.getInt(6);
int deptHasNext = this.rs.getInt(7); int deptHasNext = this.rs.getInt(7);
@ -122,7 +114,7 @@ public class DanikorOrgChartManager {
bean.setCount(this.rs.getInt(4)); bean.setCount(this.rs.getInt(4));
bean.setSubCount(this.rs.getInt(5)); bean.setSubCount(this.rs.getInt(5));
bean.setHasNext((subHasNext == 1) || (deptHasNext == 1)); bean.setHasNext((subHasNext == 1) || (deptHasNext == 1));
bean.setNeedPlus((this.rs.getInt(8) == this.shownum) && ((subHasNext == 1) || (deptHasNext == 1))); bean.setNeedPlus((this.rs.getInt(8) == this.showNum) && ((subHasNext == 1) || (deptHasNext == 1)));
this.list.add(bean); this.list.add(bean);
} }
@ -140,17 +132,17 @@ public class DanikorOrgChartManager {
return detachSql; return detachSql;
} }
private void checkAppInfo(User user) { private void checkAppInfo() {
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
rs.executeSql("select appdetachable from SystemSet"); rs.execute("select appdetachable from SystemSet");
if (rs.next() && rs.getString("appdetachable") != null && "1".equals(rs.getString("appdetachable"))) { if (rs.next() && rs.getString("appdetachable") != null && "1".equals(rs.getString("appdetachable"))) {
useAppDetach = Boolean.TRUE; useAppDetach = Boolean.TRUE;
} }
} }
public String getData(String pid) { public String getData() {
StringBuffer data = new StringBuffer(""); StringBuilder data = new StringBuilder();
MOrgChart bean = null; MOrgChart bean;
String cTitle = SystemEnv.getHtmlLabelNames(this.labelIndex + ",523", user.getLanguage()); String cTitle = SystemEnv.getHtmlLabelNames(this.labelIndex + ",523", user.getLanguage());
String initSubSql = initSubCompanyCountSql(); String initSubSql = initSubCompanyCountSql();
String sorgid = StringUtil.vString(this.request.getParameter("sorgid")); String sorgid = StringUtil.vString(this.request.getParameter("sorgid"));
@ -164,15 +156,12 @@ public class DanikorOrgChartManager {
} }
} }
rs.writeLog("getData:list" + list); rs.writeLog("getData:list" + list);
for (int i = 0; i < this.list.size(); i++) { for (MOrgChart mOrgChart : this.list) {
bean = (MOrgChart) this.list.get(i); bean = mOrgChart;
boolean flag = true; boolean flag = true;
if (!adci.isNotCheckUserAppDetach()) { if (!adci.isNotCheckUserAppDetach()) {
flag = false; flag = allowsubcompany.contains(bean.getId());
if (allowsubcompany.contains(bean.getId())) {
flag = true;
}
if (!flag && allowsubcompanyview.contains(bean.getId())) { if (!flag && allowsubcompanyview.contains(bean.getId())) {
flag = true; flag = true;
@ -180,10 +169,9 @@ public class DanikorOrgChartManager {
} }
if (!flag) continue; if (!flag) continue;
int showCount = bean.getCount(); int showCount = bean.getCount();
String showTitle = "";
if (bean.getSubCount() != 0 && isShow) { if (bean.getSubCount() != 0 && isShow) {
Map map = getAllSubCompanyId(bean.getId(), initSubSql + (getDetachSql("").equals("") ? "" : " and " + getDetachSql(""))); Map<String, String> map = getAllSubCompanyId(bean.getId(), initSubSql + (getDetachSql("").equals("") ? "" : " and " + getDetachSql("")));
if (map.containsKey("idCount")) { if (map.containsKey("idCount")) {
String idCount = StringUtil.vString(map.get("idCount")); String idCount = StringUtil.vString(map.get("idCount"));
if (idCount.length() > 0) { if (idCount.length() > 0) {
@ -192,21 +180,20 @@ public class DanikorOrgChartManager {
} }
} }
showTitle = bean.getName() + cTitle + showCount; String showTitle = bean.getName() + cTitle + showCount;
boolean hasNext = bean.isHasNext(); boolean hasNext = bean.isHasNext();
StringBuffer str = new StringBuffer(); String str = "," +
str.append(",") "{\"id\":\"" + bean.getId() +
.append("{\"id\":\"").append(bean.getId()) "\", \"pid\":\"" + bean.getSubId() +
.append("\", \"pid\":\"").append(bean.getSubId()) "\", \"type\":\"subcompany\", \"name\":\"" +
.append("\", \"type\":\"subcompany\", \"name\":\"") StringUtil.vString(StringUtil.toScreen(Util.formatMultiLang(bean.getName(), "" + user.getLanguage())), 12) +
.append(StringUtil.vString(StringUtil.toScreen(Util.formatMultiLang(bean.getName(), "" + user.getLanguage())), 12)) "\", \"title\":\"" + bean.getName() +
.append("\", \"title\":\"").append(bean.getName()) "\", \"num\":\"" + showCount +
.append("\", \"num\":\"").append(showCount) "\", \"nTitle\":\"" + showTitle +
.append("\", \"nTitle\":\"").append(showTitle) "\", \"hasChild\":\"" + hasNext +
.append("\", \"hasChild\":\"").append("" + hasNext) "\", \"needPlus\":\"" + bean.isNeedPlus() +
.append("\", \"needPlus\":\"").append("" + bean.isNeedPlus()) "\", \"cOnclick\":\"" + StringUtil.replace(tmpdefaultHref, "{param}", bean.getId()) +
.append("\", \"cOnclick\":\"").append(StringUtil.replace(tmpdefaultHref, "{param}", bean.getId())) "\", \"oDisplay\":\"none\", \"subRCount\":\"0\", \"subTitle\":\"\"}";
.append("\", \"oDisplay\":\"none\", \"subRCount\":\"0\", \"subTitle\":\"\"}");
data.append(str); data.append(str);
} }
data.append(appendDepartment()); data.append(appendDepartment());
@ -216,8 +203,8 @@ public class DanikorOrgChartManager {
private String appendDepartment() { private String appendDepartment() {
this.departmentTableName = this.isCurrentDate ? "hrmdepartment" : "hrmdepartment_back"; this.departmentTableName = this.isCurrentDate ? "hrmdepartment" : "hrmdepartment_back";
String appendSql = this.isPOrg ? "" : ("and subcompanyid1 in (select id from hrmsubcompanyVirtual t where t.companyid = " + this.cvBean.getId() + ")"); String appendSql = this.isPOrg ? "" : ("and subcompanyid1 in (select id from hrmsubcompanyVirtual t where t.companyid = " + this.cvBean.getId() + ")");
appendSql += " and tlevel <= " + this.shownum; appendSql += " and tlevel <= " + this.showNum;
String checkSupdepid = " t.id != t.supdepid "; String checkSupdepid;
boolean isMysql = false; boolean isMysql = false;
//对于supdepid为空的情况 增加判断 //对于supdepid为空的情况 增加判断
if ("oracle".equalsIgnoreCase(this.rs.getDBType())) { if ("oracle".equalsIgnoreCase(this.rs.getDBType())) {
@ -230,13 +217,14 @@ public class DanikorOrgChartManager {
} }
String hasNextSql = this.getHasNextBySubDeptSql(isMysql); String hasNextSql = this.getHasNextBySubDeptSql(isMysql);
this.sql = "select t.id,t.departmentname,t.subcompanyid1," + this.sql = "select t.id,t.departmentname,t.subcompanyid1," +
"(" + this.departmentCountSql + (getDetachSql("").equals("") ? "" : " and" + getDetachSql("")) + "),t.supdepid,(select COUNT(id) from " + departmentTableName + " where supdepid = t.id) as supCount," + "(" + this.departmentCountSql + (getDetachSql("").equals("") ? "" : " and" + getDetachSql("")) + "),t.supdepid,(select COUNT(id) from " + departmentTableName + " where supdepid = t.id " + syncSearchSql + ") as supCount," +
"(case when t.supdepid != 0 and (select COUNT(id) from " + departmentTableName + " where id = t.supdepid)=0 then 0 else 1 end) as isExist" + "(case when t.supdepid != 0 and (select COUNT(id) from " + departmentTableName + " where id = t.supdepid)=0 then 0 else 1 end) as isExist" +
hasNextSql + ",t.tlevel from " + departmentTableName + " t where " + checkSupdepid + appendSql + " and (t.canceled IS NULL OR t.canceled !='1') and (t.canceled IS NULL OR t.canceled !='1') order by t.subcompanyid1 asc , t.supdepid asc , t.showorder asc, t.departmentname asc"; hasNextSql + ",t.tlevel from " + departmentTableName + " t where " + checkSupdepid + appendSql + " and (t.canceled IS NULL OR t.canceled !='1') and (t.canceled IS NULL OR t.canceled !='1') " + syncSearchSql + " order by t.subcompanyid1 asc , t.supdepid asc , t.showorder asc, t.departmentname asc";
this.rs.executeSql(this.sql); this.rs.execute(this.sql);
System.err.println(sql);
rs.writeLog("appendDepartment:this.sql" + this.sql); rs.writeLog("appendDepartment:this.sql" + this.sql);
List<MOrgChart> dList = new ArrayList<MOrgChart>(); List<MOrgChart> dList = new ArrayList<>();
MOrgChart bean = null; MOrgChart bean;
if (useAppDetach) { if (useAppDetach) {
try { try {
this.allowsubcompany = adci.getAlllowsubcompany();//能查看的分部 this.allowsubcompany = adci.getAlllowsubcompany();//能查看的分部
@ -255,10 +243,7 @@ public class DanikorOrgChartManager {
String subcompanyid1 = this.rs.getString(3); String subcompanyid1 = this.rs.getString(3);
boolean flag = true; boolean flag = true;
if (!adci.isNotCheckUserAppDetach()) { if (!adci.isNotCheckUserAppDetach()) {
flag = false; flag = allowdepartment.contains(id);
if (allowdepartment.contains(id)) {
flag = true;
}
if (!flag && allowdepartmentview.contains(id)) { if (!flag && allowdepartmentview.contains(id)) {
flag = true; flag = true;
@ -275,25 +260,25 @@ public class DanikorOrgChartManager {
bean.setCount(this.rs.getInt(4)); bean.setCount(this.rs.getInt(4));
bean.setSubCount(this.rs.getInt(6)); bean.setSubCount(this.rs.getInt(6));
bean.setHasNext(this.rs.getInt(8) == 1); bean.setHasNext(this.rs.getInt(8) == 1);
bean.setNeedPlus((this.rs.getInt(9) == this.shownum) && this.rs.getInt(8) == 1); bean.setNeedPlus((this.rs.getInt(9) == this.showNum) && this.rs.getInt(8) == 1);
if (this.rs.getInt(7) == 0) { if (this.rs.getInt(7) == 0) {
continue; continue;
} }
dList.add(bean); dList.add(bean);
} }
StringBuffer data = new StringBuffer(); StringBuilder data = new StringBuilder();
String cTitle = SystemEnv.getHtmlLabelNames("21837," + (this.labelIndex == 179 ? 1867 : this.labelIndex), user.getLanguage()); String cTitle = SystemEnv.getHtmlLabelNames("21837," + (this.labelIndex == 179 ? 1867 : this.labelIndex), user.getLanguage());
String sTitle = SystemEnv.getHtmlLabelNames("33864,17587," + (this.labelIndex == 179 ? 1867 : this.labelIndex), user.getLanguage()); String sTitle = SystemEnv.getHtmlLabelNames("33864,17587," + (this.labelIndex == 179 ? 1867 : this.labelIndex), user.getLanguage());
String initSubSql = initSubDepartmentCountSql(); String initSubSql = initSubDepartmentCountSql();
for (MOrgChart m : dList) { for (MOrgChart m : dList) {
String showTitle = ""; String showTitle;
String allSubId = ""; String allSubId = "";
boolean isShowSubCount = false; boolean isShowSubCount = false;
int subRCount = m.getCount(); int subRCount = m.getCount();
showTitle = cTitle + m.getCount(); showTitle = cTitle + m.getCount();
if (m.getSubCount() != 0 && isShow) { if (m.getSubCount() != 0 && isShow) {
Map map = getAllSubDepartId(m.getId(), initSubSql + (getDetachSql("").equals("") ? "" : " and " + getDetachSql(""))); Map<String, String> map = getAllSubDepartId(m.getId(), initSubSql + (getDetachSql("").equals("") ? "" : " and " + getDetachSql("")));
if (map.containsKey("idCount") && map.containsKey("ids")) { if (map.containsKey("idCount") && map.containsKey("ids")) {
String idCount = StringUtil.vString(map.get("idCount")); String idCount = StringUtil.vString(map.get("idCount"));
allSubId = StringUtil.vString(map.get("ids")); allSubId = StringUtil.vString(map.get("ids"));
@ -305,24 +290,22 @@ public class DanikorOrgChartManager {
} }
String subTitle = sTitle + subRCount; String subTitle = sTitle + subRCount;
boolean hasNext = m.isHasNext(); boolean hasNext = m.isHasNext();
StringBuffer str = new StringBuffer(); String str = "," +
str.append(",") "{\"id\":\"d" + m.getId() +
.append("{\"id\":\"d").append(m.getId()) "\", \"pid\":\"" + m.getSubId() +
.append("\", \"pid\":\"").append(m.getSubId()) "\", \"type\":\"dept\", \"name\":\"" +
.append("\", \"type\":\"dept\", \"name\":\"") StringUtil.vString(StringUtil.toScreen(Util.formatMultiLang(m.getName(), "" + user.getLanguage())), 12) +
.append(StringUtil.vString(StringUtil.toScreen(Util.formatMultiLang(m.getName(), "" + user.getLanguage())), 12)) "\", \"title\":\"" + m.getName() +
.append("\", \"title\":\"").append(m.getName()) "\", \"num\":\"" + m.getCount() +
.append("\", \"num\":\"").append(m.getCount()) "\", \"nTitle\":\"" + showTitle +
.append("\", \"nTitle\":\"").append(showTitle) "\", \"oDisplay\":\"" + (isShowSubCount ? "" : "none") +
.append("\", \"oDisplay\":\"").append(isShowSubCount ? "" : "none") "\", \"subRCount\":\"" + subRCount +
.append("\", \"subRCount\":\"").append(subRCount) "\", \"subTitle\":\"" + subTitle +
.append("\", \"subTitle\":\"").append(subTitle) "\", \"hasChild\":\"" + "" + hasNext +
.append("\", \"hasChild\":\"").append("" + hasNext) "\", \"needPlus\":\"" + "" + m.isNeedPlus() +
.append("\", \"needPlus\":\"").append("" + m.isNeedPlus()) "\", \"cOnclick\":\"" + StringUtil.replace(this.defaultHref, "{param}", m.getId()) +
.append("\", \"cOnclick\":\"").append(StringUtil.replace(this.defaultHref, "{param}", m.getId())) "\", \"sOnclick\":\"" + (isShowSubCount ? StringUtil.replace(this.defaultHref, "{param}", m.getId() + "," + allSubId) : "") + "\"}";
.append("\", \"sOnclick\":\"").append(isShowSubCount ? StringUtil.replace(this.defaultHref, "{param}", m.getId() + "," + allSubId) : "").append("\"}"); data.append(str);
// .append("\"}");
data.append(str.toString());
} }
return data.toString(); return data.toString();
} }
@ -336,7 +319,6 @@ public class DanikorOrgChartManager {
*/ */
private String getHasNextBySubCompanySql(boolean isMysql) { private String getHasNextBySubCompanySql(boolean isMysql) {
this.subCompanyTabName = this.isCurrentDate ? "hrmsubcompany" : "hrmsubcompany_back"; this.subCompanyTabName = this.isCurrentDate ? "hrmsubcompany" : "hrmsubcompany_back";
;
this.departmentTableName = this.isCurrentDate ? "HrmDepartment" : "HrmDepartment_back"; this.departmentTableName = this.isCurrentDate ? "HrmDepartment" : "HrmDepartment_back";
String subsql = ",(select distinct 1 as hasnext from " + subCompanyTabName + " s where (s.supsubcomid=t.id and (s.CANCELED IS NULL OR s.CANCELED !='1')) ) as hassubnext"; String subsql = ",(select distinct 1 as hasnext from " + subCompanyTabName + " s where (s.supsubcomid=t.id and (s.CANCELED IS NULL OR s.CANCELED !='1')) ) as hassubnext";
String deptsql = ",(select distinct 1 as hasnext from " + departmentTableName + " d where (d.subcompanyid1=t.id and (d.CANCELED IS NULL OR d.CANCELED !='1')) ) as hasdeptnext"; String deptsql = ",(select distinct 1 as hasnext from " + departmentTableName + " d where (d.subcompanyid1=t.id and (d.CANCELED IS NULL OR d.CANCELED !='1')) ) as hasdeptnext";
@ -355,28 +337,35 @@ public class DanikorOrgChartManager {
* @return * @return
*/ */
private String getHasNextBySubDeptSql(boolean isMysql) { private String getHasNextBySubDeptSql(boolean isMysql) {
this.departmentTableName = this.isPOrg ? "HrmDepartment" : "HrmDepartmentVirtual"; String whereSql;
String sql = ",(select distinct 1 as hasnext from " + departmentTableName + " d where d.supdepid=t.id and (CANCELED IS NULL OR CANCELED !='1')) as hasnext"; if (isCurrentDate) {
departmentTableName = "hrmdepartment";
whereSql = "where d.supdepid=t.id and (CANCELED IS NULL OR CANCELED !='1')";
} else {
departmentTableName = "hrmdepartment_back";
whereSql = "where d.supdepid=t.id and (CANCELED IS NULL OR CANCELED !='1')" + syncSearchSql;
}
String sql = ",(select distinct 1 as hasnext from " + departmentTableName + " d " + whereSql + ") as hasnext";
if (isMysql) { if (isMysql) {
//8.0版本的mysql distinct 1 的时候会出现多条数据 //8.0版本的mysql distinct 1 的时候会出现多条数据
sql = ",(select distinct if(d.supdepid is null,null,1) as hasnext from " + departmentTableName + " d where d.supdepid=t.id and (CANCELED IS NULL OR CANCELED !='1')) as hasnext"; sql = ",(select distinct if(d.supdepid is null,null,1) as hasnext from " + departmentTableName + " d " + whereSql + ") as hasnext";
} }
return sql; return sql;
} }
private Map getAllSubCompanyId(String arg0, String arg1) { private Map<String, String> getAllSubCompanyId(String arg0, String arg1) {
return getSubId(arg0, this.subCompanyTabName, "SUPSUBCOMID", arg1); return getSubId(arg0, this.subCompanyTabName, "SUPSUBCOMID", arg1);
} }
private Map getAllSubDepartId(String arg0, String arg1) { private Map<String, String> getAllSubDepartId(String arg0, String arg1) {
return getSubId(arg0, this.departmentTableName, "SUPDEPID", arg1); return getSubId(arg0, this.departmentTableName, "SUPDEPID", arg1);
} }
private Map getSubId(String arg0, String arg1, String arg2, String arg4) { private Map<String, String> getSubId(String arg0, String arg1, String arg2, String arg4) {
StringBuffer arg5 = new StringBuffer("SELECT a.ID FROM allSub a LEFT JOIN ") StringBuilder arg5 = new StringBuilder("SELECT a.ID FROM allSub a LEFT JOIN ")
.append(arg1).append(" b ON a.ID = b.ID WHERE (b.CANCELED IS NULL OR b.CANCELED !='1')"); .append(arg1).append(" b ON a.ID = b.ID WHERE (b.CANCELED IS NULL OR b.CANCELED !='1')");
StringBuffer ids = new StringBuffer(); StringBuilder ids = new StringBuilder();
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
if ("oracle".equals(rs.getDBType())) { if ("oracle".equals(rs.getDBType())) {
@ -387,7 +376,7 @@ public class DanikorOrgChartManager {
TableSelfRelationBean bean = new TableSelfRelationBean(TableSelfRelationStyle.findByTableName(arg1.trim())); TableSelfRelationBean bean = new TableSelfRelationBean(TableSelfRelationStyle.findByTableName(arg1.trim()));
bean.setLastSqlWhere(" and (CANCELED IS NULL OR CANCELED !='1') "); bean.setLastSqlWhere(" and (CANCELED IS NULL OR CANCELED !='1') ");
bean.setOutFiled("id"); bean.setOutFiled("id");
arg5 = new StringBuffer(arg5.toString().replace("allSub", "( " + DbDialectFactory.get(rs.getDBType()).getSelfRelactionSql(bean, arg0) + " )")); arg5 = new StringBuilder(arg5.toString().replace("allSub", "( " + DbDialectFactory.get(rs.getDBType()).getSelfRelactionSql(bean, arg0) + " )"));
} else if ("postgresql".equals(rs.getDBType())) { } else if ("postgresql".equals(rs.getDBType())) {
sql.append(" WITH RECURSIVE allSub AS ( SELECT ID FROM "); sql.append(" WITH RECURSIVE allSub AS ( SELECT ID FROM ");
sql.append(arg1).append(" WHERE ID = ").append(arg0).append(" UNION ALL SELECT a.ID FROM ").append(arg1) sql.append(arg1).append(" WHERE ID = ").append(arg0).append(" UNION ALL SELECT a.ID FROM ").append(arg1)
@ -401,9 +390,9 @@ public class DanikorOrgChartManager {
} }
sql.append("select a.idCount,b.id from (").append(StringUtil.replace(arg4, "{ids}", arg5.toString())).append(") a, (").append(arg5.toString()).append(") b "); sql.append("select a.idCount,b.id from (").append(StringUtil.replace(arg4, "{ids}", arg5.toString())).append(") a, (").append(arg5.toString()).append(") b ");
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<>();
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
rs.executeSql(sql.toString()); rs.execute(sql.toString());
String idCount = ""; String idCount = "";
while (rs.next()) { while (rs.next()) {
if (idCount.length() == 0) idCount = StringUtil.vString(rs.getString(1)); if (idCount.length() == 0) idCount = StringUtil.vString(rs.getString(1));
@ -418,24 +407,9 @@ public class DanikorOrgChartManager {
if (this.params == null || this.params.isEmpty()) { if (this.params == null || this.params.isEmpty()) {
return; return;
} }
if (StringUtil.isNull(this.cmd)) { this.status = StringUtil.vString(params.get("status"));
this.status = StringUtil.vString(params.get("status")); this.status = (StringUtil.isNull(status) || status.equals("8")) ? "0,1,2,3" : status;
this.status = (StringUtil.isNull(status) || status.equals("8")) ? "0,1,2,3" : status; this.status = this.status.equals("9") ? "" : (" and status in (" + this.status + ") ");
this.status = this.status.equals("9") ? "" : (" and status in (" + this.status + ") ");
} else if (this.cmd.equals("doc")) {
this.docStatus = StringUtil.vString(params.get("docStatus"));
this.docStatus = StringUtil.isNull(this.docStatus) ? "" : (" and docstatus = " + this.docStatus);
} else if (this.cmd.equals("customer")) {
this.customerType = StringUtil.vString(params.get("customerType"));
this.customerType = StringUtil.isNull(customerType) ? "" : (" and type = " + this.customerType);
this.customerStatus = StringUtil.vString(params.get("customerStatus"));
this.customerStatus = StringUtil.isNull(customerStatus) ? "" : (" and status = " + this.customerStatus);
} else if (this.cmd.equals("project")) {
this.workType = StringUtil.vString(params.get("workType"));
this.workType = StringUtil.isNull(workType) ? "" : (" and worktype = " + this.workType);
this.projectStatus = StringUtil.vString(params.get("projectStatus"));
this.projectStatus = StringUtil.isNull(projectStatus) ? "" : (" and status = " + this.projectStatus);
}
} }
private void initLabelIndex() { private void initLabelIndex() {
@ -448,7 +422,7 @@ public class DanikorOrgChartManager {
} else if (this.cmd.equals("project")) { } else if (this.cmd.equals("project")) {
this.labelIndex = 101; this.labelIndex = 101;
} }
isShow = this.cg.length >= 3 ? "P".equalsIgnoreCase(this.cg[2]) : false; isShow = this.cg.length >= 3 && "P".equalsIgnoreCase(this.cg[2]);
} }
public int getLabelIndex() { public int getLabelIndex() {
@ -457,123 +431,49 @@ public class DanikorOrgChartManager {
private void initCountSql() { private void initCountSql() {
String asNamefora = useAppDetach ? "hrmresource" : "a"; String asNamefora = useAppDetach ? "hrmresource" : "a";
String asNameforb = useAppDetach ? "hrmresource" : "b"; if (this.isCurrentDate) {
String asNameforc = useAppDetach ? "hrmresource" : "c"; this.companyCountSql = "select COUNT(id) from HrmResource where 1=1 " + this.status;
if (this.isPOrg) { this.subCompanyCountSql = "select COUNT(" + asNamefora + ".id) from HrmResource " + asNamefora + " right join HrmDepartment b on " + asNamefora + ".departmentid = b.id where " + asNamefora + ".subcompanyid1=t.id and (b.canceled IS NULL OR b.canceled !='1') " + this.status;
if (StringUtil.isNull(this.cmd)) { this.departmentCountSql = "select COUNT(id) from HrmResource where departmentid=t.id " + this.status;
this.companyCountSql = "select COUNT(id) from HrmResource where 1=1 " + this.status;
this.subCompanyCountSql = "select COUNT(" + asNamefora + ".id) from HrmResource " + asNamefora + " right join HrmDepartment b on " + asNamefora + ".departmentid = b.id where " + asNamefora + ".subcompanyid1=t.id and (b.canceled IS NULL OR b.canceled !='1') " + this.status;
this.departmentCountSql = "select COUNT(id) from HrmResource where departmentid=t.id " + this.status;
} else if (this.cmd.equals("doc")) {
this.companyCountSql = "select COUNT(id) from DocDetail where (maincategory >= 1 or maincategory <= -1) and (subcategory >= 1 or subcategory <= -1) and (seccategory >= 1 or seccategory <= -1) " + this.docStatus;
this.subCompanyCountSql = "select COUNT(a.id) from DocDetail a where a.ownerid in (select id from HrmResource where subcompanyid1 = t.id) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus;
this.departmentCountSql = "select COUNT(a.id) from DocDetail a where a.ownerid in (select id from HrmResource where departmentid = t.id) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus;
} else if (this.cmd.equals("customer")) {
this.companyCountSql = "select COUNT(id) from CRM_CustomerInfo where (deleted is null or deleted!=1) " + this.customerType + this.customerStatus;
this.subCompanyCountSql = "select COUNT(id) from CRM_CustomerInfo where manager in (select id from HrmResource where subcompanyid1 = t.id) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus;
this.departmentCountSql = "select COUNT(id) from CRM_CustomerInfo where manager in (select id from HrmResource where departmentid = t.id) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus;
} else if (this.cmd.equals("project")) {
this.companyCountSql = "select COUNT(id) from Prj_ProjectInfo where 1=1 " + this.workType + this.projectStatus;
this.subCompanyCountSql = "select COUNT(id) from Prj_ProjectInfo where manager in (select id from HrmResource where subcompanyid1 = t.id) " + this.workType + this.projectStatus;
this.departmentCountSql = "select COUNT(id) from Prj_ProjectInfo where manager in (select id from HrmResource where departmentid = t.id) " + this.workType + this.projectStatus;
}
} else { } else {
if (StringUtil.isNull(this.cmd)) { this.companyCountSql = "select COUNT(id) from HrmResource_back where 1=1 " + this.status + syncSearchSql;
this.companyCountSql = "select COUNT(a.id) from HrmResourceVirtual a right join HrmResource " + asNameforb + " on a.resourceid = " + asNameforb + ".id where a.subcompanyid in ( select id from hrmsubcompanyVirtual where companyid = " + this.cvBean.getId() + " ) " + this.status; this.subCompanyCountSql = "select COUNT(" + asNamefora + ".id) from HrmResource_back " + asNamefora + " right join HrmDepartment_back b on " + asNamefora + ".departmentid = b.id and " + asNamefora + ".sync_date = b.sync_date where " + asNamefora + ".subcompanyid1=t.id and (b.canceled IS NULL OR b.canceled !='1') " + this.status + getSyncSearchSql("b");
this.subCompanyCountSql = "select COUNT(a.id) from HrmResourceVirtual a right join HrmDepartmentVirtual b on a.departmentid = b.id right join HrmResource " + asNameforc + " on a.resourceid = " + asNameforc + ".id where a.subcompanyid = t.id and (b.canceled IS NULL OR b.canceled !='1') " + this.status; this.departmentCountSql = "select COUNT(id) from HrmResource_back where departmentid=t.id " + this.status + syncSearchSql;
this.departmentCountSql = "select COUNT(a.id) from HrmResourceVirtual a right join HrmResource " + asNameforc + " on a.resourceid = " + asNameforc + ".id where a.departmentid=t.id " + this.status;
} else if (this.cmd.equals("doc")) {
this.companyCountSql = "select COUNT(id) from DocDetail where ownerid in (select resourceid from HrmResourceVirtual where subcompanyid in (select id from hrmsubcompanyVirtual where companyid = " + this.cvBean.getId() + ")) and (maincategory >= 1 or maincategory <= -1) and (subcategory >= 1 or subcategory <= -1) and (seccategory >= 1 or seccategory <= -1) " + this.docStatus;
this.subCompanyCountSql = "select COUNT(a.id) from DocDetail a where a.ownerid in (select id from HrmResourceVirtual where subcompanyid = t.id) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus;
this.departmentCountSql = "select COUNT(a.id) from DocDetail a where a.ownerid in (select id from HrmResourceVirtual where departmentid = t.id) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus;
} else if (this.cmd.equals("customer")) {
this.companyCountSql = "select COUNT(id) from CRM_CustomerInfo where (deleted is null or deleted!=1) and manager in (select resourceid from HrmResourceVirtual where subcompanyid in (select id from hrmsubcompanyVirtual where companyid = " + this.cvBean.getId() + ")) " + this.customerType + this.customerStatus;
this.subCompanyCountSql = "select COUNT(id) from CRM_CustomerInfo where manager in (select id from HrmResourceVirtual where subcompanyid = t.id) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus;
this.departmentCountSql = "select COUNT(id) from CRM_CustomerInfo where manager in (select id from HrmResourceVirtual where departmentid = t.id) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus;
} else if (this.cmd.equals("project")) {
this.companyCountSql = "select COUNT(id) from Prj_ProjectInfo where manager in (select resourceid from HrmResourceVirtual where subcompanyid in (select id from hrmsubcompanyVirtual where companyid = " + this.cvBean.getId() + ")) " + this.workType + this.projectStatus;
this.subCompanyCountSql = "select COUNT(id) from Prj_ProjectInfo where manager in (select id from HrmResourceVirtual where subcompanyid = t.id) " + this.workType + this.projectStatus;
this.departmentCountSql = "select COUNT(id) from Prj_ProjectInfo where manager in (select id from HrmResourceVirtual where departmentid = t.id) " + this.workType + this.projectStatus;
}
} }
} }
private String initSubDepartmentCountSql() { private String initSubDepartmentCountSql() {
String sql = ""; String sql;
String asNameforb = useAppDetach ? "hrmresource" : "b"; if (this.isCurrentDate) {
String asNameforc = useAppDetach ? "hrmresource" : "c"; sql = ("select COUNT(id)as idCount from HrmResource where departmentid in ({ids}) " + this.status);
if (this.isPOrg) {
if (StringUtil.isNull(this.cmd)) {
sql = ("select COUNT(id)as idCount from HrmResource where departmentid in ({ids}) " + this.status);
} else if (this.cmd.equals("doc")) {
sql = ("select COUNT(a.id)as idCount from DocDetail a where a.ownerid in (select id from HrmResource where departmentid in ({ids})) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus);
} else if (this.cmd.equals("customer")) {
sql = ("select COUNT(id)as idCount from CRM_CustomerInfo where manager in (select id from HrmResource where departmentid in ({ids})) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus);
} else if (this.cmd.equals("project")) {
sql = ("select COUNT(id)as idCount from Prj_ProjectInfo where manager in (select id from HrmResource where departmentid in ({ids})) " + this.workType + this.projectStatus);
}
} else { } else {
if (StringUtil.isNull(this.cmd)) { sql = ("select COUNT(id)as idCount from HrmResource_back where departmentid in ({ids}) " + this.status + syncSearchSql);
sql = ("select COUNT(a.id)as idCount from HrmResourceVirtual a right join HrmResource " + asNameforc + " on a.resourceid = " + asNameforc + ".id where a.departmentid in ({ids}) " + this.status);
} else if (this.cmd.equals("doc")) {
sql = ("select COUNT(a.id)as idCount from DocDetail a where a.ownerid in (select a.resourceid from HrmResourceVirtual a right join HrmResource b on a.resourceid = b.id where a.departmentid in ({ids})) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus);
} else if (this.cmd.equals("customer")) {
sql = ("select COUNT(id)as idCount from CRM_CustomerInfo where manager in (select a.resourceid from HrmResourceVirtual a right join HrmResource b on a.resourceid = b.id where a.departmentid in ({ids})) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus);
} else if (this.cmd.equals("project")) {
sql = ("select COUNT(id)as idCount from Prj_ProjectInfo where manager in (select a.resourceid from HrmResourceVirtual a right join HrmResource b on a.resourceid = b.id where a.departmentid in ({ids})) " + this.workType + this.projectStatus);
}
} }
return sql; return sql;
} }
private String initSubCompanyCountSql() { private String initSubCompanyCountSql() {
String sql = ""; String sql;
String asNameforb = useAppDetach ? "hrmresource" : "b"; if (isCurrentDate) {
String asNameforc = useAppDetach ? "hrmresource" : "c"; sql = ("select COUNT(id) as idCount from HrmResource where subcompanyid1 in ({ids}) " + status);
if (this.isPOrg) {
if (StringUtil.isNull(this.cmd)) {
sql = ("select COUNT(id) as idCount from HrmResource where subcompanyid1 in ({ids}) " + this.status);
} else if (this.cmd.equals("doc")) {
sql = ("select COUNT(a.id)as idCount from DocDetail a where a.ownerid in (select id from HrmResource where subcompanyid1 in ({ids})) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus);
} else if (this.cmd.equals("customer")) {
sql = ("select COUNT(id)as idCount from CRM_CustomerInfo where manager in (select id from HrmResource where subcompanyid1 in ({ids})) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus);
} else if (this.cmd.equals("project")) {
sql = ("select COUNT(id)as idCount from Prj_ProjectInfo where manager in (select id from HrmResource where subcompanyid1 in ({ids})) " + this.workType + this.projectStatus);
}
} else { } else {
if (StringUtil.isNull(this.cmd)) { sql = ("select COUNT(a.id)as idCount from HrmResource_back a where a.subcompanyid in ({ids}) " + status + syncSearchSql);
sql = ("select COUNT(a.id)as idCount from HrmResourceVirtual a right join HrmResource " + asNameforc + " on a.resourceid = " + asNameforc + ".id where a.subcompanyid in ({ids}) " + this.status);
} else if (this.cmd.equals("doc")) {
sql = ("select COUNT(a.id)as idCount from DocDetail a where a.ownerid in (select a.resourceid from HrmResourceVirtual a right join HrmResource b on a.resourceid = b.id where a.subcompanyid in ({ids})) and (a.maincategory >= 1 or a.maincategory <= -1) and (a.subcategory >= 1 or a.subcategory <= -1) and (a.seccategory >= 1 or a.seccategory <= -1) " + this.docStatus);
} else if (this.cmd.equals("customer")) {
sql = ("select COUNT(id)as idCount from CRM_CustomerInfo where manager in (select a.resourceid from HrmResourceVirtual a right join HrmResource b on a.resourceid = b.id where a.subcompanyid in ({ids})) and (deleted is null or deleted!=1) " + this.customerType + this.customerStatus);
} else if (this.cmd.equals("project")) {
sql = ("select COUNT(id)as idCount from Prj_ProjectInfo where manager in (select a.resourceid from HrmResourceVirtual a right join HrmResource b on a.resourceid = b.id where a.subcompanyid in ({ids})) " + this.workType + this.projectStatus);
}
} }
return sql; return sql;
} }
public int getCompanyResourceCount() { public int getCompanyResourceCount() {
this.rs.executeSql(this.companyCountSql + ((getDetachSql("").equals("")) ? " and 1=1" : (" and " + getDetachSql("")))); this.rs.execute(this.companyCountSql + ((getDetachSql("").equals("")) ? " and 1=1" : (" and " + getDetachSql(""))));
return this.rs.next() ? this.rs.getInt(1) : 0; return this.rs.next() ? this.rs.getInt(1) : 0;
} }
public int getShownum() { private String getSyncSearchSql(String tableName) {
shownum = shownum <= 0 ? 1 : shownum; return syncSearchSql.replace("sync_date", tableName + ".sync_date");
return shownum;
}
public void setShownum(int shownum) {
this.shownum = shownum;
} }
public boolean isPOrg() { public void setShowNum(int showNum) {
return isPOrg; this.showNum = showNum;
} }
public void setPOrg(boolean isPOrg) {
this.isPOrg = isPOrg;
}
} }

@ -173,7 +173,7 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
String showName = Util.null2String(params.get("arg2")); String showName = Util.null2String(params.get("arg2"));
int showtype = Util.getIntValue(Util.null2String(params.get("showtype")), 0); int showtype = Util.getIntValue(Util.null2String(params.get("showtype")), 0);
Map beanMap = new HashMap(); Map beanMap = new HashMap<>();
HrmChartSetManager HrmChartSetManager = new HrmChartSetManager(); HrmChartSetManager HrmChartSetManager = new HrmChartSetManager();
beanMap.put("is_sys", 1); beanMap.put("is_sys", 1);
HrmChartSet bean = HrmChartSetManager.get(beanMap); HrmChartSet bean = HrmChartSetManager.get(beanMap);
@ -213,7 +213,7 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
//初始化tlevel //初始化tlevel
new com.api.hrm.util.ServiceUtil().initOrgLevel(); new com.api.hrm.util.ServiceUtil().initOrgLevel();
Map<String, String> map = new HashMap<String, String>(); Map<String, Object> map = new HashMap<>();
map.put("status", arg4); map.put("status", arg4);
map.put("docStatus", arg5); map.put("docStatus", arg5);
map.put("customerType", arg6); map.put("customerType", arg6);
@ -221,21 +221,21 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
map.put("workType", arg8); map.put("workType", arg8);
map.put("projectStatus", arg9); map.put("projectStatus", arg9);
Map<String, String> requestMap = new HashMap<String, String>(); Map<String, Object> requestMap = new HashMap<>();
requestMap.put("cmd", arg10); requestMap.put("cmd", arg10);
requestMap.put("sorgid", sorgid); requestMap.put("sorgid", sorgid);
showName = StringUtil.vString(StringUtil.toScreen(Util.formatMultiLang(showName, "" + user.getLanguage()))); showName = StringUtil.vString(StringUtil.toScreen(Util.formatMultiLang(showName, "" + user.getLanguage())));
DanikorOrgChartManager chartManager = new DanikorOrgChartManager(); DanikorOrgChartManager chartManager = new DanikorOrgChartManager();
chartManager.setShownum(shownum); chartManager.setShowNum(shownum);
chartManager.init(user, request, map, arg11, isPOrg, cvBean, requestMap); chartManager.init(user, request, map, arg11, isPOrg, cvBean, requestMap);
String showCount = String.valueOf(chartManager.getCompanyResourceCount()); String showCount = String.valueOf(chartManager.getCompanyResourceCount());
String showTitle = showName + SystemEnv.getHtmlLabelNames(chartManager.getLabelIndex() + ",523", user.getLanguage()) + showCount; String showTitle = showName + SystemEnv.getHtmlLabelNames(chartManager.getLabelIndex() + ",523", user.getLanguage()) + showCount;
String defaultHref = weaver.general.GCONST.getContextPath() + "/spa/hrm/index_mobx.html#/main/hrm/orgStaff?_fromURL=HrmResourceSearchResult&from=hrmorg&virtualtype=" + sorgid; String defaultHref = weaver.general.GCONST.getContextPath() + "/spa/hrm/index_mobx.html#/main/hrm/orgStaff?_fromURL=HrmResourceSearchResult&from=hrmorg&virtualtype=" + sorgid;
StringBuffer data = new StringBuffer("["); StringBuffer data = new StringBuffer("[");
data.append("{\"id\":\"0\", \"pid\":\"\", \"type\":\"company\", \"name\":\"").append(StringUtil.vString(showName, 12)).append("\", \"title\":\"").append(showName).append("\", \"num\":\"" + showCount + "\", \"nTitle\":\"" + showTitle + "\", \"oDisplay\":\"none\", \"subRCount\":\"0\", \"subTitle\":\"\", \"cOnclick\":\"" + defaultHref + "\", \"sOnclick\":\"\"}").append(chartManager.getData("0")); data.append("{\"id\":\"0\", \"pid\":\"\", \"type\":\"company\", \"name\":\"").append(StringUtil.vString(showName, 12)).append("\", \"title\":\"").append(showName).append("\", \"num\":\"" + showCount + "\", \"nTitle\":\"" + showTitle + "\", \"oDisplay\":\"none\", \"subRCount\":\"0\", \"subTitle\":\"\", \"cOnclick\":\"" + defaultHref + "\", \"sOnclick\":\"\"}").append(chartManager.getData());
data.append("]"); data.append("]");
return data.toString(); return data.toString();
} }

Loading…
Cancel
Save