【fix sonar】AutoPoiDictConfig文件
This commit is contained in:
+8
-8
@@ -17,9 +17,9 @@ import java.util.List;
|
|||||||
* 举例: @Excel(name = "性别", width = 15, dicCode = "sex")
|
* 举例: @Excel(name = "性别", width = 15, dicCode = "sex")
|
||||||
* 1、导出的时候会根据字典配置,把值1,2翻译成:男、女;
|
* 1、导出的时候会根据字典配置,把值1,2翻译成:男、女;
|
||||||
* 2、导入的时候,会把男、女翻译成1,2存进数据库;
|
* 2、导入的时候,会把男、女翻译成1,2存进数据库;
|
||||||
*
|
*
|
||||||
* @Author:scott
|
* @Author:scott
|
||||||
* @since:2019-04-09
|
* @since:2019-04-09
|
||||||
* @Version:1.0
|
* @Version:1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -31,14 +31,14 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过字典查询easypoi,所需字典文本
|
* 通过字典查询easypoi,所需字典文本
|
||||||
*
|
*
|
||||||
* @Author:scott
|
* @Author:scott
|
||||||
* @since:2019-04-09
|
* @since:2019-04-09
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String[] queryDict(String dicTable, String dicCode, String dicText) {
|
public String[] queryDict(String dicTable, String dicCode, String dicText) {
|
||||||
List<String> dictReplaces = new ArrayList<String>();
|
List<String> dictReplaces = new ArrayList<>();
|
||||||
List<DictModel> dictList = null;
|
List<DictModel> dictList = null;
|
||||||
// step.1 如果没有字典表则使用系统字典表
|
// step.1 如果没有字典表则使用系统字典表
|
||||||
if (oConvertUtils.isEmpty(dicTable)) {
|
if (oConvertUtils.isEmpty(dicTable)) {
|
||||||
@@ -56,10 +56,10 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|||||||
dictReplaces.add(t.getText() + "_" + t.getValue());
|
dictReplaces.add(t.getText() + "_" + t.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dictReplaces != null && dictReplaces.size() != 0) {
|
if (!dictReplaces.isEmpty()) {
|
||||||
log.info("---AutoPoi--Get_DB_Dict------"+ dictReplaces.toString());
|
log.info("---AutoPoi--Get_DB_Dict------"+ dictReplaces.toString());
|
||||||
return dictReplaces.toArray(new String[dictReplaces.size()]);
|
return dictReplaces.toArray(new String[dictReplaces.size()]);
|
||||||
}
|
}
|
||||||
return null;
|
return new String[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user