@ -12,6 +12,7 @@ import com.engine.hrm.entity.FieldSelectOptionBean;
import com.engine.organization.component.OrganizationWeaTable ;
import com.engine.organization.component.OrganizationWeaTable ;
import com.engine.organization.entity.SelectOptionParam ;
import com.engine.organization.entity.SelectOptionParam ;
import com.engine.organization.entity.commom.RecordInfo ;
import com.engine.organization.entity.commom.RecordInfo ;
import com.engine.organization.entity.extend.ExtendInfoOperateType ;
import com.engine.organization.entity.extend.param.ExtendInfoParams ;
import com.engine.organization.entity.extend.param.ExtendInfoParams ;
import com.engine.organization.entity.extend.po.ExtendInfoPO ;
import com.engine.organization.entity.extend.po.ExtendInfoPO ;
import com.engine.organization.entity.fieldset.param.FieldTransferParam ;
import com.engine.organization.entity.fieldset.param.FieldTransferParam ;
@ -104,11 +105,13 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
extendType = "1" ;
extendType = "1" ;
tableName = "JCL_ORG_COMP" ;
tableName = "JCL_ORG_COMP" ;
excludeFields . add ( "parent_company" ) ;
excludeFields . add ( "parent_company" ) ;
excludeFields . add ( "ec_company" ) ;
break ;
break ;
case "department" :
case "department" :
extendType = "2" ;
extendType = "2" ;
tableName = "JCL_ORG_DEPT" ;
tableName = "JCL_ORG_DEPT" ;
excludeFields . add ( "parent_dept" ) ;
excludeFields . add ( "parent_dept" ) ;
excludeFields . add ( "ec_department" ) ;
break ;
break ;
case "jobtitle" :
case "jobtitle" :
extendType = "3" ;
extendType = "3" ;
@ -159,10 +162,10 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
returnMaps . put ( "data" , fieldDatas ) ;
returnMaps . put ( "data" , fieldDatas ) ;
returnMaps . put ( "selectedKeys" , selectedKeys ) ;
returnMaps . put ( "selectedKeys" , selectedKeys ) ;
} else {
} else {
List < ExtendInfoPO > infoPOList = getExtendInfoMapper ( ) . listFields ( extendType , "" , tableName , "" , "1" ) ;
List < ExtendInfoPO > infoPOList = getExtendInfoMapper ( ) . listFields ( extendType , "" , tableName , ExtendInfoOperateType . LIST . getValue ( ) , "1" ) ;
List < ExtendInfoPO > filterList = infoPOList . stream ( ) . filter ( item - > ! excludeFields . contains ( item . getFieldName ( ) ) & & 6 ! = item . getControlType ( ) ) . collect ( Collectors . toList ( ) ) ;
List < ExtendInfoPO > filterList = infoPOList . stream ( ) . filter ( item - > ! excludeFields . contains ( item . getFieldName ( ) ) & & 6 ! = item . getControlType ( ) ) . collect ( Collectors . toList ( ) ) ;
List < FieldTransferParam > fieldDatas = filterList . stream ( ) . map ( item - > FieldTransferParam . builder ( ) . id ( item . getId ( ) . toString ( ) ) . name ( item . getFieldNameDesc ( ) ) . build ( ) ) . collect ( Collectors . toList ( ) ) ;
List < FieldTransferParam > fieldDatas = filterList . stream ( ) . map ( item - > FieldTransferParam . builder ( ) . id ( item . getId ( ) . toString ( ) ) . name ( item . getFieldNameDesc ( ) ) . build ( ) ) . collect ( Collectors . toList ( ) ) ;
List < Lo ng> selectedKeys = filterList . stream ( ) . filter ( item - > ( 0 = = item . getIsSystemDefault ( ) ) & & 1 = = item . getIsrequired ( ) ) . map ( ExtendInfoPO: : getId ) . collect ( Collectors . toList ( ) ) ;
List < Stri ng> selectedKeys = filterList . stream ( ) . filter ( item - > ( 0 = = item . getIsSystemDefault ( ) ) & & 1 = = item . getIsrequired ( ) ) . map ( item - > item . getId ( ) . toString ( ) ) . collect ( Collectors . toList ( ) ) ;
returnMaps . put ( "data" , fieldDatas ) ;
returnMaps . put ( "data" , fieldDatas ) ;
returnMaps . put ( "selectedKeys" , selectedKeys ) ;
returnMaps . put ( "selectedKeys" , selectedKeys ) ;
}
}
@ -332,7 +335,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
lsPromptLabel . add ( 522355 ) ;
lsPromptLabel . add ( 522355 ) ;
lsPromptLabel . add ( 522356 ) ;
lsPromptLabel . add ( 522356 ) ;
lsPromptLabel . add ( 522357 ) ;
lsPromptLabel . add ( 522357 ) ;
lsPromptLabel . add ( 530411 ) ;
//lsPromptLabel.add(530411);
for ( int i = 0 ; i < lsPromptLabel . size ( ) ; i + + ) {
for ( int i = 0 ; i < lsPromptLabel . size ( ) ; i + + ) {
Map < String , Object > item = new HashMap < > ( ) ;
Map < String , Object > item = new HashMap < > ( ) ;
@ -394,7 +397,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
lsPromptLabel . add ( 522355 ) ;
lsPromptLabel . add ( 522355 ) ;
lsPromptLabel . add ( 522356 ) ;
lsPromptLabel . add ( 522356 ) ;
lsPromptLabel . add ( 522357 ) ;
lsPromptLabel . add ( 522357 ) ;
lsPromptLabel . add ( 530411 ) ;
//lsPromptLabel.add(530411);
for ( int i = 0 ; i < lsPromptLabel . size ( ) ; i + + ) {
for ( int i = 0 ; i < lsPromptLabel . size ( ) ; i + + ) {
Map < String , Object > item = new HashMap < > ( ) ;
Map < String , Object > item = new HashMap < > ( ) ;
@ -629,6 +632,9 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
}
}
}
}
map . put ( "parent_company" , parentCompanyId ) ;
map . put ( "parent_company" , parentCompanyId ) ;
if ( null ! = parentCompanyId ) {
map . put ( "ec_company" , EcHrmRelationUtil . getEcCompanyId ( parentCompanyId . toString ( ) ) ) ;
}
companyName = split [ split . length - 1 ] ;
companyName = split [ split . length - 1 ] ;
map . put ( "comp_name" , companyName ) ;
map . put ( "comp_name" , companyName ) ;
}
}
@ -792,7 +798,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
}
}
map . put ( infoPO . getFieldName ( ) , reallyValue ) ;
map . put ( infoPO . getFieldName ( ) , reallyValue ) ;
// 上级分部
// 上级分部
if ( " parent_comp ". equals ( infoPO . getFieldName ( ) ) ) {
if ( " ec_company ". equals ( infoPO . getFieldName ( ) ) ) {
String [ ] split = cellValue . split ( ">" ) ;
String [ ] split = cellValue . split ( ">" ) ;
if ( split . length > 0 ) {
if ( split . length > 0 ) {
if ( split . length > 8 ) {
if ( split . length > 8 ) {
@ -840,7 +846,11 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
}
}
}
}
map . put ( "parent_comp" , parentCompanyId ) ;
map . put ( "parent_comp" , parentCompanyId ) ;
map . put ( "ec_company" , EcHrmRelationUtil . getEcCompanyId ( parentCompanyId . toString ( ) ) ) ;
map . put ( "parent_dept" , parentDepartmentId ) ;
map . put ( "parent_dept" , parentDepartmentId ) ;
if ( null ! = parentDepartmentId ) {
map . put ( "ec_department" , EcHrmRelationUtil . getEcDepartmentId ( parentCompanyId . toString ( ) ) ) ;
}
departmentName = split [ split . length - 1 ] ;
departmentName = split [ split . length - 1 ] ;
map . put ( "dept_name" , departmentName ) ;
map . put ( "dept_name" , departmentName ) ;
}
}