安科讯通讯录在职人数统计

安科讯
Chengliang 10 months ago
parent 49a9c4fcba
commit 7ed9db16f9

2
.gitignore vendored

@ -9,7 +9,7 @@ target/
/test /test
/src/rebel.xml /src/rebel.xml
/META-INF /src/META-INF
/WEB-INF/config /WEB-INF/config
/log /log

@ -1,4 +1,4 @@
package com.com.api.hrm.service; package com.api.hrm.service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -13,6 +13,7 @@ import com.api.hrm.bean.TreeNode;
import com.engine.common.service.HrmCommonService; import com.engine.common.service.HrmCommonService;
import com.engine.common.service.impl.HrmCommonServiceImpl; import com.engine.common.service.impl.HrmCommonServiceImpl;
import com.engine.hrm.util.HrmUtil;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
import weaver.file.Prop; import weaver.file.Prop;
import weaver.general.BaseBean; import weaver.general.BaseBean;
@ -59,6 +60,7 @@ public class HrmTreeService extends BaseBean{
private String[] allChildDeptIds = null;//人员所属部门的下级部门 private String[] allChildDeptIds = null;//人员所属部门的下级部门
private Boolean sysadmin = false;//系统管理员--为了解决mysql环境系统管理员微博分权左侧树查询速度超过7分钟。 private Boolean sysadmin = false;//系统管理员--为了解决mysql环境系统管理员微博分权左侧树查询速度超过7分钟。
private Boolean isOrgTree = true; private Boolean isOrgTree = true;
public Map<String, Object> getCompanyTree(HttpServletRequest request, HttpServletResponse response) { public Map<String, Object> getCompanyTree(HttpServletRequest request, HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response); User user = HrmUserVarify.getUser(request, response);
String id = Util.null2String(request.getParameter("id")); String id = Util.null2String(request.getParameter("id"));
@ -153,7 +155,14 @@ public class HrmTreeService extends BaseBean{
// 加载虚拟组织列表 // 加载虚拟组织列表
if(companyVirtualComInfo.getCompanyNum() > 0) { if(companyVirtualComInfo.getCompanyNum() > 0) {
companyVirtualComInfo.setTofirstRow(); companyVirtualComInfo.setTofirstRow();
while (companyVirtualComInfo.next()) { while (companyVirtualComInfo.next()) {
// -20001=公文交换维度 -10000=客户维度
if(HrmUtil.isHideDefaultDimension(Util.null2String(companyVirtualComInfo.getCompanyid()))){
continue;
}
// 只控制默认2个维度自定义维度不控制
companyInfo = new OrgBean(); companyInfo = new OrgBean();
companyInfo.setCompanyid(companyVirtualComInfo.getCompanyid()); companyInfo.setCompanyid(companyVirtualComInfo.getCompanyid());
companyInfo.setName(companyVirtualComInfo.getVirtualType()); companyInfo.setName(companyVirtualComInfo.getVirtualType());
@ -161,6 +170,7 @@ public class HrmTreeService extends BaseBean{
companyInfo.setIcon("icon-coms-LargeArea"); companyInfo.setIcon("icon-coms-LargeArea");
companys.add(companyInfo); companys.add(companyInfo);
} }
} }
Map<String, Object> resultDatas = new HashMap<String, Object>(); Map<String, Object> resultDatas = new HashMap<String, Object>();
apidatas.put("companys", companys); apidatas.put("companys", companys);
@ -1039,7 +1049,7 @@ public class HrmTreeService extends BaseBean{
String sql = ""; String sql = "";
String sqlShowCanceled = this.showCanceled?"":"and (canceled is null or canceled !='1')"; String sqlShowCanceled = this.showCanceled?"":"and (canceled is null or canceled !='1')";
if(this.isLoadSubDepartment){ if(this.isLoadSubDepartment){
if(rs.getDBType().equalsIgnoreCase("oracle") || DialectUtil.isMySql(rs.getDBType())){ if(rs.getDBType().equalsIgnoreCase("oracle") || DialectUtil.isMySql(rs.getDBType())||rs.getDBType().equalsIgnoreCase("postgresql")){
sql = "select id,subcompanyid1 from hrmdepartmentallview where 1=1 "+sqlShowCanceled+" and lower(convtomultilang(departmentmark,"+user.getLanguage()+")) like '%"+keyword+"%'"; sql = "select id,subcompanyid1 from hrmdepartmentallview where 1=1 "+sqlShowCanceled+" and lower(convtomultilang(departmentmark,"+user.getLanguage()+")) like '%"+keyword+"%'";
}else{ }else{
sql = "select id,subcompanyid1 from hrmdepartmentallview where 1=1 "+sqlShowCanceled+" and lower(dbo.convtomultilang(departmentmark,"+user.getLanguage()+")) like '%"+keyword+"%'"; sql = "select id,subcompanyid1 from hrmdepartmentallview where 1=1 "+sqlShowCanceled+" and lower(dbo.convtomultilang(departmentmark,"+user.getLanguage()+")) like '%"+keyword+"%'";
@ -1067,7 +1077,7 @@ public class HrmTreeService extends BaseBean{
} }
} }
if(rs.getDBType().equalsIgnoreCase("oracle") || DialectUtil.isMySql(rs.getDBType())){ if(rs.getDBType().equalsIgnoreCase("oracle") || DialectUtil.isMySql(rs.getDBType())||rs.getDBType().equalsIgnoreCase("postgresql")){
sql = "select id from hrmsubcompanyallview where 1=1 "+sqlShowCanceled+" and lower(convtomultilang(subcompanyname,"+user.getLanguage()+")) like '%"+keyword+"%'"; sql = "select id from hrmsubcompanyallview where 1=1 "+sqlShowCanceled+" and lower(convtomultilang(subcompanyname,"+user.getLanguage()+")) like '%"+keyword+"%'";
}else{ }else{
sql = "select id from hrmsubcompanyallview where 1=1 "+sqlShowCanceled+" and lower(dbo.convtomultilang(subcompanyname,"+user.getLanguage()+")) like '%"+keyword+"%'"; sql = "select id from hrmsubcompanyallview where 1=1 "+sqlShowCanceled+" and lower(dbo.convtomultilang(subcompanyname,"+user.getLanguage()+")) like '%"+keyword+"%'";
@ -1537,4 +1547,5 @@ public class HrmTreeService extends BaseBean{
} }
} }
} }
} }
Loading…
Cancel
Save