|
@@ -2,9 +2,11 @@ package org.jeecg.config;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.api.CommonAPI;
|
|
|
+import org.jeecg.common.system.service.ICoreService;
|
|
|
import org.jeecg.common.system.vo.DictModel;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecgframework.dict.service.AutoPoiDictServiceI;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -25,9 +27,8 @@ import java.util.List;
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|
|
- @Lazy
|
|
|
- @Resource
|
|
|
- private CommonAPI commonAPI;
|
|
|
+ @Autowired
|
|
|
+ private ICoreService coreService;
|
|
|
|
|
|
/**
|
|
|
* 通过字典查询easypoi,所需字典文本
|
|
@@ -42,11 +43,11 @@ public class AutoPoiDictConfig implements AutoPoiDictServiceI {
|
|
|
List<DictModel> dictList = null;
|
|
|
// step.1 如果没有字典表则使用系统字典表
|
|
|
if (oConvertUtils.isEmpty(dicTable)) {
|
|
|
- dictList = commonAPI.queryDictItemsByCode(dicCode);
|
|
|
+ dictList = coreService.queryDictItemsByCode(dicCode);
|
|
|
} else {
|
|
|
try {
|
|
|
dicText = oConvertUtils.getString(dicText, dicCode);
|
|
|
- dictList = commonAPI.queryTableDictItemsByCode(dicTable, dicText, dicCode);
|
|
|
+ dictList = coreService.queryTableDictItemsByCode(dicTable, dicText, dicCode);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(),e);
|
|
|
}
|