@ -3,6 +3,7 @@ package com.engine.organization.entity.extend.bo;
import com.api.browser.bean.BrowserBean ;
import com.api.browser.bean.BrowserValueInfo ;
import com.api.browser.bean.SearchConditionItem ;
import com.api.browser.bean.SearchConditionOption ;
import com.api.browser.service.BrowserValueInfoService ;
import com.api.browser.util.BrowserInitUtil ;
import com.api.browser.util.ConditionFactory ;
@ -11,6 +12,7 @@ import com.api.hrm.bean.FieldItem;
import com.api.hrm.util.FieldType ;
import com.api.hrm.util.ServiceUtil ;
import com.engine.kq.cmd.shiftmanagement.toolkit.ShiftManagementToolKit ;
import com.engine.organization.entity.SelectOptionParam ;
import com.engine.organization.entity.extend.po.ExtendInfoPO ;
import com.engine.organization.util.OrganizationFormItemUtil ;
import com.engine.sensitive.biz.SensitiveWordTypeComInfo ;
@ -114,7 +116,7 @@ public class ExtendInfoBO {
// 浏览按钮特殊处理
if ( FieldType . BROWSER . equals ( fieldItem . getType ( ) ) ) {
BrowserBean browserConditionParam = OrganizationFormItemUtil . browserItem ( user , 2 , 16 , fieldItem . getViewAttr ( ) , false , extendInfoPO . getFieldNameDesc ( ) , extendInfoPO . getBrowserType ( ) , extendInfoPO . getFieldName ( ) , extendInfoPO . getCustom BrowserId ( ) ) . getBrowserConditionParam ( ) ;
BrowserBean browserConditionParam = OrganizationFormItemUtil . browserItem ( user , 2 , 16 , fieldItem . getViewAttr ( ) , false , extendInfoPO . getFieldNameDesc ( ) , extendInfoPO . getBrowserType ( ) , extendInfoPO . getFieldName ( ) , extendInfoPO . getCustom Value ( ) ) . getBrowserConditionParam ( ) ;
fieldItem . setBrowserConditionParam ( browserConditionParam ) ;
}
@ -163,7 +165,7 @@ public class ExtendInfoBO {
String fieldlabel = Util . null2String ( extendInfoPO . getFieldNameDesc ( ) ) ; //字段显示名
String fieldhtmltype = Util . null2String ( extendInfoPO . getControlType ( ) ) ; //字段类型
String detailtype = Util . null2String ( extendInfoPO . getBrowserType ( ) ) ; //字段二级类型(浏览框--单人力)
String dmlurl = Util . null2String ( "" ) ;
String customValue = Util . null2String ( extendInfoPO . getCustomValue ( ) ) ;
boolean isQuickSearch = true ;
boolean isScope = false ;
@ -176,7 +178,7 @@ public class ExtendInfoBO {
} else if ( detailtype . equals ( "2" ) ) { //数字
searchConditionItem = conditionFactory . createCondition ( ConditionType . INPUTNUMBER , fieldlabel , fieldname , isQuickSearch ) ;
} else {
searchConditionItem = conditionFactory . createCondition ( ConditionType . INPUT , fieldlabel , fieldname , isQuickSearch ) ;
searchConditionItem = conditionFactory . createCondition ( ConditionType . INPUT , "25034" , fieldname , isQuickSearch ) ;
}
} else if ( fieldhtmltype . equals ( "2" ) ) { //多行文本框
searchConditionItem = conditionFactory . createCondition ( ConditionType . TEXTAREA , fieldlabel , fieldname ) ;
@ -212,25 +214,25 @@ public class ExtendInfoBO {
searchConditionItem = conditionFactory . createCondition ( ConditionType . TIMERANGEPICKER , fieldlabel , domkey ) ;
searchConditionItem . setValue ( fieldvalue ) ;
} else {
//if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) {
// BrowserBean browserbean = new BrowserBean(detailtype + "");
// BrowserInitUtil browserInitUtil = new BrowserInitUtil();
// String fielddbtype = dmlurl;
// if (!dmlurl.startsWith("browser.")) {
// fielddbtype = "browser." + dmlurl;
// }
// if (detailtype.equals("161") || detailtype.equals("162")) {
// browserInitUtil.initCustomizeBrow(browserbean, fielddbtype, Util.getIntValue(detailtype), user.getUID());
// } else {
// browserbean.getDataParams().put("cube_treeid", dmlurl);
// browserbean.getDataParams().put("currenttime", System.currentTimeMillis());
// browserInitUtil.initBrowser(browserbean, user.getLanguage());
// }
// searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, SystemEnv.getHtmlLabelNames(fieldlabel, user.getLanguage()), new String[]{fieldname}, browserbean);
//} else {
searchConditionItem = conditionFactory . createCondition ( ConditionType . BROWSER , fieldlabel , fieldname , detailtype ) ;
//}
// searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(hrmFieldBean.getHideVirtualOrg());
if ( detailtype . equals ( "161" ) | | detailtype . equals ( "162" ) | | detailtype . equals ( "256" ) | | detailtype . equals ( "257" ) ) {
BrowserBean browserbean = new BrowserBean ( detailtype + "" ) ;
BrowserInitUtil browserInitUtil = new BrowserInitUtil ( ) ;
String fielddbtype = customValue ;
if ( ! customValue . startsWith ( "browser." ) ) {
fielddbtype = "browser." + customValue ;
}
if ( detailtype . equals ( "161" ) | | detailtype . equals ( "162" ) ) {
browserInitUtil . initCustomizeBrow ( browserbean , fielddbtype , Util . getIntValue ( detailtype ) , user . getUID ( ) ) ;
} else {
browserbean . getDataParams ( ) . put ( "cube_treeid" , customValue ) ;
browserbean . getDataParams ( ) . put ( "currenttime" , System . currentTimeMillis ( ) ) ;
browserInitUtil . initBrowser ( browserbean , user . getLanguage ( ) ) ;
}
searchConditionItem = new SearchConditionItem ( ConditionType . BROWSER , fieldlabel , new String [ ] { fieldname } , browserbean ) ;
} else {
searchConditionItem = conditionFactory . createCondition ( ConditionType . BROWSER , fieldlabel , fieldname , detailtype ) ;
}
// searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(hrmFieldBean.getHideVirtualOrg());
List < Map < String , Object > > replaceDatas = new ArrayList < Map < String , Object > > ( ) ;
String tmpFieldValue = Util . null2String ( fieldvalue ) ;
if ( detailtype . equals ( "mkqshift" ) ) {
@ -260,7 +262,9 @@ public class ExtendInfoBO {
for ( int i = 0 ; fieldvalues ! = null & & i < fieldvalues . size ( ) ; i + + ) {
BrowserValueInfo valueInfo = fieldvalues . get ( i ) ;
String fieldshowname = valueInfo . getName ( ) ;
if ( fieldshowname . length ( ) = = 0 ) continue ;
if ( fieldshowname . length ( ) = = 0 ) {
continue ;
}
Map < String , Object > replaceData = new HashMap < String , Object > ( ) ;
replaceData . put ( "id" , valueInfo . getId ( ) ) ;
replaceData . put ( "name" , fieldshowname ) ;
@ -268,7 +272,7 @@ public class ExtendInfoBO {
}
} else {
if ( tmpFieldValue . length ( ) > 0 ) {
String fieldshowname = hrmFieldManager . getFieldvalue ( user , dmlurl , Util . getIntValue ( fieldid ) , Util . getIntValue ( fieldhtmltype ) , Util . getIntValue ( detailtype ) , tmpFieldValue , 0 ) ;
String fieldshowname = hrmFieldManager . getFieldvalue ( user , customValue , Util . getIntValue ( fieldid ) , Util . getIntValue ( fieldhtmltype ) , Util . getIntValue ( detailtype ) , tmpFieldValue , 0 ) ;
String [ ] fieldvalues = Util . splitString ( tmpFieldValue , "," ) ;
String [ ] fieldshownames = Util . splitString ( fieldshowname , "," ) ;
if ( detailtype . equals ( "257" ) ) {
@ -281,7 +285,9 @@ public class ExtendInfoBO {
if ( fieldvalues . length ! = fieldshownames . length ) {
break ;
}
if ( Util . null2String ( fieldshownames [ i ] ) . length ( ) = = 0 ) continue ;
if ( Util . null2String ( fieldshownames [ i ] ) . length ( ) = = 0 ) {
continue ;
}
Map < String , Object > replaceData = new HashMap < String , Object > ( ) ;
replaceData . put ( "id" , fieldvalues [ i ] ) ;
replaceData . put ( "name" , fieldshownames [ i ] ) ;
@ -298,49 +304,15 @@ public class ExtendInfoBO {
}
} else if ( fieldhtmltype . equals ( "5" ) ) { //选择框
// List<SearchConditionOption> statusOptions = hrmFieldBean.getSelectOption();
// if (statusOptions == null) statusOptions = new ArrayList<SearchConditionOption>();
// try {
// if (fieldid.length() > 0) {
// rs = new RecordSet();
// char flag = Util.getSeparator();
// if (hrmFieldBean.getIsFormField()) {
// if (Util.null2String(hrmFieldBean.getIssystem()).equals("1")) {
// rs.executeProc("hrm_selectitembyid_new", "" + fieldid + flag + 1);
// } else {
// rs.executeProc("cus_selectitembyid_new", "" + fieldid + flag + 1);
// }
// } else {
// if (fieldname.startsWith("column_")) {
// rs.executeProc("cus_selectitembyid_new", "" + fieldid + flag + 1);
// } else {
// rs.executeProc("hrm_searchselectitembyid", fieldid);
// }
// }
// while (rs.next()) {
// String tmpselectvalue = Util.null2String(rs.getString("selectvalue"));
// String tmpselectname = Util.toScreen(rs.getString("selectname"), user.getLanguage());
// if (Util.null2String(rs.getString("cancel")).equals("1")) continue;
// boolean isDefault = Util.null2String(rs.getString("isdefault")).equals("y");
// if (!isDefault) {
// isDefault = Util.null2String(rs.getString("hrm_isdefault")).equals("1");
// }
// SearchConditionOption searchConditionOption = new SearchConditionOption(tmpselectvalue, tmpselectname, isDefault);
// if (!statusOptions.contains(searchConditionOption)) {
// statusOptions.add(searchConditionOption);
// }
// }
// }
// } catch (Exception e) {
// writeLog(e);
// }
// searchConditionItem = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname, statusOptions);
// if (detailtype.equals("") || detailtype.equals("0")) {
// detailtype = "1";
// }
// searchConditionItem.setKey(Util.null2String(fieldvalue));
// searchConditionItem.setValue(fieldvalue);
// searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3));
List < SearchConditionOption > searchConditionOptions = SelectOptionParam . convertJsonToListOption ( customValue ) ;
searchConditionItem = conditionFactory . createCondition ( ConditionType . SELECT , fieldlabel , fieldname , searchConditionOptions ) ;
if ( detailtype . equals ( "" ) | | detailtype . equals ( "0" ) ) {
detailtype = "1" ;
}
searchConditionItem . setKey ( Util . null2String ( fieldvalue ) ) ;
searchConditionItem . setValue ( fieldvalue + "" ) ;
searchConditionItem . setDetailtype ( Util . getIntValue ( detailtype , 3 ) ) ;
} else if ( fieldhtmltype . equals ( "6" ) ) { //附件
if ( fieldname . equals ( "resourceimageid" ) ) {
searchConditionItem = conditionFactory . createCondition ( ConditionType . RESOURCEIMG , fieldlabel , fieldname , isQuickSearch ) ;