@ -183,7 +183,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
String scopeId = columnName . split ( "_" ) [ 0 ] ;
String fieldName = columnName . substring ( columnName . lastIndexOf ( "_" ) + 1 ) ;
WeaTableColumn weaTableColumn = new WeaTableColumn ( ) ;
weaTableColumn . setText ( getHrmResourceMapper ( ) . queryLabelName ( fieldName , scopeId , user . getLanguage ( ) ) ) ;
weaTableColumn . setText ( getHrmResourceMapper ( ) . queryLabelName ( fieldName , scopeId , user . getLanguage ( ) ) ) ;
weaTableColumn . setColumn ( buildTableSql ( columnName ) . replace ( "." , "_" ) ) ;
weaTableColumn . setDisplay ( columnList . contains ( columnName ) ? WeaBoolAttr . TRUE : WeaBoolAttr . FALSE ) ;
@ -257,7 +257,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
public Integer saveSearchTemplate ( SearchTemplateParam params ) {
// 重复名称校验
SearchTemplatePO searchTemplateByName = getHrmResourceMapper ( ) . getSearchTemplateByName ( user . getUID ( ) , params . getShowname ( ) ) ;
OrganizationAssert . isFalse ( "默认模板" . equals ( params . getShowname ( ) ) | | null ! = searchTemplateByName , SystemEnv . getHtmlLabelName ( 547439 , user . getLanguage ( ) ) ) ;
OrganizationAssert . isFalse ( "默认模板" . equals ( params . getShowname ( ) ) | | null ! = searchTemplateByName , SystemEnv . getHtmlLabelName ( 547439 , user . getLanguage ( ) ) ) ;
SearchTemplatePO templatePO = buildSearchTemplateByFields ( params . getFields ( ) ) ;
if ( null = = templatePO ) {
return - 1 ;
@ -330,7 +330,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
public Integer saveCustomTemplate ( SearchTemplateParam params ) {
// 重复名称校验
SearchTemplatePO searchTemplateByName = getHrmResourceMapper ( ) . getCustomTemplateByName ( user . getUID ( ) , params . getShowname ( ) ) ;
OrganizationAssert . isFalse ( "默认模板" . equals ( params . getShowname ( ) ) | | null ! = searchTemplateByName , SystemEnv . getHtmlLabelName ( 547439 , user . getLanguage ( ) ) ) ;
OrganizationAssert . isFalse ( "默认模板" . equals ( params . getShowname ( ) ) | | null ! = searchTemplateByName , SystemEnv . getHtmlLabelName ( 547439 , user . getLanguage ( ) ) ) ;
SearchTemplatePO templatePO = buildSearchTemplateByFields ( params . getFields ( ) ) ;
if ( null = = templatePO ) {
return - 1 ;
@ -376,7 +376,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
allIds . remove ( jclId ) ;
} else {
//插入
OrganizationAssert . isFalse ( "" . equals ( name ) , SystemEnv . getHtmlLabelName ( 547442 , user . getLanguage ( ) ) ) ;
OrganizationAssert . isFalse ( "" . equals ( name ) , SystemEnv . getHtmlLabelName ( 547442 , user . getLanguage ( ) ) ) ;
jclOrgCustomTemplatePO . setName ( name ) ;
jclOrgCustomTemplatePO . setCreator ( user . getUID ( ) ) ;
jclOrgCustomTemplatePO . setCreateTime ( new java . sql . Date ( OrganizationDateUtil . stringToDate ( currentDate ) . getTime ( ) ) ) ;
@ -463,7 +463,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
@Override
public Map < String , Object > chartResourceList ( Integer departmentId , String versionId , String dimension , String statusValue ) {
public Map < String , Object > chartResourceList ( Integer departmentId , String versionId , String dimension , String statusValue ) {
Map < String , Object > dataMap = new HashMap < > ( ) ;
List < ResourceListColumns > resourceListColumns = getTableColumns ( ) ;
List < ResourceChartPO > resourceChartPOS = new ArrayList < > ( ) ;
@ -475,10 +475,10 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List < String > statusList = Arrays . stream ( statusValue . split ( "," ) )
. map ( String : : trim )
. collect ( Collectors . toList ( ) ) ;
resourceChartPOS = getHrmResourceMapper ( ) . selectByIdAndStatus ( statusList , departmentId ) ;
resourceChartPOS = getHrmResourceMapper ( ) . selectByIdAndStatus ( statusList , departmentId ) ;
resourceChartVOS = ResourceChartBO . convertToVO ( resourceChartPOS ) ;
} else {
rs . executeQuery ( "select resourceid,workcode,lastname,sex,department,subcompany,jobtitle,mobile from jcl_chart_resource where status in (" + statusValue + ") and departmentid = ? and versionid = ?" , departmentId , versionId ) ;
rs . executeQuery ( "select resourceid,workcode,lastname,sex,department,subcompany,jobtitle,mobile from jcl_chart_resource where status in (" + statusValue + ") and departmentid = ? and versionid = ?" , departmentId , versionId ) ;
while ( rs . next ( ) ) {
ResourceChartVO build = ResourceChartVO . builder ( )
. id ( ( long ) Util . getIntValue ( rs . getString ( "resourceid" ) ) )
@ -496,7 +496,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
} else {
rs . executeQuery ( "select h.id,h.workcode,h.lastname,h.sex,h.departmentid,h.subcompanyid1,h.jobtitle,h.status,h.mobile " +
" from hrmresourcevirtual v inner join hrmresource h on v.resourceid = h.id and h.status in (" + statusValue + ") and v.virtualtype = ? and v.departmentid = ?" , dimension , departmentId ) ;
" from hrmresourcevirtual v inner join hrmresource h on v.resourceid = h.id and h.status in (" + statusValue + ") and v.virtualtype = ? and v.departmentid = ?" , dimension , departmentId ) ;
while ( rs . next ( ) ) {
ResourceChartPO build = ResourceChartPO . builder ( )
. id ( ( long ) Util . getIntValue ( rs . getString ( "id" ) ) )
@ -522,15 +522,15 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
private List < ResourceListColumns > getTableColumns ( ) {
List < ResourceListColumns > list = new ArrayList < > ( ) ;
int language = user . getLanguage ( ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547327 , language ) ) . dataIndex ( "id" ) . key ( "id" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547328 , language ) ) . dataIndex ( "workCode" ) . key ( "workCode" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547329 , language ) ) . dataIndex ( "lastName" ) . key ( "lastName" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547330 , language ) ) . dataIndex ( "sex" ) . key ( "sex" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547331 , language ) ) . dataIndex ( "departmentName" ) . key ( "departmentName" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547332 , language ) ) . dataIndex ( "subcompanyName" ) . key ( "subcompanyName" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547333 , language ) ) . dataIndex ( "jobTitle" ) . key ( "jobTitle" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547327 , language ) ) . dataIndex ( "id" ) . key ( "id" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547328 , language ) ) . dataIndex ( "workCode" ) . key ( "workCode" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547329 , language ) ) . dataIndex ( "lastName" ) . key ( "lastName" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547330 , language ) ) . dataIndex ( "sex" ) . key ( "sex" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547331 , language ) ) . dataIndex ( "departmentName" ) . key ( "departmentName" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547332 , language ) ) . dataIndex ( "subcompanyName" ) . key ( "subcompanyName" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547333 , language ) ) . dataIndex ( "jobTitle" ) . key ( "jobTitle" ) . build ( ) ) ;
//list.add(ResourceListColumns.builder().title("状态").dataIndex("status").key("status").build());
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547334 , language ) ) . dataIndex ( "mobile" ) . key ( "mobile" ) . build ( ) ) ;
list . add ( ResourceListColumns . builder ( ) . title ( SystemEnv . getHtmlLabelName ( 547334 , language ) ) . dataIndex ( "mobile" ) . key ( "mobile" ) . build ( ) ) ;
return list ;
@ -576,10 +576,10 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
ArrayList < MenuBtn > topMenuList = new ArrayList < > ( ) ;
ArrayList < MenuBtn > rightMenuList = new ArrayList < > ( ) ;
if ( HasRightUtil . hasRight ( user , RIGHT_NAME , true ) ) {
topMenuList . add ( MenuBtn . builder ( ) . isBatch ( "1" ) . isTop ( "1" ) . menuFun ( "new" ) . menuIcon ( "icon-coms-New-Flow" ) . menuName ( SystemEnv . getHtmlLabelName ( 547443 , user . getLanguage ( ) ) ) . type ( "BTN_Addnew" ) . build ( ) ) ;
rightMenuList . add ( MenuBtn . builder ( ) . isBatch ( "1" ) . isTop ( "1" ) . menuFun ( "new" ) . menuIcon ( "icon-coms-New-Flow" ) . menuName ( SystemEnv . getHtmlLabelName ( 547443 , user . getLanguage ( ) ) ) . type ( "BTN_Addnew" ) . build ( ) ) ;
topMenuList . add ( MenuBtn . builder ( ) . isBatch ( "1" ) . isTop ( "1" ) . menuFun ( "new" ) . menuIcon ( "icon-coms-New-Flow" ) . menuName ( SystemEnv . getHtmlLabelName ( 547443 , user . getLanguage ( ) ) ) . type ( "BTN_Addnew" ) . build ( ) ) ;
rightMenuList . add ( MenuBtn . builder ( ) . isBatch ( "1" ) . isTop ( "1" ) . menuFun ( "new" ) . menuIcon ( "icon-coms-New-Flow" ) . menuName ( SystemEnv . getHtmlLabelName ( 547443 , user . getLanguage ( ) ) ) . type ( "BTN_Addnew" ) . build ( ) ) ;
}
topMenuList . add ( MenuBtn . builder ( ) . isBatch ( "1" ) . isTop ( "1" ) . menuFun ( "customization" ) . menuIcon ( "icon-coms-task-list" ) . menuName ( SystemEnv . getHtmlLabelName ( 547136 , user . getLanguage ( ) ) ) . type ( "BTN_COLUMN" ) . build ( ) ) ;
topMenuList . add ( MenuBtn . builder ( ) . isBatch ( "1" ) . isTop ( "1" ) . menuFun ( "customization" ) . menuIcon ( "icon-coms-task-list" ) . menuName ( SystemEnv . getHtmlLabelName ( 547136 , user . getLanguage ( ) ) ) . type ( "BTN_COLUMN" ) . build ( ) ) ;
rightMenuList . add ( MenuBtn . rightMenu_btnLog ( user . getLanguage ( ) ) ) ;
btnDatas . put ( "topMenu" , topMenuList ) ;
btnDatas . put ( "rightMenu" , rightMenuList ) ;
@ -626,8 +626,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
@Override
public Map < String , Object > getCustomTemplate ( Map < String , Object > params ) {
List < ExtendInfoPO > infoPOList = new ArrayList < > ( ) ;
infoPOList . add ( ExtendInfoPO . builder ( ) . viewAttr ( 2 ) . id ( null ) . fieldName ( "name" ) . fieldNameDesc ( SystemEnv . getHtmlLabelName ( 547580 , user . getLanguage ( ) ) ) . fieldType ( "varchar(255)" ) . controlType ( 1 ) . browserType ( "1" ) . customValue ( "[\"input\",\"text\",\"50\"]" ) . showOrder ( 1 ) . isrequired ( 0 ) . isSystemDefault ( 0 ) . build ( ) ) ;
infoPOList . add ( ExtendInfoPO . builder ( ) . viewAttr ( 1 ) . id ( null ) . fieldName ( "createTime" ) . fieldNameDesc ( SystemEnv . getHtmlLabelName ( 547521 , user . getLanguage ( ) ) ) . fieldType ( "date" ) . controlType ( 1 ) . browserType ( "1" ) . customValue ( "[\"input\",\"text\",\"50\"]" ) . showOrder ( 2 ) . isrequired ( 0 ) . isSystemDefault ( 0 ) . build ( ) ) ;
infoPOList . add ( ExtendInfoPO . builder ( ) . viewAttr ( 2 ) . id ( null ) . fieldName ( "name" ) . fieldNameDesc ( SystemEnv . getHtmlLabelName ( 547580 , user . getLanguage ( ) ) ) . fieldType ( "varchar(255)" ) . controlType ( 1 ) . browserType ( "1" ) . customValue ( "[\"input\",\"text\",\"50\"]" ) . showOrder ( 1 ) . isrequired ( 0 ) . isSystemDefault ( 0 ) . build ( ) ) ;
infoPOList . add ( ExtendInfoPO . builder ( ) . viewAttr ( 1 ) . id ( null ) . fieldName ( "createTime" ) . fieldNameDesc ( SystemEnv . getHtmlLabelName ( 547521 , user . getLanguage ( ) ) ) . fieldType ( "date" ) . controlType ( 1 ) . browserType ( "1" ) . customValue ( "[\"input\",\"text\",\"50\"]" ) . showOrder ( 2 ) . isrequired ( 0 ) . isSystemDefault ( 0 ) . build ( ) ) ;
Map < String , Object > tabInfoMap = new HashMap < > ( ) ;
tabInfoMap . put ( "columns" , ExtendInfoBO . convertInfoListToTable ( user , infoPOList , false , true ) ) ;
List < JclOrgCustomTemplatePO > jclOrgCustomTemplatePOS = MapperProxyFactory . getProxy ( JclOrgCustomTemplateMapper . class ) . listAllByCreator ( user . getUID ( ) ) ;
@ -794,7 +794,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
Map < Integer , DepartmentPO > departmentPOMap = getDepartmentMapper ( ) . listAll ( "showorder" ) . stream ( ) . collect ( Collectors . toMap ( DepartmentPO : : getId , item - > item ) ) ;
for ( DepartmentPO departmentPO : filterDeparts ) {
buildParentDepts ( departmentPO , builderDeparts , departmentPOMap ) ;
if ( departmentPO . getCanceled ( ) = = null | | departmentPO . getCanceled ( ) = = 0 ) {
buildParentDepts ( departmentPO , builderDeparts , departmentPOMap ) ;
}
}
List < SearchTree > departmentList = DepartmentBO . buildSetToSearchTree ( builderDeparts ) ;
List < SearchTree > deptTrees = SearchTreeUtil . builderTreeMode ( departmentList ) ;
@ -844,7 +846,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
// 查询分部信息
Set < DepartmentPO > builderDeparts = new HashSet < > ( ) ;
for ( DepartmentPO departmentPO : filterDeparts ) {
buildParentDepts ( departmentPO , builderDeparts , departmentPOMap ) ;
if ( departmentPO . getCanceled ( ) = = null | | departmentPO . getCanceled ( ) = = 0 ) {
buildParentDepts ( departmentPO , builderDeparts , departmentPOMap ) ;
}
}
return SearchTreeUtil . builderTreeMode ( DepartmentBO . buildSetToSearchTree ( builderDeparts ) , jobTrees ) ;
}
@ -897,21 +901,21 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List < CusFormFieldPO > hrmFieldsByScopeId = getSystemDataMapper ( ) . getHrmFieldsByScopeId ( HrmGroupEnum . HRM_BASIC . getGroupType ( ) . toString ( ) ) ;
createConditionItems ( hrmFieldSearchConditionComInfo , hrmFieldsByScopeId , basicConditionItems ) ;
if ( CollectionUtils . isNotEmpty ( basicConditionItems ) ) {
addGroups . add ( new SearchConditionGroup ( SystemEnv . getHtmlLabelName ( 547175 , user . getLanguage ( ) ) , true , basicConditionItems ) ) ;
addGroups . add ( new SearchConditionGroup ( SystemEnv . getHtmlLabelName ( 547175 , user . getLanguage ( ) ) , true , basicConditionItems ) ) ;
}
// 个人信息: 1
hrmFieldsByScopeId = getSystemDataMapper ( ) . getHrmFieldsByScopeId ( HrmGroupEnum . HRM_PERSONAL . getGroupType ( ) . toString ( ) ) ;
createConditionItems ( hrmFieldSearchConditionComInfo , hrmFieldsByScopeId , personalConditionItems ) ;
if ( CollectionUtils . isNotEmpty ( personalConditionItems ) ) {
addGroups . add ( new SearchConditionGroup ( SystemEnv . getHtmlLabelName ( 547578 , user . getLanguage ( ) ) , true , personalConditionItems ) ) ;
addGroups . add ( new SearchConditionGroup ( SystemEnv . getHtmlLabelName ( 547578 , user . getLanguage ( ) ) , true , personalConditionItems ) ) ;
}
// 工作信息: 3
hrmFieldsByScopeId = getSystemDataMapper ( ) . getHrmFieldsByScopeId ( HrmGroupEnum . HRM_WORK . getGroupType ( ) . toString ( ) ) ;
createConditionItems ( hrmFieldSearchConditionComInfo , hrmFieldsByScopeId , workConditionItems ) ;
if ( CollectionUtils . isNotEmpty ( workConditionItems ) ) {
addGroups . add ( new SearchConditionGroup ( SystemEnv . getHtmlLabelName ( 547579 , user . getLanguage ( ) ) , true , workConditionItems ) ) ;
addGroups . add ( new SearchConditionGroup ( SystemEnv . getHtmlLabelName ( 547579 , user . getLanguage ( ) ) , true , workConditionItems ) ) ;
}
return addGroups ;
}
@ -1040,16 +1044,16 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
private void buildSearchConditionGroup ( SearchTemplatePO templatePO , HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo , List < SearchConditionGroup > addGroups ) {
String [ ] basicFields = Util . null2String ( templatePO . getBasicFields ( ) ) . split ( "," ) ;
if ( basicFields . length > 0 ) {
getTemplateItems ( hrmFieldSearchConditionComInfo , addGroups , SystemEnv . getHtmlLabelName ( 547175 , user . getLanguage ( ) ) , HrmGroupEnum . HRM_BASIC . getGroupType ( ) , basicFields ) ;
getTemplateItems ( hrmFieldSearchConditionComInfo , addGroups , SystemEnv . getHtmlLabelName ( 547175 , user . getLanguage ( ) ) , HrmGroupEnum . HRM_BASIC . getGroupType ( ) , basicFields ) ;
}
String [ ] personalFields = Util . null2String ( templatePO . getPersonalFields ( ) ) . split ( "," ) ;
if ( personalFields . length > 0 ) {
getTemplateItems ( hrmFieldSearchConditionComInfo , addGroups , SystemEnv . getHtmlLabelName ( 547578 , user . getLanguage ( ) ) , HrmGroupEnum . HRM_PERSONAL . getGroupType ( ) , personalFields ) ;
getTemplateItems ( hrmFieldSearchConditionComInfo , addGroups , SystemEnv . getHtmlLabelName ( 547578 , user . getLanguage ( ) ) , HrmGroupEnum . HRM_PERSONAL . getGroupType ( ) , personalFields ) ;
}
String [ ] workFields = Util . null2String ( templatePO . getWorkFields ( ) ) . split ( "," ) ;
if ( workFields . length > 0 ) {
getTemplateItems ( hrmFieldSearchConditionComInfo , addGroups , SystemEnv . getHtmlLabelName ( 547579 , user . getLanguage ( ) ) , HrmGroupEnum . HRM_WORK . getGroupType ( ) , workFields ) ;
getTemplateItems ( hrmFieldSearchConditionComInfo , addGroups , SystemEnv . getHtmlLabelName ( 547579 , user . getLanguage ( ) ) , HrmGroupEnum . HRM_WORK . getGroupType ( ) , workFields ) ;
}
}
@ -1250,7 +1254,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List < SearchConditionOption > options = searchConditionItem . getOptions ( ) ;
SearchConditionOption searchConditionOption = new SearchConditionOption ( ) ;
searchConditionOption . setKey ( "-1" ) ;
searchConditionOption . setShowname ( SystemEnv . getHtmlLabelName ( 547191 , user . getLanguage ( ) ) ) ;
searchConditionOption . setShowname ( SystemEnv . getHtmlLabelName ( 547191 , user . getLanguage ( ) ) ) ;
options . add ( 0 , searchConditionOption ) ;
options . forEach ( item - > item . setSelected ( false ) ) ;
}