Commit e2373ce7 authored by fangxinjiang's avatar fangxinjiang

权限配置页面

parent ef4956c8
......@@ -194,23 +194,19 @@ public class ExcelUtil <T> implements Serializable {
* @Param
* @return
**/
public static String getLabelByDataType(String value,String dataType){
String tempValue = null;
if (Common.isEmpty(tempValue) && Common.isNotNull(dataType)){
public static String getDicValueByDataType(String value, String dataType){
String tempStr = null;
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
.get(CacheConstants.DICT_DETAILS
+ CommonConstants.COLON_STRING
+dataType);
if (dicObj != null) {
for (Map.Entry<String, String> entry : dicObj.entrySet()) {
if (Common.isNotNull(entry.getKey()) && entry.getKey().equals(value.trim())) {
tempValue = entry.getValue();
+ dataType);
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(value.trim())){
tempStr = entry.getKey();
break;
}
}
}
}
return tempValue;
return tempStr;
}
/**
* 返回传参对应的fileds
......
......@@ -1869,7 +1869,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
project.setCreateBy(user.getId());
project.setCreateName(user.getNickname());
project.setDeptNo(excel.getSettleDomainCode());
project.setContractType(excelUtil.getLabelByDataType(excel.getContractName(), ExcelAttributeConstants.PERSONNEL_TYPE));
project.setContractType(excelUtil.getDicValueByDataType(excel.getContractName(), ExcelAttributeConstants.PERSONNEL_TYPE));
project.setEmpIdcard(excel.getEmpIdcard());
project.setEmpName(excel.getEmpName());
project.setEmpNatrue(excel.getEmpType());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment