304 lines
14 KiB
Plaintext
304 lines
14 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@page import="weaver.general.Util"%>
|
|
<%@ page import="weaver.hrm.User" %>
|
|
<%@ page import="weaver.conn.RecordSet" %>
|
|
<%@ page import="com.alibaba.fastjson.JSONArray" %>
|
|
<%@ page import="weaver.hrm.HrmUserVarify" %>
|
|
<%@ page import="com.alibaba.fastjson.JSONObject" %>
|
|
<%@ page import="weaver.hrm.company.SubCompanyComInfo" %>
|
|
<%@ page import="weaver.hrm.company.DepartmentComInfo" %>
|
|
<%@ page import="weaver.interfaces.shhq.util.HttpUtil" %>
|
|
<%@ page import="com.api.browser.bean.SearchConditionItem" %>
|
|
<%@ page import="com.api.hrm.util.HrmFieldSearchConditionComInfo" %>
|
|
<%@ page import="com.api.hrm.bean.HrmFieldBean" %>
|
|
<%@ page import="java.util.*" %>
|
|
<%@ page import="com.engine.hrm.biz.HrmClassifiedProtectionBiz" %>
|
|
<%@ page import="weaver.hrm.settings.ChgPasswdReminder" %>
|
|
<%@ page import="weaver.hrm.settings.RemindSettings" %>
|
|
<%@ page import="com.api.browser.bean.SearchConditionOption" %>
|
|
<%@ page import="weaver.systeminfo.SystemEnv" %>
|
|
<%@ page import="weaver.hrm.privacy.PrivacyComInfo" %>
|
|
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
|
|
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page" />
|
|
<jsp:useBean id="rss" class="weaver.conn.RecordSet" scope="page" />
|
|
<jsp:useBean id="rst" class="weaver.conn.RecordSet" scope="page" />
|
|
<%
|
|
int sum = 0;
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
String username = user.getLastname();
|
|
|
|
PrivacyComInfo pc = new PrivacyComInfo();
|
|
RecordSet rsMould = new RecordSet();
|
|
Map<String, String> mapShowSets = pc.getMapShowSets();
|
|
List<Map<String, Object>> defaultGrouplist = new ArrayList<Map<String, Object>>();
|
|
List<SearchConditionItem> defaultItemlist = new ArrayList<SearchConditionItem>();
|
|
List<Map<String, Object>> grouplist = new ArrayList<Map<String, Object>>();
|
|
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
|
|
LinkedHashMap<String, List<HrmFieldBean>> hrmSearchCondition = hrmFieldSearchConditionComInfo.getSearchCondition("HRMRESOURCESEARCH", user);
|
|
Iterator<Map.Entry<String, List<HrmFieldBean>>> entries = hrmSearchCondition.entrySet().iterator();
|
|
while (entries.hasNext()) {
|
|
Map.Entry<String, List<HrmFieldBean>> entry = entries.next();
|
|
String grouplabel = entry.getKey();
|
|
List<HrmFieldBean> lsSearchCondition = entry.getValue();
|
|
Map<String, Object> groupitem = new HashMap<String, Object>();
|
|
List<SearchConditionItem> itemlist = new ArrayList<SearchConditionItem>();
|
|
|
|
for (int i = 0; i < lsSearchCondition.size(); i++) {
|
|
HrmFieldBean hrmFieldBean = lsSearchCondition.get(i);
|
|
String fieldname = Util.null2String(hrmFieldBean.getFieldname());//字段名
|
|
String fieldhtmltype = Util.null2String(hrmFieldBean.getFieldhtmltype());//字段类型
|
|
String detailtype = Util.null2String(hrmFieldBean.getType());//字段二级类型(浏览框--单人力)
|
|
String dmlurl = Util.null2String(hrmFieldBean.getDmlurl());//dmlurl
|
|
boolean isScope = hrmFieldBean.getIsScope();
|
|
//是否开启了分级保护设置,如果没有开启,查询条件中应该不显示"密级"
|
|
if(!HrmClassifiedProtectionBiz.isOpenClassification() && fieldname.equalsIgnoreCase("classification")){
|
|
continue;
|
|
}
|
|
|
|
|
|
|
|
Object fieldvalue = null;
|
|
if (fieldname.equals("subcompany")) {
|
|
fieldvalue = rsMould.getString("subcompany1");
|
|
} else {
|
|
fieldvalue = rsMould.getString(fieldname);
|
|
}
|
|
Map<String, Object> replaceData = new HashMap<String, Object>();
|
|
if (fieldhtmltype.equals("1")) {
|
|
if (isScope) {//范围
|
|
String fieldnameStart = "";
|
|
if (fieldname.equals("age") ||
|
|
fieldname.equals("seclevel")) {
|
|
fieldnameStart = fieldname;
|
|
} else {
|
|
fieldnameStart = fieldname + "from";
|
|
}
|
|
String fieldnameEnd = fieldname + "to";
|
|
|
|
replaceData.put("startValue", Util.null2String(rsMould.getString(fieldnameStart)));
|
|
replaceData.put("endValue", Util.null2String(rsMould.getString(fieldnameEnd)));
|
|
fieldvalue = replaceData;
|
|
}
|
|
} else if (fieldhtmltype.equals("3")) {
|
|
String dateselect = "";
|
|
String datefrom = "";
|
|
String dateto = "";
|
|
if (detailtype.equals("2")) {
|
|
if (fieldname.startsWith("column_")) {
|
|
String tmpVal = Util.null2String(rsMould.getString(fieldname));
|
|
String[] arrTmpVal = Util.splitString(tmpVal, ",");
|
|
if (arrTmpVal.length == 3) {
|
|
dateselect = arrTmpVal[0];
|
|
datefrom = arrTmpVal[1];
|
|
dateto = arrTmpVal[2];
|
|
}
|
|
} else {
|
|
dateselect = Util.null2String(rsMould.getString(fieldname + DATE_SELECT));
|
|
datefrom = Util.null2String(rsMould.getString(fieldname + DATE_FROM));
|
|
dateto = Util.null2String(rsMould.getString(fieldname + DATE_TO));
|
|
}
|
|
replaceData.put(fieldname + DATE_SELECT, dateselect);
|
|
replaceData.put(fieldname + DATE_FROM, datefrom);
|
|
replaceData.put(fieldname + DATE_TO, dateto);
|
|
fieldvalue = replaceData;
|
|
}
|
|
}
|
|
if (fieldname.equals("jobtitle") || fieldname.equals("joblevel")) {
|
|
if (fieldvalue.equals("0")) {
|
|
fieldvalue = "";
|
|
}
|
|
}
|
|
hrmFieldBean.setFieldvalue(fieldvalue);
|
|
|
|
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
|
|
if (searchConditionItem == null) continue;
|
|
if (fieldname.equals("status")) {
|
|
ChgPasswdReminder reminder = new ChgPasswdReminder();
|
|
RemindSettings settings = reminder.getRemindSettings();
|
|
String checkUnJob = Util.null2String(settings.getCheckUnJob(), "0");
|
|
List<SearchConditionOption> statusOptions = new ArrayList<SearchConditionOption>();
|
|
String status = Util.null2String(hrmFieldBean.getFieldvalue());
|
|
if (status.equals("")) {
|
|
status = "8";
|
|
}
|
|
if ("1".equals(checkUnJob)) {//启用后,只有有“离职人员查看”权限的用户才能检索非在职人员
|
|
if (HrmUserVarify.checkUserRight("hrm:departureView", user)) {
|
|
statusOptions.add(new SearchConditionOption("9", SystemEnv.getHtmlLabelName(332, user.getLanguage()), status.equals("9")));
|
|
}
|
|
} else {
|
|
statusOptions.add(new SearchConditionOption("9", SystemEnv.getHtmlLabelName(332, user.getLanguage()), status.equals("9")));
|
|
}
|
|
statusOptions.add(new SearchConditionOption("0", SystemEnv.getHtmlLabelName(15710, user.getLanguage()), status.equals("0")));
|
|
statusOptions.add(new SearchConditionOption("1", SystemEnv.getHtmlLabelName(15711, user.getLanguage()), status.equals("1")));
|
|
statusOptions.add(new SearchConditionOption("2", SystemEnv.getHtmlLabelName(480, user.getLanguage()), status.equals("2")));
|
|
statusOptions.add(new SearchConditionOption("3", SystemEnv.getHtmlLabelName(15844, user.getLanguage()), status.equals("3")));
|
|
if ("1".equals(checkUnJob)) {//启用后,只有有“离职人员查看”权限的用户才能检索非在职人员
|
|
if (HrmUserVarify.checkUserRight("hrm:departureView", user)) {
|
|
statusOptions.add(new SearchConditionOption("4", SystemEnv.getHtmlLabelName(6094, user.getLanguage()), status.equals("4")));
|
|
statusOptions.add(new SearchConditionOption("5", SystemEnv.getHtmlLabelName(6091, user.getLanguage()), status.equals("5")));
|
|
statusOptions.add(new SearchConditionOption("6", SystemEnv.getHtmlLabelName(6092, user.getLanguage()), status.equals("6")));
|
|
statusOptions.add(new SearchConditionOption("7", SystemEnv.getHtmlLabelName(2245, user.getLanguage()), status.equals("7")));
|
|
}
|
|
} else {
|
|
statusOptions.add(new SearchConditionOption("4", SystemEnv.getHtmlLabelName(6094, user.getLanguage()), status.equals("4")));
|
|
statusOptions.add(new SearchConditionOption("5", SystemEnv.getHtmlLabelName(6091, user.getLanguage()), status.equals("5")));
|
|
statusOptions.add(new SearchConditionOption("6", SystemEnv.getHtmlLabelName(6092, user.getLanguage()), status.equals("6")));
|
|
statusOptions.add(new SearchConditionOption("7", SystemEnv.getHtmlLabelName(2245, user.getLanguage()), status.equals("7")));
|
|
}
|
|
statusOptions.add(new SearchConditionOption("8", SystemEnv.getHtmlLabelName(1831, user.getLanguage()), status.equals("8")));
|
|
searchConditionItem.setOptions(statusOptions);
|
|
}
|
|
searchConditionItem.setLabelcol(8);
|
|
searchConditionItem.setFieldcol(16);
|
|
itemlist.add(searchConditionItem);
|
|
|
|
if (!hasUserDefine) {
|
|
if (lsDefaultCondition.contains(fieldname)) {
|
|
defaultItemlist.add(searchConditionItem);
|
|
}
|
|
} else {
|
|
if (rsUserDefine.getString("has" + fieldname).equals("1")) {
|
|
defaultItemlist.add(searchConditionItem);
|
|
}
|
|
}
|
|
}
|
|
if (itemlist.size() > 0) {
|
|
groupitem.put("title", SystemEnv.getHtmlLabelNames(grouplabel, user.getLanguage()));
|
|
groupitem.put("defaultshow", true);
|
|
groupitem.put("items", itemlist);
|
|
grouplist.add(groupitem);
|
|
}
|
|
}
|
|
|
|
sum++;
|
|
|
|
%>
|
|
|
|
<%!
|
|
|
|
/**
|
|
* 获取 基本信息里的 自定义字段的 值
|
|
* @param userid
|
|
* @return
|
|
*/
|
|
public static String getBaseCusFieldValue(String userid,String fieldid){
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select "+ fieldid +" from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid='-1' and id=?",userid);
|
|
if(rs.next()){
|
|
result = Util.null2String(rs.getString(fieldid));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 获取 个人信息里的 自定义字段的 值
|
|
* @param userid
|
|
* @return
|
|
*/
|
|
public static String getPersonCusFieldValue(String userid,String fieldid){
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select "+ fieldid +" from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid='1' and id=?",userid);
|
|
if(rs.next()){
|
|
result = Util.null2String(rs.getString(fieldid));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 获取 工作信息里的 自定义字段的 值
|
|
* @param userid
|
|
* @return
|
|
*/
|
|
public static String getWorkCusFieldValue(String userid,String fieldid){
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select "+ fieldid +" from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid='3' and id=?",userid);
|
|
if(rs.next()){
|
|
result = Util.null2String(rs.getString(fieldid));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 获取学历名称
|
|
* @param eduId
|
|
* @return
|
|
*/
|
|
public String getEducationName(String eduId){
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select * from hrmeducationlevel where id = ?",eduId);
|
|
while(rs.next()){
|
|
result = Util.null2String(rs.getString("name"));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 获取 用工性质 名称
|
|
* @param eduId
|
|
* @return
|
|
*/
|
|
public String getUseKindName(String eduId){
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select * from hrmusekind where id = ?",eduId);
|
|
while(rs.next()){
|
|
result = Util.null2String(rs.getString("name"));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 获取 下拉框 的名称
|
|
* @param fieldid
|
|
* @param value
|
|
* @return
|
|
*/
|
|
public static String getSelectName(String fieldid,String value) {
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select selectname from workflow_selectitem where cancel=0 and fieldid = ? and selectvalue = ?", fieldid, value);
|
|
if (rs.next()) {
|
|
result = Util.null2String(rs.getString("selectname"));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* 获取 自定义字段 下拉框 的名称
|
|
* @param fieldid
|
|
* @param value
|
|
* @return
|
|
*/
|
|
public static String getCusSelectName(String fieldid,String value) {
|
|
String result = "";
|
|
RecordSet rs = new RecordSet();
|
|
rs.executeQuery("select selectname from cus_selectitem where cancel=0 and fieldid = ? and selectvalue = ?", fieldid, value);
|
|
if (rs.next()) {
|
|
result = Util.null2String(rs.getString("selectname"));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
%>
|
|
|
|
<HEAD>
|
|
</HEAD>
|
|
<BODY>
|
|
|
|
<h1>Congratulation Mode 666666 !</h1>
|
|
|
|
<h1> 以下是 <%=username%> 的 相关数据展示 </h1>
|
|
|
|
<h2> xml <%=xml%></h2>
|
|
|
|
<h2> sum <%=sum%></h2>
|
|
|
|
|
|
|
|
</BODY> |