DM数据库,岗位数据不展示BUG修复
This commit is contained in:
parent
e477132c82
commit
ec56ff8b46
|
|
@ -0,0 +1,25 @@
|
|||
package com.engine.organization.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/07/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class IgnoreCaseMap<V> extends HashMap<String, V> {
|
||||
@Override
|
||||
public V get(Object key) {
|
||||
if (key instanceof String) {
|
||||
// 将键转为小写形式再进行查找
|
||||
return super.get(((String) key).toLowerCase());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V put(String key, V value) {
|
||||
// 将键转为小写形式后作为真正的键
|
||||
return super.put(key.toLowerCase(), value);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import com.api.browser.bean.SearchConditionItem;
|
|||
import com.engine.common.service.HrmCommonService;
|
||||
import com.engine.common.service.impl.HrmCommonServiceImpl;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.common.IgnoreCaseMap;
|
||||
import com.engine.organization.entity.TopTab;
|
||||
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
||||
import com.engine.organization.entity.extend.ExtendInfoOperateType;
|
||||
|
|
@ -19,7 +20,6 @@ import com.engine.organization.mapper.extend.*;
|
|||
import com.engine.organization.mapper.personnelcard.CardButtonMapper;
|
||||
import com.engine.organization.service.ExtService;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -85,9 +85,15 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
|
||||
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName(tableName).fields(fields).params(null).id(id).build();
|
||||
Map<String, Object> compExtMap = getExtMapper().listExt(infoParams);
|
||||
IgnoreCaseMap<Object> ignoreCaseMap = new IgnoreCaseMap<>();
|
||||
if (null != compExtMap) {
|
||||
for (Map.Entry<String, Object> entry : compExtMap.entrySet()) {
|
||||
ignoreCaseMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
// 组装拓展页内容
|
||||
for (ExtendInfoPO extendInfoPO : infoPOList) {
|
||||
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null == compExtMap ? null : compExtMap.get(DBType.isOracle() ? extendInfoPO.getFieldName().toUpperCase() : extendInfoPO.getFieldName()));
|
||||
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, ignoreCaseMap.get(extendInfoPO.getFieldName()));
|
||||
item.setFieldcol(16);
|
||||
if (2 == viewAttr) {
|
||||
if (CollectionUtils.isNotEmpty(readOnlyFieldList) && readOnlyFieldList.contains(extendInfoPO.getFieldName())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue