花名册自定义字段展示20230111
This commit is contained in:
parent
12bcd367c7
commit
71c427d1ec
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.mapper.resource;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.organization.entity.hrmresource.po.ResourcePO;
|
||||
import com.engine.organization.entity.hrmresource.param.SearchTemplateParam;
|
||||
import com.engine.organization.entity.hrmresource.po.SearchTemplatePO;
|
||||
|
|
@ -55,4 +56,8 @@ public interface HrmResourceMapper {
|
|||
Integer insertCustomTemplate(SearchTemplatePO templatePO);
|
||||
|
||||
Integer deleteCustomTemplate(@Param("id") Integer Id, @Param("userId") Integer userId);
|
||||
|
||||
List<JSONObject> queryAllResColumns(@Param("level") String level,@Param("grade") String grade);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,5 +370,38 @@
|
|||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryAllResColumns" parameterType="java.lang.String" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select
|
||||
a.ID ,
|
||||
a.LASTNAME ,
|
||||
a.DEPARTMENTID ,
|
||||
a.SUBCOMPANYID1 ,
|
||||
a.JOBTITLE ,
|
||||
a.MOBILE ,
|
||||
a.TELEPHONE ,
|
||||
a.MANAGERID ,
|
||||
a.DSPORDER ,
|
||||
b.field1 ,
|
||||
b.field2 ,
|
||||
b.field3 ,
|
||||
b.field4 ,
|
||||
b.field5 ,
|
||||
c.scheme_name ,
|
||||
d.level_name ,
|
||||
e.grade_name ,
|
||||
f.sequence_name
|
||||
from
|
||||
hrmresource a
|
||||
left join cus_fielddata b on
|
||||
a.ID = b.id
|
||||
left join jcl_org_scheme c on
|
||||
b.field2 = c.id
|
||||
left join jcl_org_level d on
|
||||
b.field3 = d.id
|
||||
left join jcl_org_grade e on
|
||||
b.field4 = e.id
|
||||
left join jcl_org_sequence f on
|
||||
b.field5 = f.id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -6,6 +6,8 @@ import com.api.browser.bean.SearchConditionOption;
|
|||
import com.api.browser.util.ConditionType;
|
||||
import com.api.hrm.bean.HrmFieldBean;
|
||||
import com.api.hrm.util.HrmFieldSearchConditionComInfo;
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||
|
|
@ -40,6 +42,7 @@ import com.engine.organization.util.OrganizationAssert;
|
|||
import com.engine.organization.util.db.DBType;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.engine.organization.util.detach.DetachUtil;
|
||||
import com.engine.organization.util.page.Column;
|
||||
import com.engine.organization.util.page.PageUtil;
|
||||
import com.engine.organization.util.tree.SearchTreeUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
|
@ -74,6 +77,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
|
||||
private static final String RIGHT_NAME = "Roster:All";
|
||||
|
||||
private static final String level = getFieldName("职等");
|
||||
private static final String grade = getFieldName("职级");
|
||||
|
||||
private HrmRelationMapper getHrmRelationMapper() {
|
||||
return MapperProxyFactory.getProxy(HrmRelationMapper.class);
|
||||
}
|
||||
|
|
@ -118,6 +124,22 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
OrganizationWeaTable<HrmResourceVO> table = new OrganizationWeaTable<>(user, HrmResourceVO.class);
|
||||
String sqlWhere = buildSqlWhere(params);
|
||||
table.setSqlwhere(sqlWhere);
|
||||
|
||||
List<WeaTableColumn> weaTableColumnList = new ArrayList<>();
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
|
||||
|
||||
List<com.alibaba.fastjson.JSONObject> jsonObjectList = getHrmResourceMapper().queryAllResColumns(level,grade);
|
||||
// for (com.alibaba.fastjson.JSONObject jsonObject : jsonObjectList){
|
||||
// System.out.println(jsonObject.getString("level_name"));
|
||||
// weaTableColumn.setText("职等");
|
||||
// weaTableColumn.setDisplay(WeaBoolAttr.TRUE);
|
||||
// weaTableColumn.setColumn("levelName");
|
||||
// weaTableColumnList.add(weaTableColumn);
|
||||
// }
|
||||
// table.setColumns(weaTableColumnList);
|
||||
|
||||
// weaTableColumnList = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList());
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
|
@ -869,4 +891,14 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
options.add(0, searchConditionOption);
|
||||
|
||||
}
|
||||
|
||||
private static String getFieldName(String fieldabel) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String fieldname = null;
|
||||
recordSet.executeQuery("select fieldname from jcl_org_field where fieldlabel='" + fieldabel+"'");
|
||||
if (recordSet.next()) {
|
||||
fieldname = recordSet.getString("fieldname");
|
||||
}
|
||||
return fieldname;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue