Commit e2373ce7 authored by fangxinjiang's avatar fangxinjiang

权限配置页面

parent ef4956c8
...@@ -194,23 +194,19 @@ public class ExcelUtil <T> implements Serializable { ...@@ -194,23 +194,19 @@ public class ExcelUtil <T> implements Serializable {
* @Param * @Param
* @return * @return
**/ **/
public static String getLabelByDataType(String value,String dataType){ public static String getDicValueByDataType(String value, String dataType){
String tempValue = null; String tempStr = null;
if (Common.isEmpty(tempValue) && Common.isNotNull(dataType)){
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue() Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue()
.get(CacheConstants.DICT_DETAILS .get(CacheConstants.DICT_DETAILS
+ CommonConstants.COLON_STRING + CommonConstants.COLON_STRING
+dataType); + dataType);
if (dicObj != null) { for (Map.Entry<String,String> entry:dicObj.entrySet()){
for (Map.Entry<String, String> entry : dicObj.entrySet()) { if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(value.trim())){
if (Common.isNotNull(entry.getKey()) && entry.getKey().equals(value.trim())) { tempStr = entry.getKey();
tempValue = entry.getValue();
break; break;
} }
} }
} return tempStr;
}
return tempValue;
} }
/** /**
* 返回传参对应的fileds * 返回传参对应的fileds
......
...@@ -1869,7 +1869,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1869,7 +1869,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
project.setCreateBy(user.getId()); project.setCreateBy(user.getId());
project.setCreateName(user.getNickname()); project.setCreateName(user.getNickname());
project.setDeptNo(excel.getSettleDomainCode()); 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.setEmpIdcard(excel.getEmpIdcard());
project.setEmpName(excel.getEmpName()); project.setEmpName(excel.getEmpName());
project.setEmpNatrue(excel.getEmpType()); 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